aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.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/LiveDebugValues/InstrRefBasedImpl.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/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index 70f8650..5385793 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -3199,10 +3199,10 @@ void InstrRefBasedLDV::initialSetup(MachineFunction &MF) {
// Compute mappings of block <=> RPO order.
ReversePostOrderTraversal<MachineFunction *> RPOT(&MF);
unsigned int RPONumber = 0;
- for (auto RI = RPOT.begin(), RE = RPOT.end(); RI != RE; ++RI) {
- OrderToBB[RPONumber] = *RI;
- BBToOrder[*RI] = RPONumber;
- BBNumToRPO[(*RI)->getNumber()] = RPONumber;
+ for (MachineBasicBlock *MBB : RPOT) {
+ OrderToBB[RPONumber] = MBB;
+ BBToOrder[MBB] = RPONumber;
+ BBNumToRPO[MBB->getNumber()] = RPONumber;
++RPONumber;
}
}