Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/Object/MachOUniversal.h
Show All 16 Lines | |||||
#include "llvm/ADT/iterator_range.h" | #include "llvm/ADT/iterator_range.h" | ||||
#include "llvm/BinaryFormat/MachO.h" | #include "llvm/BinaryFormat/MachO.h" | ||||
#include "llvm/Object/Archive.h" | #include "llvm/Object/Archive.h" | ||||
#include "llvm/Object/Binary.h" | #include "llvm/Object/Binary.h" | ||||
#include "llvm/Object/MachO.h" | #include "llvm/Object/MachO.h" | ||||
namespace llvm { | namespace llvm { | ||||
class StringRef; | class StringRef; | ||||
class Module; | |||||
class LLVMContext; | |||||
namespace object { | namespace object { | ||||
class IRObjectFile; | |||||
class MachOUniversalBinary : public Binary { | class MachOUniversalBinary : public Binary { | ||||
virtual void anchor(); | virtual void anchor(); | ||||
uint32_t Magic; | uint32_t Magic; | ||||
uint32_t NumberOfObjects; | uint32_t NumberOfObjects; | ||||
public: | public: | ||||
static constexpr uint32_t MaxSectionAlignment = 15; /* 2**15 or 0x8000 */ | static constexpr uint32_t MaxSectionAlignment = 15; /* 2**15 or 0x8000 */ | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | public: | ||||
std::string getArchFlagName() const { | std::string getArchFlagName() const { | ||||
const char *McpuDefault, *ArchFlag; | const char *McpuDefault, *ArchFlag; | ||||
MachOObjectFile::getArchTriple(getCPUType(), getCPUSubType(), | MachOObjectFile::getArchTriple(getCPUType(), getCPUSubType(), | ||||
&McpuDefault, &ArchFlag); | &McpuDefault, &ArchFlag); | ||||
return ArchFlag ? ArchFlag : std::string(); | return ArchFlag ? ArchFlag : std::string(); | ||||
} | } | ||||
Expected<std::unique_ptr<MachOObjectFile>> getAsObjectFile() const; | Expected<std::unique_ptr<MachOObjectFile>> getAsObjectFile() const; | ||||
Expected<std::unique_ptr<IRObjectFile>> | |||||
getAsIRObject(LLVMContext &Ctx) const; | |||||
Expected<std::unique_ptr<Archive>> getAsArchive() const; | Expected<std::unique_ptr<Archive>> getAsArchive() const; | ||||
}; | }; | ||||
class object_iterator { | class object_iterator { | ||||
ObjectForArch Obj; | ObjectForArch Obj; | ||||
public: | public: | ||||
object_iterator(const ObjectForArch &Obj) : Obj(Obj) {} | object_iterator(const ObjectForArch &Obj) : Obj(Obj) {} | ||||
Show All 37 Lines | public: | ||||
} | } | ||||
Expected<ObjectForArch> | Expected<ObjectForArch> | ||||
getObjectForArch(StringRef ArchName) const; | getObjectForArch(StringRef ArchName) const; | ||||
Expected<std::unique_ptr<MachOObjectFile>> | Expected<std::unique_ptr<MachOObjectFile>> | ||||
getMachOObjectForArch(StringRef ArchName) const; | getMachOObjectForArch(StringRef ArchName) const; | ||||
Expected<std::unique_ptr<IRObjectFile>> | |||||
getIRObjectForArch(StringRef ArchName, LLVMContext &Ctx) const; | |||||
Expected<std::unique_ptr<Archive>> | Expected<std::unique_ptr<Archive>> | ||||
getArchiveForArch(StringRef ArchName) const; | getArchiveForArch(StringRef ArchName) const; | ||||
}; | }; | ||||
} | } | ||||
} | } | ||||
#endif | #endif |