aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LowerSwitch.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-11-02 22:22:02 +0000
committerDan Gohman <gohman@apple.com>2007-11-02 22:22:02 +0000
commitc981d72d1a740a9cd381716af3e55da81912371f (patch)
tree5782147bce0c1cd99ec46cd144cb40e08308f0c6 /llvm/lib/Transforms/Utils/LowerSwitch.cpp
parent8815795049728fb99afcb77c0e0a50e6541bd90a (diff)
downloadllvm-c981d72d1a740a9cd381716af3e55da81912371f.zip
llvm-c981d72d1a740a9cd381716af3e55da81912371f.tar.gz
llvm-c981d72d1a740a9cd381716af3e55da81912371f.tar.bz2
Change illegal uses of ++ to uses of STLExtra.h's next function.
llvm-svn: 43651
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LowerSwitch.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp
index 633633d..faa4e55 100644
--- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp
@@ -19,6 +19,7 @@
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Pass.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Compiler.h"
#include <algorithm>
@@ -247,7 +248,7 @@ unsigned LowerSwitch::Clusterify(CaseVector& Cases, SwitchInst *SI) {
// Merge case into clusters
if (Cases.size()>=2)
- for (CaseItr I=Cases.begin(), J=++(Cases.begin()), E=Cases.end(); J!=E; ) {
+ for (CaseItr I=Cases.begin(), J=next(Cases.begin()), E=Cases.end(); J!=E; ) {
int64_t nextValue = cast<ConstantInt>(J->Low)->getSExtValue();
int64_t currentValue = cast<ConstantInt>(I->High)->getSExtValue();
BasicBlock* nextBB = J->BB;