[LLVMdev] Please help with LLVM C++ integration

Óscar Fuentes ofv at wanadoo.es
Tue Aug 19 14:22:52 PDT 2008


"kirill havok" <666khronos at gmail.com> writes:

> Hi Gordon,
> I wrote a small example, but while running I get an error("Tied to
> execute an unknown external function"), where I am wrong?

[snip]

This is the sort of code I have on my JIT LLVM generator:

 	Function *my_function = cast<Function>(M->getOrInsertFunction("foo",
         Type::Int32Ty, (Type *)0));
	EE->addGlobalMapping( my_function, (void*)&some_test_func );

It seems to me that Function::Create is not what you need :-)

-- 
Oscar




More information about the llvm-dev mailing list