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 | 035d41d6c7abc88fc6be5f7f4eb8fe959fe97323 (patch) | |
tree | cabab2668e037a0276156e885bd54d5bd660eabd /lib/Transforms/Utils | |
parent | db888429829c0151ddca4cbcc60db6b5c9f01fd1 (diff) | |
download | external_llvm-035d41d6c7abc88fc6be5f7f4eb8fe959fe97323.zip external_llvm-035d41d6c7abc88fc6be5f7f4eb8fe959fe97323.tar.gz external_llvm-035d41d6c7abc88fc6be5f7f4eb8fe959fe97323.tar.bz2 |
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')
-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 a898d2d..55e1bf2 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. |