diff options
author | Devang Patel <dpatel@apple.com> | 2008-11-03 23:14:09 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-11-03 23:14:09 +0000 |
commit | 8a88a14462db7e8ad96536c89b3ab948b89d0c2b (patch) | |
tree | 143dcc6b8dd7d335201ffc2c58b83ac317ce18fb /lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | b593117b44a74c72bc784080bb402576b3181d94 (diff) |
Fix unused variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58651 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r-- | lib/Transforms/Utils/BasicBlockUtils.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp index 1b018cbdf6..7fdc91bd32 100644 --- a/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -205,7 +205,10 @@ void llvm::RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) { BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, Pass *P) { TerminatorInst *LatchTerm = BB->getTerminator(); unsigned SuccNum = 0; - for (unsigned i = 0, e = LatchTerm->getNumSuccessors(); ; ++i) { +#ifndef NDEBUG + unsigned e = LatchTerm->getNumSuccessors(); +#endif + for (unsigned i = 0; ; ++i) { assert(i != e && "Didn't find edge?"); if (LatchTerm->getSuccessor(i) == Succ) { SuccNum = i; @@ -224,6 +227,7 @@ BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, Pass *P) { // If the successor only has a single pred, split the top of the successor // block. assert(SP == BB && "CFG broken"); + SP = NULL; return SplitBlock(Succ, Succ->begin(), P); } else { // Otherwise, if BB has a single successor, split it at the bottom of the |