[LLVMdev] clang: call extern function using JIT

gafferuk gafferuk at gmail.com
Wed Aug 18 06:35:58 PDT 2010


I tried what you said, now I get:

LLVM ERROR: Program used external function 'yipee' which could not be
resolved!
Stack dump:
0.      Running pass 'X86 Machine Code Emitter' on function '@main'

did not even get as far as a breakpoint.


Óscar Fuentes wrote:
> 
> gafferuk <gafferuk at gmail.com> writes:
> 
>> Im confused. The function i wish to call is a return type of int.
>> Im calling it with int dd = yipee(1);
>>
>> What's wrong?
> 
> Declare the function:
> 
> int yipee(int);
> int main()
> {
>     int dd = yipee(1);
> 
>     return 0;
> }
> 
> 
> If that still crashes, put a breakpoint on `yipee' and see if the
> execution gets there, if the argument is right, if the crash happens
> inside the function or after it returns...
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 

-- 
View this message in context: http://old.nabble.com/clang%3A-call-extern-function-using-JIT-tp29449300p29471312.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.





More information about the llvm-dev mailing list