diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-13 20:58:05 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-13 20:58:05 +0000 |
commit | 73c6b7127aff4499e4d6a2edb219685aee178ee1 (patch) | |
tree | cabab2668e037a0276156e885bd54d5bd660eabd /lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | 69fbc7f477c21ce1d8ae5a4aa8a701e47aa2d163 (diff) |
Move more functionality over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index a898d2df2b..55e1bf225c 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1570,7 +1570,8 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI) { // If we need to invert the condition in the pred block to match, do so now. if (InvertPredCond) { Value *NewCond = - BinaryOperator::CreateNot(PBI->getCondition(), + BinaryOperator::CreateNot(*BI->getParent()->getContext(), + PBI->getCondition(), PBI->getCondition()->getName()+".not", PBI); PBI->setCondition(NewCond); BasicBlock *OldTrue = PBI->getSuccessor(0); @@ -1726,12 +1727,12 @@ static bool SimplifyCondBranchToCondBranch(BranchInst *PBI, BranchInst *BI) { // Make sure we get to CommonDest on True&True directions. Value *PBICond = PBI->getCondition(); if (PBIOp) - PBICond = BinaryOperator::CreateNot(PBICond, + PBICond = BinaryOperator::CreateNot(*Context, PBICond, PBICond->getName()+".not", PBI); Value *BICond = BI->getCondition(); if (BIOp) - BICond = BinaryOperator::CreateNot(BICond, + BICond = BinaryOperator::CreateNot(*Context, BICond, BICond->getName()+".not", PBI); // Merge the conditions. |