Fix a error that hadn't yet cause any problems, but I'm sure it would have
[oota-llvm.git] / lib / Transforms / Scalar / LoopUnswitch.cpp
index b3003845d4cfb196ce73cfd385c615624787e026..8f049b8668e00be6e0e5a4c6f87e7711ba6a979f 100644 (file)
@@ -610,7 +610,7 @@ void LoopUnswitch::UnswitchNontrivialCondition(Value *LIC, Constant *Val,
         InsertedPHIs.insert(NewLCSSA);
       }
 
-      Instruction* InsertPt = EndBlock->begin();
+      BasicBlock::iterator InsertPt = EndBlock->begin();
       while (dyn_cast<PHINode>(InsertPt)) ++InsertPt;
       for (BasicBlock::iterator I = MiddleBlock->begin();
          (OldLCSSA = dyn_cast<PHINode>(I)) && InsertedPHIs.count(OldLCSSA) == 0;