LLVM API Documentation
![]() |
Functions | |
LLVMContextRef | LLVMContextCreate (void) |
LLVMContextRef | LLVMGetGlobalContext (void) |
void | LLVMContextDispose (LLVMContextRef C) |
unsigned | LLVMGetMDKindIDInContext (LLVMContextRef C, const char *Name, unsigned SLen) |
unsigned | LLVMGetMDKindID (const char *Name, unsigned SLen) |
Contexts are execution states for the core LLVM IR system.
Most types are tied to a context instance. Multiple contexts can exist simultaneously. A single context is not thread safe. However, different contexts can execute on different threads simultaneously.
LLVMContextRef LLVMContextCreate | ( | void | ) |
Create a new context.
Every call to this function should be paired with a call to LLVMContextDispose() or the context will leak memory.
Definition at line 72 of file Core.cpp.
References llvm::wrap().
void LLVMContextDispose | ( | LLVMContextRef | C | ) |
Destroy a context instance.
This should be called for every call to LLVMContextCreate() or memory will be leaked.
Definition at line 80 of file Core.cpp.
References llvm::unwrap().
LLVMContextRef LLVMGetGlobalContext | ( | void | ) |
Obtain the global context instance.
Definition at line 76 of file Core.cpp.
References llvm::getGlobalContext(), and llvm::wrap().
Referenced by LLVMAppendBasicBlock(), LLVMConstString(), LLVMConstStruct(), LLVMCreateBuilder(), LLVMDoubleType(), LLVMFloatType(), LLVMFP128Type(), LLVMGetBitcodeModule(), LLVMGetBitcodeModuleProvider(), LLVMGetMDKindID(), LLVMHalfType(), LLVMInsertBasicBlock(), LLVMInt16Type(), LLVMInt1Type(), LLVMInt32Type(), LLVMInt64Type(), LLVMInt8Type(), LLVMIntType(), LLVMLabelType(), LLVMMDNode(), LLVMMDString(), LLVMPPCFP128Type(), LLVMStructType(), LLVMVoidType(), LLVMX86FP80Type(), and LLVMX86MMXType().
Definition at line 89 of file Core.cpp.
References LLVMGetGlobalContext(), and LLVMGetMDKindIDInContext().
unsigned LLVMGetMDKindIDInContext | ( | LLVMContextRef | C, |
const char * | Name, | ||
unsigned | SLen | ||
) |
Definition at line 84 of file Core.cpp.
References llvm::LLVMContext::getMDKindID(), and llvm::unwrap().
Referenced by LLVMGetMDKindID().