Displaying 1 result from an estimated 1 matches for "globa_context".
Did you mean:
global_context
2017 Feb 21
3
What is the proper usage of LLVMContext?
...eate a LLVMContext by myself? Or use `getGlobalContext()`?
Could you tell me what situation needs a LLVMContext which is created by
myself such as (A)?
(A)
{
llvm::LLVMContext my_context;
// codes using only my_context (get Int32ty() or StructType::create or
etc...)
}
(B)
{
llvm::LLVMContext &globa_context = llvm::getGlobalContext();
// codes using only globa_context (get Int32ty() or StructType::create or
etc...)
}
Q2) What situation do I need to create multiple `LLVMContext`s?
I don't know the situation used multiple `LLVMContext`s.
For example,
{
{
llvm::LLVMContext ctx1;
// some code
}
{...