From 6776064d190701c5bae4d5403939eed2e480d1cd Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sun, 27 Sep 2009 07:38:41 +0000 Subject: Instruction::clone does not need to take an LLVMContext&. Remove that and update all the callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82889 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/CloneFunction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Transforms/Utils/CloneFunction.cpp') diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index fd72ca1d91..f042bc9f22 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/lib/Transforms/Utils/CloneFunction.cpp @@ -43,7 +43,7 @@ BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, // Loop over all instructions, and copy them over. for (BasicBlock::const_iterator II = BB->begin(), IE = BB->end(); II != IE; ++II) { - Instruction *NewInst = II->clone(BB->getContext()); + Instruction *NewInst = II->clone(); if (II->hasName()) NewInst->setName(II->getName()+NameSuffix); NewBB->getInstList().push_back(NewInst); @@ -248,7 +248,7 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB, continue; } - Instruction *NewInst = II->clone(BB->getContext()); + Instruction *NewInst = II->clone(); if (II->hasName()) NewInst->setName(II->getName()+NameSuffix); NewBB->getInstList().push_back(NewInst); @@ -296,7 +296,7 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB, } if (!TerminatorDone) { - Instruction *NewInst = OldTI->clone(BB->getContext()); + Instruction *NewInst = OldTI->clone(); if (OldTI->hasName()) NewInst->setName(OldTI->getName()+NameSuffix); NewBB->getInstList().push_back(NewInst); -- cgit v1.2.3-18-g5258