diff options
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 8daee792eb3..cdb78d5db6e 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2132,8 +2132,8 @@ void Verifier::visitPHINode(PHINode &PN) { // Check that all of the values of the PHI node have the same type as the // result, and that the incoming blocks are really basic blocks. - for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { - Assert(PN.getType() == PN.getIncomingValue(i)->getType(), + for (Value *IncValue : PN.incoming_values()) { + Assert(PN.getType() == IncValue->getType(), "PHI node operands are not the same type as the result!", &PN); } |