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 | 47db941fd3e5a698c4417e38686ff6da6b2d81ee (patch) | |
tree | f1bc8ce05f4b4c0c6f5eb775c3e5b12eda35e2f1 /llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp | |
parent | 4565ef5b65b7d0b778b41836d70b806196cc8e24 (diff) | |
download | bcm5719-llvm-47db941fd3e5a698c4417e38686ff6da6b2d81ee.tar.gz bcm5719-llvm-47db941fd3e5a698c4417e38686ff6da6b2d81ee.zip |
Get rid of the Pass+Context magic.
llvm-svn: 76702
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp index f6cffdd0ef4..3596ed6b14f 100644 --- a/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -58,7 +58,7 @@ FunctionPass *llvm::createCFGSimplificationPass() { /// ChangeToUnreachable - Insert an unreachable instruction before the specified /// instruction, making it and the rest of the code in the block dead. -static void ChangeToUnreachable(Instruction *I, LLVMContext *Context) { +static void ChangeToUnreachable(Instruction *I, LLVMContext &Context) { BasicBlock *BB = I->getParent(); // Loop over all of the successors, removing BB's entry from any PHI // nodes. @@ -71,7 +71,7 @@ static void ChangeToUnreachable(Instruction *I, LLVMContext *Context) { BasicBlock::iterator BBI = I, BBE = BB->end(); while (BBI != BBE) { if (!BBI->use_empty()) - BBI->replaceAllUsesWith(Context->getUndef(BBI->getType())); + BBI->replaceAllUsesWith(Context.getUndef(BBI->getType())); BB->getInstList().erase(BBI++); } } @@ -97,7 +97,7 @@ static void ChangeToCall(InvokeInst *II) { static bool MarkAliveBlocks(BasicBlock *BB, SmallPtrSet<BasicBlock*, 128> &Reachable, - LLVMContext *Context) { + LLVMContext &Context) { SmallVector<BasicBlock*, 128> Worklist; Worklist.push_back(BB); |