- if (PHINode* phi = dyn_cast<PHINode>(&I))
- {
- if (lastOp == 0)
- lastOp = phi->getNumIncomingValues();
- for (unsigned i=firstOp, N=lastOp; i < N; ++i)
- this->visitOneOperand(I, phi->getIncomingValue(i),
- phi->getOperandNumForIncomingValue(i),
- * phi->getIncomingBlock(i)->getTerminator());
- }
- else
- {
- if (lastOp == 0)
- lastOp = I.getNumOperands();
- for (unsigned i=firstOp, N=lastOp; i < N; ++i)
- this->visitOneOperand(I, I.getOperand(i), i, I);
- }
+ if (PHINode* phi = dyn_cast<PHINode>(&I)) {
+ for (unsigned i=firstOp, N=phi->getNumIncomingValues(); i != N; ++i)
+ visitOneOperand(I, phi->getIncomingValue(i),
+ phi->getOperandNumForIncomingValue(i),
+ * phi->getIncomingBlock(i)->getTerminator());
+ } else {
+ for (unsigned i=firstOp, N=lastOp; i != I.getNumOperands(); ++i)
+ visitOneOperand(I, I.getOperand(i), i, I);
+ }