LLVM API Documentation

Defines | Typedefs | Enumerations | Functions
Target information
LLVM-C: C interface to LLVM
Collaboration diagram for Target information:

Defines

#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

Enumerations

enum  LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian }

Functions

static void LLVMInitializeAllTargetInfos (void)
static void LLVMInitializeAllTargets (void)
static void LLVMInitializeAllTargetMCs (void)
static void LLVMInitializeAllAsmPrinters (void)
static void LLVMInitializeAllAsmParsers (void)
static void LLVMInitializeAllDisassemblers (void)
static LLVMBool LLVMInitializeNativeTarget (void)
static LLVMBool LLVMInitializeNativeAsmParser (void)
static LLVMBool LLVMInitializeNativeAsmPrinter (void)
static LLVMBool LLVMInitializeNativeDisassembler (void)
LLVMTargetDataRef LLVMCreateTargetData (const char *StringRep)
void LLVMAddTargetData (LLVMTargetDataRef TD, LLVMPassManagerRef PM)
void LLVMAddTargetLibraryInfo (LLVMTargetLibraryInfoRef TLI, LLVMPassManagerRef PM)
char * LLVMCopyStringRepOfTargetData (LLVMTargetDataRef TD)
enum LLVMByteOrdering LLVMByteOrder (LLVMTargetDataRef TD)
unsigned LLVMPointerSize (LLVMTargetDataRef TD)
unsigned LLVMPointerSizeForAS (LLVMTargetDataRef TD, unsigned AS)
LLVMTypeRef LLVMIntPtrType (LLVMTargetDataRef TD)
LLVMTypeRef LLVMIntPtrTypeForAS (LLVMTargetDataRef TD, unsigned AS)
LLVMTypeRef LLVMIntPtrTypeInContext (LLVMContextRef C, LLVMTargetDataRef TD)
LLVMTypeRef LLVMIntPtrTypeForASInContext (LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS)
unsigned long long LLVMSizeOfTypeInBits (LLVMTargetDataRef TD, LLVMTypeRef Ty)
unsigned long long LLVMStoreSizeOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
unsigned long long LLVMABISizeOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
unsigned LLVMABIAlignmentOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
unsigned LLVMCallFrameAlignmentOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
unsigned LLVMPreferredAlignmentOfType (LLVMTargetDataRef TD, LLVMTypeRef Ty)
unsigned LLVMPreferredAlignmentOfGlobal (LLVMTargetDataRef TD, LLVMValueRef GlobalVar)
unsigned LLVMElementAtOffset (LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset)
unsigned long long LLVMOffsetOfElement (LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned Element)
void LLVMDisposeTargetData (LLVMTargetDataRef TD)

Define Documentation

#define LLVM_ASM_PARSER (   TargetName)    void LLVMInitialize##TargetName##AsmParser(void);

Definition at line 67 of file Target.h.

#define LLVM_ASM_PARSER (   TargetName)    LLVMInitialize##TargetName##AsmParser();

Definition at line 67 of file Target.h.

#define LLVM_ASM_PRINTER (   TargetName)    void LLVMInitialize##TargetName##AsmPrinter(void);

Definition at line 61 of file Target.h.

#define LLVM_ASM_PRINTER (   TargetName)    LLVMInitialize##TargetName##AsmPrinter();

Definition at line 61 of file Target.h.

#define LLVM_DISASSEMBLER (   TargetName)    void LLVMInitialize##TargetName##Disassembler(void);

Definition at line 73 of file Target.h.

#define LLVM_DISASSEMBLER (   TargetName)    LLVMInitialize##TargetName##Disassembler();

Definition at line 73 of file Target.h.

#define LLVM_TARGET (   TargetName)    void LLVMInitialize##TargetName##TargetInfo(void);

Definition at line 55 of file Target.h.

#define LLVM_TARGET (   TargetName)    void LLVMInitialize##TargetName##Target(void);

Definition at line 55 of file Target.h.

#define LLVM_TARGET (   TargetName)    void LLVMInitialize##TargetName##TargetMC(void);

Definition at line 55 of file Target.h.

#define LLVM_TARGET (   TargetName)    LLVMInitialize##TargetName##TargetInfo();

Definition at line 55 of file Target.h.

#define LLVM_TARGET (   TargetName)    LLVMInitialize##TargetName##Target();

Definition at line 55 of file Target.h.

#define LLVM_TARGET (   TargetName)    LLVMInitialize##TargetName##TargetMC();

Definition at line 55 of file Target.h.


Typedef Documentation

typedef struct LLVMOpaqueTargetData* LLVMTargetDataRef

Definition at line 42 of file Target.h.

typedef struct LLVMOpaqueTargetLibraryInfotData* LLVMTargetLibraryInfoRef

Definition at line 43 of file Target.h.


Enumeration Type Documentation

Enumerator:
LLVMBigEndian 
LLVMLittleEndian 

Definition at line 40 of file Target.h.


Function Documentation

Computes the ABI alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize.

Definition at line 105 of file Target.cpp.

References llvm::DataLayout::getABITypeAlignment(), and llvm::unwrap().

Computes the ABI size of a type in bytes for a target. See the method llvm::DataLayout::getTypeAllocSize.

Definition at line 101 of file Target.cpp.

References llvm::DataLayout::getTypeAllocSize(), and llvm::unwrap().

Adds target data information to a pass manager. This does not take ownership of the target data. See the method llvm::PassManagerBase::add.

Definition at line 49 of file Target.cpp.

References llvm::unwrap().

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 55 of file Target.cpp.

References llvm::unwrap().

Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian. See the method llvm::DataLayout::isLittleEndian.

Definition at line 65 of file Target.cpp.

References llvm::DataLayout::isLittleEndian(), LLVMBigEndian, LLVMLittleEndian, and llvm::unwrap().

Computes the call frame alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize.

Definition at line 109 of file Target.cpp.

References llvm::DataLayout::getABITypeAlignment(), and llvm::unwrap().

Converts target data to a target layout string. The string must be disposed with LLVMDisposeMessage. See the constructor llvm::DataLayout::DataLayout.

Definition at line 60 of file Target.cpp.

References llvm::DataLayout::getStringRepresentation(), llvm::LibFunc::strdup, and llvm::unwrap().

Creates target data from a target layout string. See the constructor llvm::DataLayout::DataLayout.

Definition at line 45 of file Target.cpp.

References llvm::wrap().

Deallocates a TargetData. See the destructor llvm::DataLayout::~DataLayout.

Definition at line 134 of file Target.cpp.

References llvm::unwrap().

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 122 of file Target.cpp.

References llvm::StructLayout::getElementContainingOffset(), llvm::DataLayout::getStructLayout(), and llvm::unwrap().

static void LLVMInitializeAllAsmParsers ( void  ) [inline, static]

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.

Definition at line 117 of file Target.h.

static void LLVMInitializeAllAsmPrinters ( void  ) [inline, static]

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.

Definition at line 108 of file Target.h.

static void LLVMInitializeAllDisassemblers ( void  ) [inline, static]

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.

Definition at line 126 of file Target.h.

static void LLVMInitializeAllTargetInfos ( void  ) [inline, static]

LLVMInitializeAllTargetInfos - The main program should call this function if it wants access to all available targets that LLVM is configured to support.

Definition at line 81 of file Target.h.

static void LLVMInitializeAllTargetMCs ( void  ) [inline, static]

LLVMInitializeAllTargetMCs - The main program should call this function if it wants access to all available target MC that LLVM is configured to support.

Definition at line 99 of file Target.h.

static void LLVMInitializeAllTargets ( void  ) [inline, static]

LLVMInitializeAllTargets - The main program should call this function if it wants to link in all available targets that LLVM is configured to support.

Definition at line 90 of file Target.h.

static LLVMBool LLVMInitializeNativeAsmParser ( void  ) [inline, static]

LLVMInitializeNativeTargetAsmParser - The main program should call this function to initialize the parser for the native target corresponding to the host.

Definition at line 151 of file Target.h.

References LLVM_NATIVE_ASMPARSER.

static LLVMBool LLVMInitializeNativeAsmPrinter ( void  ) [inline, static]

LLVMInitializeNativeTargetAsmPrinter - The main program should call this function to initialize the printer for the native target corresponding to the host.

Definition at line 163 of file Target.h.

References LLVM_NATIVE_ASMPRINTER.

static LLVMBool LLVMInitializeNativeDisassembler ( void  ) [inline, static]

LLVMInitializeNativeTargetDisassembler - The main program should call this function to initialize the disassembler for the native target corresponding to the host.

Definition at line 175 of file Target.h.

References LLVM_NATIVE_DISASSEMBLER.

static LLVMBool LLVMInitializeNativeTarget ( void  ) [inline, static]

LLVMInitializeNativeTarget - The main program should call this function to initialize the native target corresponding to the host. This is useful for JIT applications to ensure that the target gets linked in correctly.

Definition at line 136 of file Target.h.

References LLVM_NATIVE_TARGET, LLVM_NATIVE_TARGETINFO, and LLVM_NATIVE_TARGETMC.

Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType.

Definition at line 77 of file Target.cpp.

References llvm::getGlobalContext(), llvm::unwrap(), and llvm::wrap().

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 81 of file Target.cpp.

References llvm::getGlobalContext(), llvm::unwrap(), and llvm::wrap().

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 89 of file Target.cpp.

References llvm::unwrap(), and llvm::wrap().

Returns the integer type that is the same size as a pointer on a target. See the method llvm::DataLayout::getIntPtrType.

Definition at line 85 of file Target.cpp.

References llvm::unwrap(), and llvm::wrap().

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 128 of file Target.cpp.

References llvm::StructLayout::getElementOffset(), llvm::DataLayout::getStructLayout(), and llvm::unwrap().

Returns the pointer size in bytes for a target. See the method llvm::DataLayout::getPointerSize.

Definition at line 69 of file Target.cpp.

References llvm::DataLayout::getPointerSize(), and llvm::unwrap().

Returns the pointer size in bytes for a target for a specified address space. See the method llvm::DataLayout::getPointerSize.

Definition at line 73 of file Target.cpp.

References llvm::DataLayout::getPointerSize(), and llvm::unwrap().

Computes the preferred alignment of a global variable in bytes for a target. See the method llvm::DataLayout::getPreferredAlignment.

Definition at line 117 of file Target.cpp.

References llvm::DataLayout::getPreferredAlignment(), and llvm::unwrap().

Computes the preferred alignment of a type in bytes for a target. See the method llvm::DataLayout::getTypeABISize.

Definition at line 113 of file Target.cpp.

References llvm::DataLayout::getPrefTypeAlignment(), and llvm::unwrap().

Computes the size of a type in bytes for a target. See the method llvm::DataLayout::getTypeSizeInBits.

Definition at line 93 of file Target.cpp.

References llvm::DataLayout::getTypeSizeInBits(), and llvm::unwrap().

Computes the storage size of a type in bytes for a target. See the method llvm::DataLayout::getTypeStoreSize.

Definition at line 97 of file Target.cpp.

References llvm::DataLayout::getTypeStoreSize(), and llvm::unwrap().