Work around VS bug

llvm-svn: 14036
This commit is contained in:
Chris Lattner 2004-06-05 00:22:04 +00:00
parent 2e7ceee89f
commit 61bd8b3810
1 changed files with 2 additions and 3 deletions

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,