[LLVMdev] Using a function from another module

Garrison Venn gvenn.cfe.dev at gmail.com
Mon Jan 11 01:41:21 PST 2010


Cool! I wouldn't have believed it until I saw my test results.

Thanks for ed.

Garrison

On Jan 10, 2010, at 14:02, Kenneth Uildriks wrote:

> On Sun, Jan 10, 2010 at 12:38 PM, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote:
>> Won't passing llvm::Function* around vs strings (function names), also work, at code generation time,
>> without the need for a module A dec to module B impl. mapping?
>> 
>> Garrison
> 
> Nope.  You cannot place a call instruction into one module whose
> callee is a Function from another module.  You have to put a
> declaration into the same module, and have your call instruction call
> that.  And then they need to be linked together, either by llvm-link
> or (if JITting) by addGlobalMapping.





More information about the llvm-dev mailing list