search for: gp_module

Displaying 2 results from an estimated 2 matches for "gp_module".

2006 Nov 28
2
[LLVMdev] question about the LLVM JIT
...nderstand how global data mapping works in llvm. > The C++ code for add_global_mapping(...) looks like this > > --- C++ code... > void add_global_mapping(const char* name, void* address) { > GlobalVariable var(Type::IntTy, false, GlobalVariable::ExternalLinkage, > 0, name, gp_module); > gp_execution_engine->addGlobalMapping(&var, address); > } This is creating a new global variable on the stack, instead of finding the existing global variable in the module. Try something like this: gp_execution_engine->addGlobalMapping(YourModule->getNamedGlobal(na...
2006 Nov 29
0
[LLVMdev] question about the LLVM JIT
>> <snip>. >> void add_global_mapping(const char* name, void* address) { >> GlobalVariable var(Type::IntTy, false, >> GlobalVariable::ExternalLinkage, 0, name, gp_module); >> gp_execution_engine->addGlobalMapping(&var, address); >> } > > This is creating a new global variable on the stack, instead of > finding the existing global variable in the module. Try something > like this: > > gp_execution_engine->addGlobalMa...