Work around VS bug

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-06-05 00:22:04 +00:00
parent 96698a5ec7
commit ed965e901c

View File

@ -318,9 +318,8 @@ void Verifier::visitBasicBlock(BasicBlock &BB) {
if (isa<PHINode>(BB.front())) {
std::vector<BasicBlock*> Preds(pred_begin(&BB), pred_end(&BB));
std::sort(Preds.begin(), Preds.end());
for (BasicBlock::iterator I = BB.begin();
PHINode *PN = dyn_cast<PHINode>(I); ++I) {
PHINode *PN;
for (BasicBlock::iterator I = BB.begin(); PN = dyn_cast<PHINode>(I); ++I) {
// Ensure that PHI nodes have at least one entry!
Assert1(PN->getNumIncomingValues() != 0,