diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-09 23:48:35 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-09 23:48:35 +0000 |
commit | 1e5f00e7a7e8bb482a5388464f23d743040d1dbb (patch) | |
tree | ed779e935d21d99ee2c292f67a79459c7e82008b /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | ab11a81fc07345c0117d2fea2a9e4f7c4df21d66 (diff) | |
download | bcm5719-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/SimplifyCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 9dccfe86f7f..a898d2df2bb 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -938,7 +938,7 @@ HoistTerminator: return true; // Okay, it is safe to hoist the terminator. - Instruction *NT = I1->clone(); + Instruction *NT = I1->clone(*BB1->getContext()); BIParent->getInstList().insert(BI, NT); if (NT->getType() != Type::VoidTy) { I1->replaceAllUsesWith(NT); @@ -1231,7 +1231,7 @@ static bool FoldCondBranchOnPHI(BranchInst *BI) { TranslateMap[PN] = PN->getIncomingValueForBlock(PredBB); } else { // Clone the instruction. - Instruction *N = BBI->clone(); + Instruction *N = BBI->clone(*Context); if (BBI->hasName()) N->setName(BBI->getName()+".c"); // Update operands due to translation. @@ -1581,7 +1581,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI) { // Clone Cond into the predecessor basic block, and or/and the // two conditions together. - Instruction *New = Cond->clone(); + Instruction *New = Cond->clone(*BB->getContext()); PredBlock->getInstList().insert(PBI, New); New->takeName(Cond); Cond->setName(New->getName()+".old"); @@ -1841,7 +1841,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { << "INTO UNCOND BRANCH PRED: " << *Pred; Instruction *UncondBranch = Pred->getTerminator(); // Clone the return and add it to the end of the predecessor. - Instruction *NewRet = RI->clone(); + Instruction *NewRet = RI->clone(*BB->getContext()); Pred->getInstList().push_back(NewRet); BasicBlock::iterator BBI = RI; |