70 std::string StringRep =
unwrap(TD)->getStringRepresentation();
71 return strdup(StringRep.c_str());
79 return unwrap(TD)->getPointerSize(0);
83 return unwrap(TD)->getPointerSize(AS);
128 return unwrap(TD)->getPreferredAlignment(unwrap<GlobalVariable>(GlobalVar));
132 unsigned long long Offset) {
133 StructType *STy = unwrap<StructType>(StructTy);
134 return unwrap(TD)->getStructLayout(STy)->getElementContainingOffset(Offset);
139 StructType *STy = unwrap<StructType>(StructTy);
140 return unwrap(TD)->getStructLayout(STy)->getElementOffset(Element);
LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD)
Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian.
A parsed version of the target data layout string in and methods for querying it. ...
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
This class represents lattice values for constants.
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, LLVMValueRef GlobalVar)
Computes the preferred alignment of a global variable in bytes for a target.
void initializeTargetLibraryInfoWrapperPassPass(PassRegistry &)
A global registry used in conjunction with static constructors to make pluggable components (like tar...
struct LLVMOpaquePassRegistry * LLVMPassRegistryRef
Implementation of the target library information.
LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD)
Returns the integer type that is the same size as a pointer on a target.
struct LLVMOpaqueTargetData * LLVMTargetDataRef
Attribute unwrap(LLVMAttributeRef Attr)
unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the ABI size of a type in bytes for a target.
Class to represent struct types.
void initializeTarget(PassRegistry &)
Initialize all passes linked into the CodeGen library.
struct LLVMOpaqueType * LLVMTypeRef
Each value in the LLVM IR has a type, an LLVMTypeRef.
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned Element)
Computes the byte offset of the indexed struct element for a target.
unsigned LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset)
Computes the structure element that contains the byte offset for a target.
unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the size of a type in bytes for a target.
void initializeTargetTransformInfoWrapperPassPass(PassRegistry &)
unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS)
Returns the pointer size in bytes for a target for a specified address space.
LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS)
Returns the integer type that is the same size as a pointer on a target.
LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M)
Obtain the data layout for a module.
void LLVMDisposeTargetData(LLVMTargetDataRef TD)
Deallocates a TargetData.
unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the preferred alignment of a type in bytes for a target.
unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the storage size of a type in bytes for a target.
char * LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD)
Converts target data to a target layout string.
unsigned LLVMPointerSize(LLVMTargetDataRef TD)
Returns the pointer size in bytes for a target.
void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL)
Set the data layout for a module.
struct LLVMOpaqueTargetLibraryInfotData * LLVMTargetLibraryInfoRef
LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep)
Creates target data from a target layout string.
struct LLVMOpaquePassManager * LLVMPassManagerRef
unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the call frame alignment of a type in bytes for a target.
void LLVMInitializeTarget(LLVMPassRegistryRef R)
LLVMAttributeRef wrap(Attribute Attr)
LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS)
Returns the integer type that is the same size as a pointer on a target.
void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI, LLVMPassManagerRef PM)
Adds target library information to a pass manager.
unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the ABI alignment of a type in bytes for a target.
LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD)
Returns the integer type that is the same size as a pointer on a target.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
LLVMContextRef LLVMGetGlobalContext(void)
Obtain the global context instance.
struct LLVMOpaqueValue * LLVMValueRef
Represents an individual value in LLVM IR.