Skip to content

Commit b8f1505

Browse files
[IR] Use a range-based for loop (NFC) (#105826)
1 parent ff5552c commit b8f1505

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/IR/Constants.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,9 +681,8 @@ Constant::PossibleRelocationsTy Constant::getRelocationInfo() const {
681681
}
682682

683683
PossibleRelocationsTy Result = NoRelocation;
684-
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
685-
Result =
686-
std::max(cast<Constant>(getOperand(i))->getRelocationInfo(), Result);
684+
for (const Value *Op : operands())
685+
Result = std::max(cast<Constant>(Op)->getRelocationInfo(), Result);
687686

688687
return Result;
689688
}

0 commit comments

Comments
 (0)