about summary refs log tree commit diff homepage
path: root/lib/Module/LowerSwitch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Module/LowerSwitch.cpp')
-rw-r--r--lib/Module/LowerSwitch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Module/LowerSwitch.cpp b/lib/Module/LowerSwitch.cpp
index 5cc6b991..b20c21ab 100644
--- a/lib/Module/LowerSwitch.cpp
+++ b/lib/Module/LowerSwitch.cpp
@@ -44,7 +44,7 @@ bool LowerSwitchPass::runOnFunction(Function &F) {
   bool changed = false;
 
   for (Function::iterator I = F.begin(), E = F.end(); I != E; ) {
-    BasicBlock *cur = static_cast<BasicBlock *>(I);
+    BasicBlock *cur = &*I;
     I++; // Advance over block so we don't traverse new blocks
 
     if (SwitchInst *SI = dyn_cast<SwitchInst>(cur->getTerminator())) {