Push LLVMContexts through the IntegerType APIs.
[oota-llvm.git] / lib / Transforms / Utils / BreakCriticalEdges.cpp
index bef11195021f485a10827e230f25a37cd3ecbc8d..632aa2b723b953f8d464b23c3e5b3e0333a78261 100644 (file)
@@ -129,8 +129,8 @@ bool llvm::SplitCriticalEdge(TerminatorInst *TI, unsigned SuccNum, Pass *P,
   BasicBlock *DestBB = TI->getSuccessor(SuccNum);
 
   // Create a new basic block, linking it into the CFG.
-  BasicBlock *NewBB = BasicBlock::Create(TIBB->getName() + "." +
-                                         DestBB->getName() + "_crit_edge");
+  BasicBlock *NewBB = BasicBlock::Create(TI->getContext(),
+                      TIBB->getName() + "." + DestBB->getName() + "_crit_edge");
   // Create our unconditional branch...
   BranchInst::Create(DestBB, NewBB);