Bill,
That is great to hear. I must be doing something wrong. When I try
to do this, I get ERROR: Program used external function
'myLinkedFunction' which could not be resolved!
Because of its brevity, I use getOrInsertFunction when I am creating
calls to the function in module A. I use new llvm::Function(type,
llvm::Function::ExternalLinkage, "myLinkedFunction", moduleB) when I
am defining the function with its body in module B. I then have an
ExecutionEngine which I constructed with an empty dummy module so that
I can use addModuleProvider and removeModuleProvider to link arbitrary
modules later. I call addModuleProvider with module A and module B
wrapped in ExistingModuleProviders, and call getPointerToFunction.
Any ideas? If there isn't anything obviously wrong here, I can boil
this down to a snippet that reproduces the problem. Thanks,
Aaron
Bill Wendling wrote: