[LLVMdev] How to place call(s) to functions found in other llvm modules ???

Eli Friedman eli.friedman at gmail.com
Wed Aug 31 10:18:05 PDT 2011


On Wed, Aug 31, 2011 at 10:00 AM, Mian M. Hamayun
<mian-muhammad.hamayun at imag.fr> wrote:
> Hello Everyone,
>
> I am trying to create two modules in LLVM, where first module contains the
> definition of a function, gcd in this example and another module contains a
> call to this function.

You can't reference a global in one module in another module.  Either
stick with one module, or add a declaration of the function in the
second module and call that.

-Eli



More information about the llvm-dev mailing list