25 #define DEBUG_TYPE "jitlink" 36 if (Data.
size() < 4) {
37 Ctx->notifyFailed(make_error<JITLinkError>(
"Truncated MachO buffer"));
44 dbgs() <<
"jitLink_MachO: magic = " <<
format(
"0x%08" PRIx32, Magic)
45 <<
", identifier = \"" 46 << Ctx->getObjectBuffer().getBufferIdentifier() <<
"\"\n";
51 make_error<JITLinkError>(
"MachO 32-bit platforms not supported"));
61 dbgs() <<
"jitLink_MachO: cputype = " 73 Ctx->notifyFailed(make_error<JITLinkError>(
"MachO-64 CPU type not valid"));
77 Ctx->notifyFailed(make_error<JITLinkError>(
"MachO magic not valid"));
void swapStruct(fat_header &mh)
This class represents lattice values for constants.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
void jitLink_MachO(std::unique_ptr< JITLinkContext > Ctx)
jit-link the given ObjBuffer, which must be a MachO object file.
void jitLink_MachO_x86_64(std::unique_ptr< JITLinkContext > Ctx)
jit-link the given object buffer, which must be a MachO x86-64 object file.
LLVM_NODISCARD size_t size() const
size - Get the string size.
static const char *const Magic
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void jitLink_MachO_arm64(std::unique_ptr< JITLinkContext > Ctx)
jit-link the given object buffer, which must be a MachO arm64 object file.
LLVM_NODISCARD const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
StringRef - Represent a constant reference to a string, i.e.