From ed965e901c7bb4621ac841b4e7ace0b5d1210141 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 5 Jun 2004 00:22:04 +0000 Subject: [PATCH] Work around VS bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14036 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Verifier.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 2e92c26d4e9..d27bd88bd9b 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -318,9 +318,8 @@ void Verifier::visitBasicBlock(BasicBlock &BB) { if (isa(BB.front())) { std::vector Preds(pred_begin(&BB), pred_end(&BB)); std::sort(Preds.begin(), Preds.end()); - - for (BasicBlock::iterator I = BB.begin(); - PHINode *PN = dyn_cast(I); ++I) { + PHINode *PN; + for (BasicBlock::iterator I = BB.begin(); PN = dyn_cast(I); ++I) { // Ensure that PHI nodes have at least one entry! Assert1(PN->getNumIncomingValues() != 0,