From 22f00f61dd5483a9fdaed3b7592d392c23b3646a Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 15 Feb 2021 14:46:10 -0800 Subject: [CodeGen] Use range-based for loops (NFC) --- llvm/lib/CodeGen/MachineOutliner.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp') diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp index 02998d4..3751d94 100644 --- a/llvm/lib/CodeGen/MachineOutliner.cpp +++ b/llvm/lib/CodeGen/MachineOutliner.cpp @@ -518,9 +518,8 @@ void MachineOutliner::findCandidates( // First, find all of the repeated substrings in the tree of minimum length // 2. std::vector CandidatesForRepeatedSeq; - for (auto It = ST.begin(), Et = ST.end(); It != Et; ++It) { + for (const SuffixTree::RepeatedSubstring &RS : ST) { CandidatesForRepeatedSeq.clear(); - SuffixTree::RepeatedSubstring RS = *It; unsigned StringLen = RS.Length; for (const unsigned &StartIdx : RS.StartIndices) { unsigned EndIdx = StartIdx + StringLen - 1; -- cgit v1.1