Displaying 1 result from an estimated 1 matches for "getmoduleinlineasm".
Did you mean:
setmoduleinlineasm
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->getFunctionList().push_back(F...