|
LLVM
4.0.0
|
Contexts are execution states for the core LLVM IR system. More...
Typedefs | |
| typedef void(* | LLVMDiagnosticHandler )(LLVMDiagnosticInfoRef, void *) |
| typedef void(* | LLVMYieldCallback )(LLVMContextRef, void *) |
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.
| typedef void(* LLVMDiagnosticHandler)(LLVMDiagnosticInfoRef, void *) |
| typedef void(* LLVMYieldCallback)(LLVMContextRef, void *) |
| 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 80 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 111 of file Core.cpp.
References llvm::unwrap().
| void* LLVMContextGetDiagnosticContext | ( | LLVMContextRef | C | ) |
Get the diagnostic context of this context.
Definition at line 100 of file Core.cpp.
References llvm::unwrap().
| LLVMDiagnosticHandler LLVMContextGetDiagnosticHandler | ( | LLVMContextRef | C | ) |
Get the diagnostic handler of this context.
Definition at line 95 of file Core.cpp.
References LLVM_EXTENSION, and llvm::unwrap().
| void LLVMContextSetDiagnosticHandler | ( | LLVMContextRef | C, |
| LLVMDiagnosticHandler | Handler, | ||
| void * | DiagnosticContext | ||
| ) |
Set the diagnostic handler for this context.
Definition at line 86 of file Core.cpp.
References LLVM_EXTENSION, and llvm::unwrap().
| void LLVMContextSetYieldCallback | ( | LLVMContextRef | C, |
| LLVMYieldCallback | Callback, | ||
| void * | OpaqueHandle | ||
| ) |
Set the yield callback function for this context.
Definition at line 104 of file Core.cpp.
References LLVM_EXTENSION, and llvm::unwrap().
| LLVMAttributeRef LLVMCreateEnumAttribute | ( | LLVMContextRef | C, |
| unsigned | KindID, | ||
| uint64_t | Val | ||
| ) |
Create an enum attribute.
Definition at line 135 of file Core.cpp.
References llvm::Attribute::get(), llvm::unwrap(), and llvm::wrap().
| LLVMAttributeRef LLVMCreateStringAttribute | ( | LLVMContextRef | C, |
| const char * | K, | ||
| unsigned | KLength, | ||
| const char * | V, | ||
| unsigned | VLength | ||
| ) |
Create a string attribute.
Definition at line 151 of file Core.cpp.
References llvm::Attribute::get(), llvm::unwrap(), and llvm::wrap().
| char* LLVMGetDiagInfoDescription | ( | LLVMDiagnosticInfoRef | DI | ) |
Return a string representation of the DiagnosticInfo.
Use LLVMDisposeMessage to free the string.
Definition at line 181 of file Core.cpp.
References llvm::raw_ostream::flush(), LLVMCreateMessage(), and llvm::unwrap().
| LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity | ( | LLVMDiagnosticInfoRef | DI | ) |
Return an enum LLVMDiagnosticSeverity.
Definition at line 192 of file Core.cpp.
References llvm::DS_Note, llvm::DS_Remark, llvm::DS_Warning, LLVMDSError, LLVMDSNote, LLVMDSRemark, LLVMDSWarning, and llvm::unwrap().
| unsigned LLVMGetEnumAttributeKind | ( | LLVMAttributeRef | A | ) |
Get the unique id corresponding to the enum attribute passed as argument.
Definition at line 140 of file Core.cpp.
References llvm::Attribute::getKindAsEnum(), and llvm::unwrap().
Return an unique id given the name of a enum attribute, or 0 if no attribute by that name exists.
See http://llvm.org/docs/LangRef.html#parameter-attributes and http://llvm.org/docs/LangRef.html#function-attributes for the list of available attributes.
NB: Attribute names and/or id are subject to change without going through the C API deprecation cycle.
| uint64_t LLVMGetEnumAttributeValue | ( | LLVMAttributeRef | A | ) |
Get the enum attribute's value.
0 is returned if none exists.
Definition at line 144 of file Core.cpp.
References llvm::unwrap().
| LLVMContextRef LLVMGetGlobalContext | ( | void | ) |
Obtain the global context instance.
Definition at line 84 of file Core.cpp.
Referenced by LLVMGetBitcodeModule(), LLVMGetBitcodeModule2(), LLVMParseBitcode(), and LLVMParseBitcode2().
Definition at line 120 of file Core.cpp.
References LLVMGetGlobalContext(), and LLVMGetMDKindIDInContext().
| unsigned LLVMGetMDKindIDInContext | ( | LLVMContextRef | C, |
| const char * | Name, | ||
| unsigned | SLen | ||
| ) |
Definition at line 115 of file Core.cpp.
References llvm::unwrap().
Referenced by LLVMGetMDKindID().
| const char* LLVMGetStringAttributeKind | ( | LLVMAttributeRef | A, |
| unsigned * | Length | ||
| ) |
Get the string attribute's kind.
Definition at line 158 of file Core.cpp.
References llvm::Attribute::getKindAsString(), and llvm::unwrap().
| const char* LLVMGetStringAttributeValue | ( | LLVMAttributeRef | A, |
| unsigned * | Length | ||
| ) |
Get the string attribute's value.
Definition at line 165 of file Core.cpp.
References llvm::Attribute::getValueAsString(), and llvm::unwrap().
| LLVMBool LLVMIsEnumAttribute | ( | LLVMAttributeRef | A | ) |
Check for the different types of attributes.
Definition at line 172 of file Core.cpp.
References llvm::unwrap().
| LLVMBool LLVMIsStringAttribute | ( | LLVMAttributeRef | A | ) |
Definition at line 177 of file Core.cpp.
References llvm::Attribute::isStringAttribute(), and llvm::unwrap().
1.8.6