From ef2d0e0f20308aa32426fcf2021d5e4958fa4e1f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 9 Nov 2021 23:05:15 -0800 Subject: [llvm] Use MachineBasicBlock::{successors,predecessors} (NFC) --- llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp') 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 *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 -- cgit v1.2.3