Convert code to compile with vc7.1.
Patch contributed by Paolo Invernizzi. Thanks Paolo!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16368 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index 497bf0a..921ff2b 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -198,9 +198,10 @@
// The destination is already executable, but we just made an edge
// feasible that wasn't before. Revisit the PHI nodes in the block
// because they have potentially new operands.
- for (BasicBlock::iterator I = Dest->begin();
- PHINode *PN = dyn_cast<PHINode>(I); ++I)
+ for (BasicBlock::iterator I = Dest->begin(); isa<PHINode>(I); ++I) {
+ PHINode *PN = cast<PHINode>(I);
visitPHINode(*PN);
+ }
} else {
DEBUG(std::cerr << "Marking Block Executable: " << Dest->getName()<<"\n");