diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
commit | e922c0201916e0b980ab3cfe91e1413e68d55647 (patch) | |
tree | 663be741b84470d97945f01da459a3627af683fd /lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 7cf12c7efd37dc12c3ed536a3f4c373dddac2b85 (diff) |
Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r-- | lib/Transforms/Utils/BasicBlockUtils.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp index b8663de194..c4b3474d99 100644 --- a/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -51,7 +51,7 @@ void llvm::DeleteDeadBlock(BasicBlock *BB) { // contained within it must dominate their uses, that all uses will // eventually be removed (they are themselves dead). if (!I.use_empty()) - I.replaceAllUsesWith(BB->getContext()->getUndef(I.getType())); + I.replaceAllUsesWith(BB->getContext().getUndef(I.getType())); BB->getInstList().pop_back(); } @@ -71,7 +71,7 @@ void llvm::FoldSingleEntryPHINodes(BasicBlock *BB) { if (PN->getIncomingValue(0) != PN) PN->replaceAllUsesWith(PN->getIncomingValue(0)); else - PN->replaceAllUsesWith(BB->getContext()->getUndef(PN->getType())); + PN->replaceAllUsesWith(BB->getContext().getUndef(PN->getType())); PN->eraseFromParent(); } } @@ -252,7 +252,7 @@ void llvm::RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) { // Create a value to return... if the function doesn't return null... if (BB->getParent()->getReturnType() != Type::VoidTy) - RetVal = TI->getParent()->getContext()->getNullValue( + RetVal = TI->getContext().getNullValue( BB->getParent()->getReturnType()); // Create the return... @@ -387,7 +387,7 @@ BasicBlock *llvm::SplitBlockPredecessors(BasicBlock *BB, if (NumPreds == 0) { // Insert dummy values as the incoming value. for (BasicBlock::iterator I = BB->begin(); isa<PHINode>(I); ++I) - cast<PHINode>(I)->addIncoming(BB->getContext()->getUndef(I->getType()), + cast<PHINode>(I)->addIncoming(BB->getContext().getUndef(I->getType()), NewBB); return NewBB; } @@ -618,7 +618,7 @@ void llvm::CopyPrecedingStopPoint(Instruction *I, if (I != I->getParent()->begin()) { BasicBlock::iterator BBI = I; --BBI; if (DbgStopPointInst *DSPI = dyn_cast<DbgStopPointInst>(BBI)) { - CallInst *newDSPI = DSPI->clone(*I->getParent()->getContext()); + CallInst *newDSPI = DSPI->clone(I->getContext()); newDSPI->insertBefore(InsertPos); } } |