diff options
Diffstat (limited to 'lib/Module/LowerSwitch.cpp')
-rw-r--r-- | lib/Module/LowerSwitch.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Module/LowerSwitch.cpp b/lib/Module/LowerSwitch.cpp index 7f28748a..5cc6b991 100644 --- a/lib/Module/LowerSwitch.cpp +++ b/lib/Module/LowerSwitch.cpp @@ -44,7 +44,8 @@ bool LowerSwitchPass::runOnFunction(Function &F) { bool changed = false; for (Function::iterator I = F.begin(), E = F.end(); I != E; ) { - BasicBlock *cur = I++; // Advance over block so we don't traverse new blocks + BasicBlock *cur = static_cast<BasicBlock *>(I); + I++; // Advance over block so we don't traverse new blocks if (SwitchInst *SI = dyn_cast<SwitchInst>(cur->getTerminator())) { changed = true; |