summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-09 23:48:35 +0000
committerOwen Anderson <resistor@mac.com>2009-07-09 23:48:35 +0000
commit1e5f00e7a7e8bb482a5388464f23d743040d1dbb (patch)
treeed779e935d21d99ee2c292f67a79459c7e82008b /llvm/lib/Transforms/Utils/CloneFunction.cpp
parentab11a81fc07345c0117d2fea2a9e4f7c4df21d66 (diff)
downloadbcm5719-llvm-1e5f00e7a7e8bb482a5388464f23d743040d1dbb.tar.gz
bcm5719-llvm-1e5f00e7a7e8bb482a5388464f23d743040d1dbb.zip
This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
llvm-svn: 75200
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index a820c9d3f56..f05c5dc8a7d 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/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();
+ Instruction *NewInst = II->clone(*BB->getContext());
if (II->hasName())
NewInst->setName(II->getName()+NameSuffix);
NewBB->getInstList().push_back(NewInst);
@@ -249,7 +249,7 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB,
continue;
}
- Instruction *NewInst = II->clone();
+ Instruction *NewInst = II->clone(*BB->getContext());
if (II->hasName())
NewInst->setName(II->getName()+NameSuffix);
NewBB->getInstList().push_back(NewInst);
@@ -297,7 +297,7 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB,
}
if (!TerminatorDone) {
- Instruction *NewInst = OldTI->clone();
+ Instruction *NewInst = OldTI->clone(*BB->getContext());
if (OldTI->hasName())
NewInst->setName(OldTI->getName()+NameSuffix);
NewBB->getInstList().push_back(NewInst);
OpenPOWER on IntegriCloud