In r172749 you removed the Linker::LinkInFiles() function and mentioned
in the commit message that users of this function should migrate to
"platform-specific linker-integrated LTO mechanisms, or the forthcoming
LLVM linker."
From the context I am assuming you are in a JIT context, so the comments
about using a platform specific LTO mechanism don't apply.
Were you using this code to extract bitcode files from archives, or just to
link in an individual bitcode file?
Hi Daniel,
I was using this code to link an individual bitcode file. I would
compile and OpenCL C kernel to bitcode and then link it with an OpenCL C
builtin library which was also a bitcode file.
Looking at /tools/llvm-link/llvm-link.cpp may give you some ideas here. I havent looked at your specific use case, but llvm-link uses ParseIRFile to pull in a bitcode file and build a Module for it. You can then create a Composite using the Module * and call Linker::LinkModules(Composite.get(), NewModuleToLink.get()... to link a new Module to your Composite Module.
Looking at /tools/llvm-link/llvm-link.cpp may give you some ideas here. I havent looked at your specific use case, but llvm-link uses ParseIRFile to pull in a bitcode file and build a Module for it. You can then create a Composite using the Module * and call Linker::LinkModules(Composite.get(), NewModuleToLink.get()... to link a new Module to your Composite Module.