Displaying 1 result from an estimated 1 matches for "parsedmod".
Did you mean:
parsedmod2
2019 May 17
3
Copy Function from one LLVM IR file to another
...ass.
*1.* I created a function pass in which I extract a function using
"llvm-extract" from within the pass.
*2.* Then I read the (.ll) file created by the "llvm-extract" tool using:
SMDiagnostic Err;
LLVMContext Context;
std::unique_ptr<Module> ParsedMod(parseIRFile("add.ll", Err,
Context));
Module &M = dynamic_cast<Module&>(*ParsedMod);
Module* Mod_ptr = &M;
*3.* Then I read the (.ll) file into which I want to copy the function
using:
std::unique_ptr<Module> ParsedMod2(parseIRFile("s...