[LLVMdev] llvm-c headers: How to call external function?

F van der Meeren filip at code2develop.com
Thu Aug 12 09:16:55 PDT 2010


I have a question concerning llvm-c.
I have set up a function that needs to invoke an external method, in a other library. It has the following signature: void* NSFullUserName(void);
The void* can be replaced with a i8*, that far I was able to get, but when my call is invoked, the engine gives me the following message:

LLVM ERROR: Tried to execute an unknown external function: i8* ()* NSFullUserName

I have dumped the module (without the clutter):

declare i8* @NSFullUserName()

define i8* @MyFunction() {
  %myCall = call i8* @NSFullUserName()            ; <i8*> [#uses=1]
  ret i8* %myCall

Where am I going wrong here?

Thank you,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100812/bf15bafc/attachment.html>

More information about the llvm-dev mailing list