aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-02-15 14:46:10 -0800
committerKazu Hirata <kazu@google.com>2021-02-15 14:46:11 -0800
commit22f00f61dd5483a9fdaed3b7592d392c23b3646a (patch)
treefc5fd34098fe592c013fad4ef98334f3ac612368 /llvm/lib/CodeGen/MachineOutliner.cpp
parentf0d5898f939fe81e1a3e3e74cb8f04b9028f7e6b (diff)
downloadllvm-22f00f61dd5483a9fdaed3b7592d392c23b3646a.zip
llvm-22f00f61dd5483a9fdaed3b7592d392c23b3646a.tar.gz
llvm-22f00f61dd5483a9fdaed3b7592d392c23b3646a.tar.bz2
[CodeGen] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp3
1 files changed, 1 insertions, 2 deletions
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<Candidate> 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;