LLVM 17.0.0git
|
Macros | |
#define | LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetInfo(void); |
#define | LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target(void); |
#define | LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetMC(void); |
#define | LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo(); |
#define | LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target(); |
#define | LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC(); |
#define | LLVM_ASM_PRINTER(TargetName) void LLVMInitialize##TargetName##AsmPrinter(void); |
#define | LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter(); |
#define | LLVM_ASM_PARSER(TargetName) void LLVMInitialize##TargetName##AsmParser(void); |
#define | LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser(); |
#define | LLVM_DISASSEMBLER(TargetName) void LLVMInitialize##TargetName##Disassembler(void); |
#define | LLVM_DISASSEMBLER(TargetName) LLVMInitialize##TargetName##Disassembler(); |
Typedefs | |
typedef struct LLVMOpaqueTargetData * | LLVMTargetDataRef |
typedef struct LLVMOpaqueTargetLibraryInfotData * | LLVMTargetLibraryInfoRef |
typedef struct LLVMOpaqueTargetMachine * | LLVMTargetMachineRef |
typedef struct LLVMTarget * | LLVMTargetRef |
Enumerations | |
enum | LLVMByteOrdering { LLVMBigEndian , LLVMLittleEndian } |
enum | LLVMCodeGenOptLevel { LLVMCodeGenLevelNone , LLVMCodeGenLevelLess , LLVMCodeGenLevelDefault , LLVMCodeGenLevelAggressive } |
enum | LLVMRelocMode { LLVMRelocDefault , LLVMRelocStatic , LLVMRelocPIC , LLVMRelocDynamicNoPic , LLVMRelocROPI , LLVMRelocRWPI , LLVMRelocROPI_RWPI } |
enum | LLVMCodeModel { LLVMCodeModelDefault , LLVMCodeModelJITDefault , LLVMCodeModelTiny , LLVMCodeModelSmall , LLVMCodeModelKernel , LLVMCodeModelMedium , LLVMCodeModelLarge } |
enum | LLVMCodeGenFileType { LLVMAssemblyFile , LLVMObjectFile } |
Functions | |
static void | LLVMInitializeAllTargetInfos (void) |
LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support. | |
static void | LLVMInitializeAllTargets (void) |
LLVMInitializeAllTargets - The main program should call this function if it wants to link in all available targets that LLVM is configured to support. | |
static void | LLVMInitializeAllTargetMCs (void) |
LLVMInitializeAllTargetMCs - The main program should call this function if it wants access to all available target MC that LLVM is configured to support. | |
static void | LLVMInitializeAllAsmPrinters (void) |
LLVMInitializeAllAsmPrinters - The main program should call this function if it wants all asm printers that LLVM is configured to support, to make them available via the TargetRegistry. | |
static void | LLVMInitializeAllAsmParsers (void) |
LLVMInitializeAllAsmParsers - The main program should call this function if it wants all asm parsers that LLVM is configured to support, to make them available via the TargetRegistry. | |
static void | LLVMInitializeAllDisassemblers (void) |
LLVMInitializeAllDisassemblers - The main program should call this function if it wants all disassemblers that LLVM is configured to support, to make them available via the TargetRegistry. | |
static LLVMBool | LLVMInitializeNativeTarget (void) |
LLVMInitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host. | |
static LLVMBool | LLVMInitializeNativeAsmParser (void) |
LLVMInitializeNativeTargetAsmParser - The main program should call this function to initialize the parser for the native target corresponding to the host. | |
static LLVMBool | LLVMInitializeNativeAsmPrinter (void) |
LLVMInitializeNativeTargetAsmPrinter - The main program should call this function to initialize the printer for the native target corresponding to the host. | |
static LLVMBool | LLVMInitializeNativeDisassembler (void) |
LLVMInitializeNativeTargetDisassembler - The main program should call this function to initialize the disassembler for the native target corresponding to the host. | |
LLVMTargetDataRef | LLVMGetModuleDataLayout (LLVMModuleRef M) |
Obtain the data layout for a module. | |
void | LLVMSetModuleDataLayout (LLVMModuleRef M, LLVMTargetDataRef DL) |
Set the data layout for a module. | |
LLVMTargetDataRef | LLVMCreateTargetData (const char *StringRep) |
Creates target data from a target layout string. | |
void | LLVMDisposeTargetData (LLVMTargetDataRef TD) |
Deallocates a TargetData. | |
void | LLVMAddTargetLibraryInfo (LLVMTargetLibraryInfoRef TLI, LLVMPassManagerRef PM) |
Adds target library information to a pass manager. | |
char * | LLVMCopyStringRepOfTargetData (LLVMTargetDataRef TD) |
Converts target data to a target layout string. | |
enum LLVMByteOrdering | LLVMByteOrder (LLVMTargetDataRef TD) |
Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. | |
unsigned | LLVMPointerSize (LLVMTargetDataRef TD) |
Returns the pointer size in bytes for a target. | |
unsigned | LLVMPointerSizeForAS (LLVMTargetDataRef TD, unsigned AS) |
Returns the pointer size in bytes for a target for a specified address space. | |
LLVMTypeRef | LLVMIntPtrType (LLVMTargetDataRef TD) |
Returns the integer type that is the same size as a pointer on a target. | |
LLVMTypeRef | LLVMIntPtrTypeForAS (LLVMTargetDataRef TD, unsigned AS) |
Returns the integer type that is the same size as a pointer on a target. | |
LLVMTypeRef | LLVMIntPtrTypeInContext (LLVMContextRef C, LLVMTargetDataRef TD) |
Returns the integer type that is the same size as a pointer on a target. | |
LLVMTypeRef | LLVMIntPtrTypeForASInContext (LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS) |
Returns the integer type that is the same size as a pointer on a target. | |
unsigned long long | LLVMSizeOfTypeInBits (LLVMTargetDataRef TD, LLVMTypeRef Ty) |
Computes the size 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. | |
unsigned long long | LLVMABISizeOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty) |
Computes the ABI size of a type in bytes for a target. | |
unsigned | LLVMABIAlignmentOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty) |
Computes the ABI alignment of a type in bytes for a target. | |
unsigned | LLVMCallFrameAlignmentOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty) |
Computes the call frame alignment of a type in bytes for a target. | |
unsigned | LLVMPreferredAlignmentOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty) |
Computes the preferred alignment of a type in bytes for a target. | |
unsigned | LLVMPreferredAlignmentOfGlobal (LLVMTargetDataRef TD, LLVMValueRef GlobalVar) |
Computes the preferred alignment of a global variable in bytes 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 | LLVMOffsetOfElement (LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned Element) |
Computes the byte offset of the indexed struct element for a target. | |
LLVMTargetRef | LLVMGetFirstTarget (void) |
Returns the first llvm::Target in the registered targets list. | |
LLVMTargetRef | LLVMGetNextTarget (LLVMTargetRef T) |
Returns the next llvm::Target given a previous one (or null if there's none) | |
LLVMTargetRef | LLVMGetTargetFromName (const char *Name) |
Finds the target corresponding to the given name and stores it in T . | |
LLVMBool | LLVMGetTargetFromTriple (const char *Triple, LLVMTargetRef *T, char **ErrorMessage) |
Finds the target corresponding to the given triple and stores it in T . | |
const char * | LLVMGetTargetName (LLVMTargetRef T) |
Returns the name of a target. | |
const char * | LLVMGetTargetDescription (LLVMTargetRef T) |
Returns the description of a target. | |
LLVMBool | LLVMTargetHasJIT (LLVMTargetRef T) |
Returns if the target has a JIT. | |
LLVMBool | LLVMTargetHasTargetMachine (LLVMTargetRef T) |
Returns if the target has a TargetMachine associated. | |
LLVMBool | LLVMTargetHasAsmBackend (LLVMTargetRef T) |
Returns if the target as an ASM backend (required for emitting output) | |
LLVMTargetMachineRef | LLVMCreateTargetMachine (LLVMTargetRef T, const char *Triple, const char *CPU, const char *Features, LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, LLVMCodeModel CodeModel) |
Creates a new llvm::TargetMachine. | |
void | LLVMDisposeTargetMachine (LLVMTargetMachineRef T) |
Dispose the LLVMTargetMachineRef instance generated by LLVMCreateTargetMachine. | |
LLVMTargetRef | LLVMGetTargetMachineTarget (LLVMTargetMachineRef T) |
Returns the Target used in a TargetMachine. | |
char * | LLVMGetTargetMachineTriple (LLVMTargetMachineRef T) |
Returns the triple used creating this target machine. | |
char * | LLVMGetTargetMachineCPU (LLVMTargetMachineRef T) |
Returns the cpu used creating this target machine. | |
char * | LLVMGetTargetMachineFeatureString (LLVMTargetMachineRef T) |
Returns the feature string used creating this target machine. | |
LLVMTargetDataRef | LLVMCreateTargetDataLayout (LLVMTargetMachineRef T) |
Create a DataLayout based on the targetMachine. | |
void | LLVMSetTargetMachineAsmVerbosity (LLVMTargetMachineRef T, LLVMBool VerboseAsm) |
Set the target machine's ASM verbosity. | |
LLVMBool | LLVMTargetMachineEmitToFile (LLVMTargetMachineRef T, LLVMModuleRef M, const char *Filename, LLVMCodeGenFileType codegen, char **ErrorMessage) |
Emits an asm or object file for the given module to the filename. | |
LLVMBool | LLVMTargetMachineEmitToMemoryBuffer (LLVMTargetMachineRef T, LLVMModuleRef M, LLVMCodeGenFileType codegen, char **ErrorMessage, LLVMMemoryBufferRef *OutMemBuf) |
Compile the LLVM IR stored in M and store the result in OutMemBuf . | |
char * | LLVMGetDefaultTargetTriple (void) |
Get a triple for the host machine as a string. | |
char * | LLVMNormalizeTargetTriple (const char *triple) |
Normalize a target triple. | |
char * | LLVMGetHostCPUName (void) |
Get the host CPU as a string. | |
char * | LLVMGetHostCPUFeatures (void) |
Get the host CPU's features as a string. | |
void | LLVMAddAnalysisPasses (LLVMTargetMachineRef T, LLVMPassManagerRef PM) |
Adds the target-specific analysis passes to the pass manager. | |
#define LLVM_ASM_PARSER | ( | TargetName | ) | void LLVMInitialize##TargetName##AsmParser(void); |
#define LLVM_ASM_PARSER | ( | TargetName | ) | LLVMInitialize##TargetName##AsmParser(); |
#define LLVM_ASM_PRINTER | ( | TargetName | ) | void LLVMInitialize##TargetName##AsmPrinter(void); |
#define LLVM_ASM_PRINTER | ( | TargetName | ) | LLVMInitialize##TargetName##AsmPrinter(); |
#define LLVM_DISASSEMBLER | ( | TargetName | ) | void LLVMInitialize##TargetName##Disassembler(void); |
#define LLVM_DISASSEMBLER | ( | TargetName | ) | LLVMInitialize##TargetName##Disassembler(); |
#define LLVM_TARGET | ( | TargetName | ) | void LLVMInitialize##TargetName##TargetInfo(void); |
#define LLVM_TARGET | ( | TargetName | ) | void LLVMInitialize##TargetName##Target(void); |
#define LLVM_TARGET | ( | TargetName | ) | void LLVMInitialize##TargetName##TargetMC(void); |
#define LLVM_TARGET | ( | TargetName | ) | LLVMInitialize##TargetName##TargetInfo(); |
#define LLVM_TARGET | ( | TargetName | ) | LLVMInitialize##TargetName##Target(); |
#define LLVM_TARGET | ( | TargetName | ) | LLVMInitialize##TargetName##TargetMC(); |
typedef struct LLVMOpaqueTargetData* LLVMTargetDataRef |
typedef struct LLVMOpaqueTargetLibraryInfotData* LLVMTargetLibraryInfoRef |
typedef struct LLVMOpaqueTargetMachine* LLVMTargetMachineRef |
Definition at line 34 of file TargetMachine.h.
typedef struct LLVMTarget* LLVMTargetRef |
Definition at line 35 of file TargetMachine.h.
enum LLVMByteOrdering |
enum LLVMCodeGenFileType |
Enumerator | |
---|---|
LLVMAssemblyFile | |
LLVMObjectFile |
Definition at line 64 of file TargetMachine.h.
enum LLVMCodeGenOptLevel |
Enumerator | |
---|---|
LLVMCodeGenLevelNone | |
LLVMCodeGenLevelLess | |
LLVMCodeGenLevelDefault | |
LLVMCodeGenLevelAggressive |
Definition at line 37 of file TargetMachine.h.
enum LLVMCodeModel |
Enumerator | |
---|---|
LLVMCodeModelDefault | |
LLVMCodeModelJITDefault | |
LLVMCodeModelTiny | |
LLVMCodeModelSmall | |
LLVMCodeModelKernel | |
LLVMCodeModelMedium | |
LLVMCodeModelLarge |
Definition at line 54 of file TargetMachine.h.
enum LLVMRelocMode |
Enumerator | |
---|---|
LLVMRelocDefault | |
LLVMRelocStatic | |
LLVMRelocPIC | |
LLVMRelocDynamicNoPic | |
LLVMRelocROPI | |
LLVMRelocRWPI | |
LLVMRelocROPI_RWPI |
Definition at line 44 of file TargetMachine.h.
unsigned LLVMABIAlignmentOfType | ( | LLVMTargetDataRef | TD, |
LLVMTypeRef | Ty | ||
) |
Computes the ABI alignment of a type in bytes for a target.
See the method llvm::DataLayout::getTypeABISize.
Definition at line 108 of file Target.cpp.
References unwrap().
unsigned long long LLVMABISizeOfType | ( | LLVMTargetDataRef | TD, |
LLVMTypeRef | Ty | ||
) |
Computes the ABI size of a type in bytes for a target.
See the method llvm::DataLayout::getTypeAllocSize.
Definition at line 104 of file Target.cpp.
References unwrap().
void LLVMAddAnalysisPasses | ( | LLVMTargetMachineRef | T, |
LLVMPassManagerRef | PM | ||
) |
Adds the target-specific analysis passes to the pass manager.
Definition at line 267 of file TargetMachineC.cpp.
References llvm::createTargetTransformInfoWrapperPass(), and unwrap().
void LLVMAddTargetLibraryInfo | ( | LLVMTargetLibraryInfoRef | TLI, |
LLVMPassManagerRef | PM | ||
) |
Adds target library information to a pass manager.
This does not take ownership of the target library info. See the method llvm::PassManagerBase::add.
Definition at line 58 of file Target.cpp.
References unwrap().
enum LLVMByteOrdering LLVMByteOrder | ( | LLVMTargetDataRef | TD | ) |
Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian.
See the method llvm::DataLayout::isLittleEndian.
Definition at line 68 of file Target.cpp.
References LLVMBigEndian, LLVMLittleEndian, and unwrap().
unsigned LLVMCallFrameAlignmentOfType | ( | LLVMTargetDataRef | TD, |
LLVMTypeRef | Ty | ||
) |
Computes the call frame alignment of a type in bytes for a target.
See the method llvm::DataLayout::getTypeABISize.
Definition at line 112 of file Target.cpp.
References unwrap().
char * LLVMCopyStringRepOfTargetData | ( | LLVMTargetDataRef | TD | ) |
Converts target data to a target layout string.
The string must be disposed with LLVMDisposeMessage. See the constructor llvm::DataLayout::DataLayout.
Definition at line 63 of file Target.cpp.
References unwrap().
LLVMTargetDataRef LLVMCreateTargetData | ( | const char * | StringRep | ) |
Creates target data from a target layout string.
See the constructor llvm::DataLayout::DataLayout.
Definition at line 50 of file Target.cpp.
References wrap().
LLVMTargetDataRef LLVMCreateTargetDataLayout | ( | LLVMTargetMachineRef | T | ) |
Create a DataLayout based on the targetMachine.
Definition at line 178 of file TargetMachineC.cpp.
LLVMTargetMachineRef LLVMCreateTargetMachine | ( | LLVMTargetRef | T, |
const char * | Triple, | ||
const char * | CPU, | ||
const char * | Features, | ||
LLVMCodeGenOptLevel | Level, | ||
LLVMRelocMode | Reloc, | ||
LLVMCodeModel | CodeModel | ||
) |
Creates a new llvm::TargetMachine.
See llvm::Target::createTargetMachine
Definition at line 99 of file TargetMachineC.cpp.
References llvm::CodeGenOpt::Aggressive, createTargetMachine(), llvm::CodeGenOpt::Default, llvm::Reloc::DynamicNoPIC, llvm::CodeGenOpt::Less, LLVMCodeGenLevelAggressive, LLVMCodeGenLevelLess, LLVMCodeGenLevelNone, LLVMRelocDynamicNoPic, LLVMRelocPIC, LLVMRelocROPI, LLVMRelocROPI_RWPI, LLVMRelocRWPI, LLVMRelocStatic, llvm::CodeGenOpt::None, opt, llvm::Reloc::PIC_, llvm::Reloc::ROPI, llvm::Reloc::ROPI_RWPI, llvm::Reloc::RWPI, llvm::Reloc::Static, unwrap(), and wrap().
void LLVMDisposeTargetData | ( | LLVMTargetDataRef | TD | ) |
Deallocates a TargetData.
See the destructor llvm::DataLayout::~DataLayout.
Definition at line 54 of file Target.cpp.
References unwrap().
void LLVMDisposeTargetMachine | ( | LLVMTargetMachineRef | T | ) |
Dispose the LLVMTargetMachineRef instance generated by LLVMCreateTargetMachine.
Definition at line 151 of file TargetMachineC.cpp.
References unwrap().
Referenced by LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine().
unsigned LLVMElementAtOffset | ( | LLVMTargetDataRef | TD, |
LLVMTypeRef | StructTy, | ||
unsigned long long | Offset | ||
) |
Computes the structure element that contains the byte offset for a target.
See the method llvm::StructLayout::getElementContainingOffset.
Definition at line 127 of file Target.cpp.
References llvm::Offset, and unwrap().
char * LLVMGetDefaultTargetTriple | ( | void | ) |
Get a triple for the host machine as a string.
The result needs to be disposed with LLVMDisposeMessage.
Definition at line 244 of file TargetMachineC.cpp.
References llvm::c_str(), and llvm::sys::getDefaultTargetTriple().
LLVMTargetRef LLVMGetFirstTarget | ( | void | ) |
Returns the first llvm::Target in the registered targets list.
Definition at line 44 of file TargetMachineC.cpp.
References llvm::TargetRegistry::targets(), and wrap().
char * LLVMGetHostCPUFeatures | ( | void | ) |
Get the host CPU's features as a string.
The result needs to be disposed with LLVMDisposeMessage.
Definition at line 256 of file TargetMachineC.cpp.
References llvm::SubtargetFeatures::AddFeature(), llvm::sys::getHostCPUFeatures(), and llvm::SubtargetFeatures::getString().
char * LLVMGetHostCPUName | ( | void | ) |
Get the host CPU as a string.
The result needs to be disposed with LLVMDisposeMessage.
Definition at line 252 of file TargetMachineC.cpp.
References llvm::sys::getHostCPUName().
LLVMTargetDataRef LLVMGetModuleDataLayout | ( | LLVMModuleRef | M | ) |
Obtain the data layout for a module.
Definition at line 42 of file Target.cpp.
LLVMTargetRef LLVMGetNextTarget | ( | LLVMTargetRef | T | ) |
Returns the next llvm::Target given a previous one (or null if there's none)
Definition at line 52 of file TargetMachineC.cpp.
const char * LLVMGetTargetDescription | ( | LLVMTargetRef | T | ) |
Returns the description of a target.
See llvm::Target::getDescription
Definition at line 83 of file TargetMachineC.cpp.
References unwrap().
LLVMTargetRef LLVMGetTargetFromName | ( | const char * | Name | ) |
Finds the target corresponding to the given name and stores it in T
.
Returns 0 on success.
Definition at line 56 of file TargetMachineC.cpp.
References llvm::find_if(), I, Name, llvm::TargetRegistry::targets(), and wrap().
LLVMBool LLVMGetTargetFromTriple | ( | const char * | Triple, |
LLVMTargetRef * | T, | ||
char ** | ErrorMessage | ||
) |
Finds the target corresponding to the given triple and stores it in T
.
Returns 0 on success. Optionally returns any error in ErrorMessage. Use LLVMDisposeMessage to dispose the message.
Definition at line 63 of file TargetMachineC.cpp.
References llvm::TargetRegistry::lookupTarget(), and wrap().
char * LLVMGetTargetMachineCPU | ( | LLVMTargetMachineRef | T | ) |
Returns the cpu used creating this target machine.
See llvm::TargetMachine::getCPU. The result needs to be disposed with LLVMDisposeMessage.
Definition at line 163 of file TargetMachineC.cpp.
References unwrap().
char * LLVMGetTargetMachineFeatureString | ( | LLVMTargetMachineRef | T | ) |
Returns the feature string used creating this target machine.
See llvm::TargetMachine::getFeatureString. The result needs to be disposed with LLVMDisposeMessage.
Definition at line 168 of file TargetMachineC.cpp.
References unwrap().
LLVMTargetRef LLVMGetTargetMachineTarget | ( | LLVMTargetMachineRef | T | ) |
Returns the Target used in a TargetMachine.
Definition at line 153 of file TargetMachineC.cpp.
References llvm::TargetMachine::getTarget(), unwrap(), and wrap().
char * LLVMGetTargetMachineTriple | ( | LLVMTargetMachineRef | T | ) |
Returns the triple used creating this target machine.
See llvm::TargetMachine::getTriple. The result needs to be disposed with LLVMDisposeMessage.
Definition at line 158 of file TargetMachineC.cpp.
References llvm::TargetMachine::getTargetTriple(), llvm::Triple::str(), and unwrap().
const char * LLVMGetTargetName | ( | LLVMTargetRef | T | ) |
Returns the name of a target.
Definition at line 79 of file TargetMachineC.cpp.
References unwrap().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
LLVMTypeRef LLVMIntPtrType | ( | LLVMTargetDataRef | TD | ) |
Returns the integer type that is the same size as a pointer on a target.
See the method llvm::DataLayout::getIntPtrType.
Definition at line 80 of file Target.cpp.
References LLVMGetGlobalContext(), unwrap(), and wrap().
LLVMTypeRef LLVMIntPtrTypeForAS | ( | LLVMTargetDataRef | TD, |
unsigned | AS | ||
) |
Returns the integer type that is the same size as a pointer on a target.
This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType.
Definition at line 84 of file Target.cpp.
References LLVMGetGlobalContext(), unwrap(), and wrap().
LLVMTypeRef LLVMIntPtrTypeForASInContext | ( | LLVMContextRef | C, |
LLVMTargetDataRef | TD, | ||
unsigned | AS | ||
) |
Returns the integer type that is the same size as a pointer on a target.
This version allows the address space to be specified. See the method llvm::DataLayout::getIntPtrType.
Definition at line 92 of file Target.cpp.
References llvm::CallingConv::C, unwrap(), and wrap().
LLVMTypeRef LLVMIntPtrTypeInContext | ( | LLVMContextRef | C, |
LLVMTargetDataRef | TD | ||
) |
Returns the integer type that is the same size as a pointer on a target.
See the method llvm::DataLayout::getIntPtrType.
Definition at line 88 of file Target.cpp.
References llvm::CallingConv::C, unwrap(), and wrap().
Normalize a target triple.
The result needs to be disposed with LLVMDisposeMessage.
Definition at line 248 of file TargetMachineC.cpp.
References llvm::c_str(), and llvm::Triple::normalize().
unsigned long long LLVMOffsetOfElement | ( | LLVMTargetDataRef | TD, |
LLVMTypeRef | StructTy, | ||
unsigned | Element | ||
) |
Computes the byte offset of the indexed struct element for a target.
See the method llvm::StructLayout::getElementContainingOffset.
Definition at line 133 of file Target.cpp.
References unwrap().
unsigned LLVMPointerSize | ( | LLVMTargetDataRef | TD | ) |
Returns the pointer size in bytes for a target.
See the method llvm::DataLayout::getPointerSize.
Definition at line 72 of file Target.cpp.
References unwrap().
unsigned LLVMPointerSizeForAS | ( | LLVMTargetDataRef | TD, |
unsigned | AS | ||
) |
Returns the pointer size in bytes for a target for a specified address space.
See the method llvm::DataLayout::getPointerSize.
Definition at line 76 of file Target.cpp.
References unwrap().
unsigned LLVMPreferredAlignmentOfGlobal | ( | LLVMTargetDataRef | TD, |
LLVMValueRef | GlobalVar | ||
) |
Computes the preferred alignment of a global variable in bytes for a target.
See the method llvm::DataLayout::getPreferredAlignment.
Definition at line 120 of file Target.cpp.
References unwrap().
unsigned LLVMPreferredAlignmentOfType | ( | LLVMTargetDataRef | TD, |
LLVMTypeRef | Ty | ||
) |
Computes the preferred alignment of a type in bytes for a target.
See the method llvm::DataLayout::getTypeABISize.
Definition at line 116 of file Target.cpp.
References unwrap().
void LLVMSetModuleDataLayout | ( | LLVMModuleRef | M, |
LLVMTargetDataRef | DL | ||
) |
Set the data layout for a module.
Definition at line 46 of file Target.cpp.
void LLVMSetTargetMachineAsmVerbosity | ( | LLVMTargetMachineRef | T, |
LLVMBool | VerboseAsm | ||
) |
Set the target machine's ASM verbosity.
Definition at line 173 of file TargetMachineC.cpp.
References llvm::MCTargetOptions::AsmVerbose, llvm::TargetOptions::MCOptions, llvm::TargetMachine::Options, and unwrap().
unsigned long long LLVMSizeOfTypeInBits | ( | LLVMTargetDataRef | TD, |
LLVMTypeRef | Ty | ||
) |
Computes the size of a type in bytes for a target.
See the method llvm::DataLayout::getTypeSizeInBits.
Definition at line 96 of file Target.cpp.
References unwrap().
unsigned long long LLVMStoreSizeOfType | ( | LLVMTargetDataRef | TD, |
LLVMTypeRef | Ty | ||
) |
Computes the storage size of a type in bytes for a target.
See the method llvm::DataLayout::getTypeStoreSize.
Definition at line 100 of file Target.cpp.
References unwrap().
LLVMBool LLVMTargetHasAsmBackend | ( | LLVMTargetRef | T | ) |
Returns if the target as an ASM backend (required for emitting output)
Definition at line 95 of file TargetMachineC.cpp.
References unwrap().
LLVMBool LLVMTargetHasJIT | ( | LLVMTargetRef | T | ) |
Returns if the target has a JIT.
Definition at line 87 of file TargetMachineC.cpp.
References unwrap().
LLVMBool LLVMTargetHasTargetMachine | ( | LLVMTargetRef | T | ) |
Returns if the target has a TargetMachine associated.
Definition at line 91 of file TargetMachineC.cpp.
References unwrap().
LLVMBool LLVMTargetMachineEmitToFile | ( | LLVMTargetMachineRef | T, |
LLVMModuleRef | M, | ||
const char * | Filename, | ||
LLVMCodeGenFileType | codegen, | ||
char ** | ErrorMessage | ||
) |
Emits an asm or object file for the given module to the filename.
This wraps several c++ only classes (among them a file stream). Returns any error in ErrorMessage. Use LLVMDisposeMessage to dispose the message.
Definition at line 216 of file TargetMachineC.cpp.
References llvm::raw_ostream::flush(), LLVMTargetMachineEmit(), and llvm::sys::fs::OF_None.
LLVMBool LLVMTargetMachineEmitToMemoryBuffer | ( | LLVMTargetMachineRef | T, |
LLVMModuleRef | M, | ||
LLVMCodeGenFileType | codegen, | ||
char ** | ErrorMessage, | ||
LLVMMemoryBufferRef * | OutMemBuf | ||
) |
Compile the LLVM IR stored in M
and store the result in OutMemBuf
.
Definition at line 231 of file TargetMachineC.cpp.
References llvm::Data, LLVMCreateMemoryBufferWithMemoryRangeCopy(), LLVMTargetMachineEmit(), and llvm::raw_svector_ostream::str().