diff options
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 0b9f6786000..865b187ad46 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -518,8 +518,7 @@ void Verifier::visitGlobalVariable(const GlobalVariable &GV) { continue; if (const User *U = dyn_cast<User>(V)) { - for (unsigned I = 0, N = U->getNumOperands(); I != N; ++I) - WorkStack.push_back(U->getOperand(I)); + WorkStack.append(U->op_begin(), U->op_end()); } if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { |