search for: get5function

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

2007 Jun 07
2
[LLVMdev] How to call native functions from bytecode run in JIT?
...t;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->getFunction("get5"); if( func == NULL ) { std::cout << "registered native function no...
2007 Jun 10
0
[LLVMdev] How to call native functions from bytecode run in JIT?
...ULL, 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->getFunction("get5"); > if( func == NULL ) { > std::cout <&lt...