summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-11-09 23:05:15 -0800
committerKazu Hirata <kazu@google.com>2021-11-09 23:05:15 -0800
commitef2d0e0f20308aa32426fcf2021d5e4958fa4e1f (patch)
tree790eaafea703eef875070605eadb23730d3c1aa1 /llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
parentb4f6f1c9369ec4bb1c10852283a8c7e8c39e1a8d (diff)
[llvm] Use MachineBasicBlock::{successors,predecessors} (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index 231367ed2003..a4eb3094612b 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -3240,10 +3240,8 @@ public:
/// vector.
static void FindPredecessorBlocks(LDVSSABlock *BB,
SmallVectorImpl<LDVSSABlock *> *Preds) {
- for (MachineBasicBlock::pred_iterator PI = BB->BB.pred_begin(),
- E = BB->BB.pred_end();
- PI != E; ++PI)
- Preds->push_back(BB->Updater.getSSALDVBlock(*PI));
+ for (MachineBasicBlock *Pred : BB->BB.predecessors())
+ Preds->push_back(BB->Updater.getSSALDVBlock(Pred));
}
/// GetUndefVal - Normally creates an IMPLICIT_DEF instruction with a new