silence a bogus warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21320 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-04-18 05:26:21 +00:00
parent fda2b55e1b
commit ea96b5edbb

View File

@ -83,7 +83,7 @@ void CondProp::SimplifyBlock(BasicBlock *BB) {
// See if we can fold any PHI nodes in this block now.
// FIXME: This would not be required if removePredecessor did this for us!!
PHINode *PN;
for (BasicBlock::iterator I = BB->begin(); PN = dyn_cast<PHINode>(I++); )
for (BasicBlock::iterator I = BB->begin(); (PN = dyn_cast<PHINode>(I++)); )
if (Value *PNV = hasConstantValue(PN))
if (!isa<Instruction>(PNV)) {
PN->replaceAllUsesWith(PNV);