13#ifndef LLVM_OBJECT_MACHOUNIVERSAL_H
14#define LLVM_OBJECT_MACHOUNIVERSAL_H
31 virtual void anchor();
61 return Header.cputype;
67 return Header.cpusubtype;
87 return Header64.
align;
99 const char *McpuDefault, *ArchFlag;
101 &McpuDefault, &ArchFlag);
102 return ArchFlag ? ArchFlag : std::string();
120 return Obj ==
Other.Obj;
123 return !(*
this ==
Other);
152 return V->isMachOUniversalBinary();
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
This is an important class for using LLVM in a threaded context.
StringRef - Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
A range adaptor for a pair of iterators.
Triple getArchTriple(const char **McpuDefault=nullptr) const
ObjectForArch getNext() const
uint32_t getReserved() const
uint32_t getCPUType() const
uint64_t getOffset() const
uint32_t getAlign() const
Expected< std::unique_ptr< MachOObjectFile > > getAsObjectFile() const
std::string getArchFlagName() const
uint32_t getCPUSubType() const
Expected< std::unique_ptr< IRObjectFile > > getAsIRObject(LLVMContext &Ctx) const
bool operator==(const ObjectForArch &Other) const
Expected< std::unique_ptr< Archive > > getAsArchive() const
object_iterator(const ObjectForArch &Obj)
object_iterator & operator++()
const ObjectForArch * operator->() const
bool operator==(const object_iterator &Other) const
bool operator!=(const object_iterator &Other) const
const ObjectForArch & operator*() const
Expected< ObjectForArch > getObjectForArch(StringRef ArchName) const
object_iterator begin_objects() const
static Expected< std::unique_ptr< MachOUniversalBinary > > create(MemoryBufferRef Source)
Expected< std::unique_ptr< IRObjectFile > > getIRObjectForArch(StringRef ArchName, LLVMContext &Ctx) const
Expected< std::unique_ptr< MachOObjectFile > > getMachOObjectForArch(StringRef ArchName) const
Expected< std::unique_ptr< Archive > > getArchiveForArch(StringRef ArchName) const
object_iterator end_objects() const
uint32_t getMagic() const
iterator_range< object_iterator > objects() const
static bool classof(Binary const *V)
uint32_t getNumberOfObjects() const
static constexpr uint32_t MaxSectionAlignment
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
This is an optimization pass for GlobalISel generic memory operations.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.