#include "llvm/ExecutionEngine/Orc/MachO.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/Object/MachOUniversal.h"
#include "llvm/Support/FileSystem.h"
#define DEBUG_TYPE …
namespace llvm {
namespace orc {
static std::string objDesc(const MemoryBufferRef &Obj, const Triple &TT,
bool ObjIsSlice) { … }
template <typename HeaderType>
static Error checkMachORelocatableObject(MemoryBufferRef Obj,
bool SwapEndianness, const Triple &TT,
bool ObjIsSlice) { … }
Error checkMachORelocatableObject(MemoryBufferRef Obj, const Triple &TT,
bool ObjIsSlice) { … }
Expected<std::unique_ptr<MemoryBuffer>>
checkMachORelocatableObject(std::unique_ptr<MemoryBuffer> Obj, const Triple &TT,
bool ObjIsSlice) { … }
Expected<std::pair<std::unique_ptr<MemoryBuffer>, LinkableFileKind>>
loadMachORelocatableObject(StringRef Path, const Triple &TT, LoadArchives LA,
std::optional<StringRef> IdentifierOverride) { … }
Expected<std::pair<std::unique_ptr<MemoryBuffer>, LinkableFileKind>>
loadLinkableSliceFromMachOUniversalBinary(sys::fs::file_t FD,
std::unique_ptr<MemoryBuffer> UBBuf,
const Triple &TT, LoadArchives LA,
StringRef UBPath,
StringRef Identifier) { … }
Expected<std::pair<size_t, size_t>>
getMachOSliceRangeForTriple(object::MachOUniversalBinary &UB,
const Triple &TT) { … }
Expected<std::pair<size_t, size_t>>
getMachOSliceRangeForTriple(MemoryBufferRef UBBuf, const Triple &TT) { … }
}
}