Pass a module reference to CloneModule.

It can never be null and most callers were already using references or
std::unique_ptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325160 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2018-02-14 19:50:40 +00:00
parent 4fe1287be8
commit 22b7724fe3
10 changed files with 54 additions and 53 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ std::unique_ptr<Module>
BugDriver::deleteInstructionFromProgram(const Instruction *I,
unsigned Simplification) {
// FIXME, use vmap?
std::unique_ptr<Module> Clone = CloneModule(Program);
std::unique_ptr<Module> Clone = CloneModule(*Program);
const BasicBlock *PBB = I->getParent();
const Function *PF = PBB->getParent();
@@ -318,7 +318,7 @@ llvm::SplitFunctionsOutOfModule(Module *M, const std::vector<Function *> &F,
}
ValueToValueMapTy NewVMap;
std::unique_ptr<Module> New = CloneModule(M, NewVMap);
std::unique_ptr<Module> New = CloneModule(*M, NewVMap);
// Remove the Test functions from the Safe module
std::set<Function *> TestFunctions;