aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-02-13 20:41:39 -0800
committerKazu Hirata <kazu@google.com>2021-02-13 20:41:39 -0800
commitd5adba10f0499b8c59b91228e8b58e1122a76428 (patch)
tree897f055e3f8a250ae3f6fe26967b1109e494ff47 /llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
parentdfa3ead01ebf9ca0dc8c0c9c0694d187b227f269 (diff)
downloadllvm-d5adba10f0499b8c59b91228e8b58e1122a76428.zip
llvm-d5adba10f0499b8c59b91228e8b58e1122a76428.tar.gz
llvm-d5adba10f0499b8c59b91228e8b58e1122a76428.tar.bz2
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/LocalStackSlotAllocation.cpp')
-rw-r--r--llvm/lib/CodeGen/LocalStackSlotAllocation.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
index ec6e693..2e99c85 100644
--- a/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
+++ b/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
@@ -176,9 +176,7 @@ void LocalStackSlotPass::AssignProtectedObjSet(
const StackObjSet &UnassignedObjs, SmallSet<int, 16> &ProtectedObjs,
MachineFrameInfo &MFI, bool StackGrowsDown, int64_t &Offset,
Align &MaxAlign) {
- for (StackObjSet::const_iterator I = UnassignedObjs.begin(),
- E = UnassignedObjs.end(); I != E; ++I) {
- int i = *I;
+ for (int i : UnassignedObjs) {
AdjustStackOffset(MFI, i, Offset, StackGrowsDown, MaxAlign);
ProtectedObjs.insert(i);
}