diff options
author | Kazu Hirata <kazu@google.com> | 2024-08-23 08:45:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-23 08:45:19 -0700 |
commit | b8f15051369978c423d74a3bd48a1b9ab6d31ee6 (patch) | |
tree | decdcb56bad2cc5de57955f96909916dc712d271 /llvm/lib/IR/Constants.cpp | |
parent | ff5552c1b82ada19750792fa1f28a23a33ee39b3 (diff) | |
download | llvm-b8f15051369978c423d74a3bd48a1b9ab6d31ee6.zip llvm-b8f15051369978c423d74a3bd48a1b9ab6d31ee6.tar.gz llvm-b8f15051369978c423d74a3bd48a1b9ab6d31ee6.tar.bz2 |
[IR] Use a range-based for loop (NFC) (#105826)
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index a1c9e925..e32a54f 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -681,9 +681,8 @@ Constant::PossibleRelocationsTy Constant::getRelocationInfo() const { } PossibleRelocationsTy Result = NoRelocation; - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - Result = - std::max(cast<Constant>(getOperand(i))->getRelocationInfo(), Result); + for (const Value *Op : operands()) + Result = std::max(cast<Constant>(Op)->getRelocationInfo(), Result); return Result; } |