aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-05-27 10:24:52 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-05-27 10:24:52 +0000
commit4fae58b32d4ff88f2df093514a0986c79e0c9e2c (patch)
treea631bfab46f41246bee0c35894a931b63aa16054 /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parentdc54f8ebe288c7313e22902d4bdfe030e479db48 (diff)
r157525 didn't work, just disable iterator checking.
This is obviosly right but I don't see how to do this with proper vector iterators without building a horrible mess of workarounds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 1330a26213..6837d822e6 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1991,7 +1991,7 @@ bool SelectionDAGBuilder::handleSmallSwitchRange(CaseRec& CR,
// The last case block won't fall through into 'NextBlock' if we emit the
// branches in this order. See if rearranging a case value would help.
// We start at the bottom as it's the case with the least weight.
- for (CaseItr I = CR.Range.second-2, E = CR.Range.first; I >= E; --I) {
+ for (Case *I = &*CR.Range.second-2, *E = &*CR.Range.first-1; I != E; --I){
if (I->BB == NextBlock) {
std::swap(*I, BackCase);
break;