Displaying 2 results from an estimated 2 matches for "emptyarglist".
2007 Jun 07
2
[LLVMdev] How to call native functions from bytecode run in JIT?
...n Linux giving something like "tried to call
unknown function int* () get5". Calling module->getFunction("foo5")
does not return NULL, though. Some relevant code snippets:
// the native function
int get5() { return 5; }
// registering it
std::vector<const Type*> emptyArgList;
FunctionType* get5Type = FunctionType::get(Type::Int32Ty,
emptyArgList, false);
Function* get5Function = new Function(get5Type,
GlobalValue::ExternalLinkage, "get5", m);
EE->addGlobalMapping( get5Function, (void*)get5 );
// verifying it's existance
Function* func = m->get...
2007 Jun 10
0
[LLVMdev] How to call native functions from bytecode run in JIT?
...t; to call unknown function int* () get5". Calling module->getFunction
> ("foo5") does not return NULL, though. Some relevant code snippets:
>
> // the native function
>
> int get5() { return 5; }
>
> // registering it
>
> std::vector<const Type*> emptyArgList;
> FunctionType* get5Type = FunctionType::get(Type::Int32Ty,
> emptyArgList, false);
> Function* get5Function = new Function(get5Type,
> GlobalValue::ExternalLinkage, "get5", m);
> EE->addGlobalMapping( get5Function, (void*)get5 );
>
> // verifying it's exi...