13#ifndef LLVM_OBJECT_MACHOUNIVERSAL_H
14#define LLVM_OBJECT_MACHOUNIVERSAL_H
32 virtual void anchor();
37 static constexpr uint32_t MaxSectionAlignment = 15;
61 if (Parent->
getMagic() == MachO::FAT_MAGIC)
62 return Header.cputype;
67 if (Parent->
getMagic() == MachO::FAT_MAGIC)
68 return Header.cpusubtype;
73 if (Parent->
getMagic() == MachO::FAT_MAGIC)
79 if (Parent->
getMagic() == MachO::FAT_MAGIC)
85 if (Parent->
getMagic() == MachO::FAT_MAGIC)
88 return Header64.
align;
91 if (Parent->
getMagic() == MachO::FAT_MAGIC)
100 const char *McpuDefault, *ArchFlag;
102 &McpuDefault, &ArchFlag);
103 return ArchFlag ? ArchFlag : std::string();
121 return Obj ==
Other.Obj;
124 return !(*
this ==
Other);
145 return make_range(begin_objects(), end_objects());
153 return V->isMachOUniversalBinary();
157 getObjectForArch(
StringRef ArchName)
const;
160 getMachOObjectForArch(
StringRef ArchName)
const;
166 getArchiveForArch(
StringRef ArchName)
const;
std::optional< std::vector< StOtherPiece > > Other
static unsigned getCPUType(const MachOObjectFile &O)
static unsigned getCPUSubType(const MachOObjectFile &O)
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.
ObjectForArch getNext() const
uint32_t getReserved() const
uint32_t getCPUType() const
uint64_t getOffset() const
uint32_t getAlign() const
std::string getArchFlagName() const
uint32_t getCPUSubType() const
bool operator==(const ObjectForArch &Other) 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
object_iterator begin_objects() 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
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.