[cfe-dev] Call external (non-JIT) function from JIT

Eli Friedman eli.friedman at gmail.com
Tue Jul 13 14:20:21 PDT 2010


On Tue, Jul 13, 2010 at 1:56 PM, Frank Fuchs <fk.fuchs at googlemail.com> wrote:
> I'm not sure how to interpret this ... but the "known1" seems to be the
> mapped function, while "known" is the extern "C" declared one (checked that
> by renaming "known" in test.cpp). ... End of knowledge :)

Right... I think using getOrInsertFunction instead of
llvm::Function::Create will solve the issue.  If you use
llvm::Function::Create with an already existing name, it will
automatically rename it to avoid the conflict; this is nice when you
don't care about the name, but not what you want here.

-Eli



More information about the cfe-dev mailing list