Move more functionality over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75497 91177308-0d34-0410-b5e6-96231b3b80d8
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 @@
// 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 @@
// 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.