#include "llvm/Object/MachOUniversal.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/IRObjectFile.h"
#include "llvm/Object/MachO.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/type_traits.h"
usingnamespacellvm;
usingnamespaceobject;
static Error
malformedError(Twine Msg) { … }
template<typename T>
static T getUniversalBinaryStruct(const char *Ptr) { … }
MachOUniversalBinary::ObjectForArch::ObjectForArch(
const MachOUniversalBinary *Parent, uint32_t Index)
: … { … }
Expected<std::unique_ptr<MachOObjectFile>>
MachOUniversalBinary::ObjectForArch::getAsObjectFile() const { … }
Expected<std::unique_ptr<IRObjectFile>>
MachOUniversalBinary::ObjectForArch::getAsIRObject(LLVMContext &Ctx) const { … }
Expected<std::unique_ptr<Archive>>
MachOUniversalBinary::ObjectForArch::getAsArchive() const { … }
void MachOUniversalBinary::anchor() { … }
Expected<std::unique_ptr<MachOUniversalBinary>>
MachOUniversalBinary::create(MemoryBufferRef Source) { … }
MachOUniversalBinary::MachOUniversalBinary(MemoryBufferRef Source, Error &Err)
: … { … }
Expected<MachOUniversalBinary::ObjectForArch>
MachOUniversalBinary::getObjectForArch(StringRef ArchName) const { … }
Expected<std::unique_ptr<MachOObjectFile>>
MachOUniversalBinary::getMachOObjectForArch(StringRef ArchName) const { … }
Expected<std::unique_ptr<IRObjectFile>>
MachOUniversalBinary::getIRObjectForArch(StringRef ArchName,
LLVMContext &Ctx) const { … }
Expected<std::unique_ptr<Archive>>
MachOUniversalBinary::getArchiveForArch(StringRef ArchName) const { … }