diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-01-28 04:00:15 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-01-28 04:00:15 +0000 |
commit | ed4efd3358c69dc73eea174ac4b252402d17f471 (patch) | |
tree | 9360d42de2fe91f5dea894abd261ba417aa0a6a2 /lib/CodeGen | |
parent | ddf0e59cc6886eb151614be5ec99bcc31fd25556 (diff) | |
download | external_llvm-ed4efd3358c69dc73eea174ac4b252402d17f471.zip external_llvm-ed4efd3358c69dc73eea174ac4b252402d17f471.tar.gz external_llvm-ed4efd3358c69dc73eea174ac4b252402d17f471.tar.bz2 |
Fix build with stdcxx by using llvm::next. Patch by Joerg Sonnenberger!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124472 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 48a2dc5..7c49c22 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -2261,7 +2261,8 @@ size_t SelectionDAGBuilder::Clusterify(CaseVector& Cases, if (Cases.size() >= 2) // Must recompute end() each iteration because it may be // invalidated by erase if we hold on to it - for (CaseItr I = Cases.begin(), J = ++(Cases.begin()); J != Cases.end(); ) { + for (CaseItr I = Cases.begin(), J = llvm::next(Cases.begin()); + J != Cases.end(); ) { const APInt& nextValue = cast<ConstantInt>(J->Low)->getValue(); const APInt& currentValue = cast<ConstantInt>(I->High)->getValue(); MachineBasicBlock* nextBB = J->BB; |