search for: setmoduleinlineasm

Displaying 1 result from an estimated 1 matches for "setmoduleinlineasm".

Did you mean: getmoduleinlineasm
2018 Mar 22
1
How to extract functions from Module A and put them into Module B, and generate a new IR file?
...", "", llvm::sys::fs::F_None); llvm::Module *ModuleA = new llvm::Module("A", context); llvm::Module *ModuleB = new llvm::Module("B", context); ModuleA->setDataLayout(M.getDataLayout()); ModuleA-->setTargetTriple(M.getTargetTriple()); ModuleA-->setModuleInlineAsm(M.getModuleInlineAsm()); ModuleB-->setDataLayout(M.getDataLayout()); ModuleB-->setTargetTriple(M.getTargetTriple()); ModuleB-->setModuleInlineAsm(M.getModuleInlineAsm()); for (Function &F : M) { if (F.getName() == "My Criterion") ModuleA->getFunct...