[LLVMdev] Calling between modules

Bill Wendling isanbard at gmail.com
Tue Jan 15 01:32:19 PST 2008


Hi!

> I am fairly new to LLVM development.

Welcome!

> Currently I am trying to treat LLVM modules almost like ".o" files  
> in a "normal" development environment, and then calling functions  
> in one module from another module.  Is this possible?
>
Yes! In fact, that's close to what modules are in LLVM. If you want  
to call a function outside of a .o file, then you have an external  
declaration of that function in the module, and then call it like  
normal. You link the .o files like normal to create the final  
executable.

> Basically, I want self contained chunks of code with dependencies  
> on functions in other self contained chunks that get resolved at  
> JIT time.  I figured since the ExecutionEngine has an  
> "addModuleProvider" function, this sort of behavior is supported.   
> If not, what is addModuleProvider's intended use?
>
> When I can get LLVM to do what I want, it is truly incredible!   
> Thanks for a great project!
>
> Aaron
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list