I'm having an issue with the below modules.
I build module X, then module Y (which has a dependency on X). I've
added an external declaration on module Y of the functions defined in
i also link the except-handling module, but i think it is peripheral
to the issue
i like all the modules together in a single module called
executableModule. I link them with the method:
Linker::LinkModules(executableModule , moduleToLink,
llvm::verifyModule(* executableModule, llvm::AbortProcessAction, &err);
which doesn't seem to find anything wrong with the linked module.
then i proceed to create the executionEngine:
llvmEngine = eB.create();
which seems to go well, but as soon as i run:
llvm::Function* foo2 = moduleX->getFunction("foo2");
i get the error:
LLVM ERROR: Program used external function 'foo' which could not be resolved!
Any idea what is wrong? i thought linking those modules together in a
single module would solve this problem.
I've attached all the .ll files for the modules involved
except-handling.ll (740 Bytes)
executableModule.ll (1.51 KB)
X.ll (355 Bytes)
Y.ll (512 Bytes)