From f1aaa306ee6c7bf73dfd7b578a57ba8807bde539 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 17 Apr 2021 21:49:45 -0700 Subject: [PATCH] [TableGen] Use range-based for loop. NFC --- llvm/utils/TableGen/DAGISelEmitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp index 7b3dc03a67e1..2f211e2958fa 100644 --- a/llvm/utils/TableGen/DAGISelEmitter.cpp +++ b/llvm/utils/TableGen/DAGISelEmitter.cpp @@ -163,9 +163,9 @@ void DAGISelEmitter::run(raw_ostream &OS) { // Convert each variant of each pattern into a Matcher. Records.startTimer("Convert to matchers"); std::vector PatternMatchers; - for (unsigned i = 0, e = Patterns.size(); i != e; ++i) { + for (const PatternToMatch *PTM : Patterns) { for (unsigned Variant = 0; ; ++Variant) { - if (Matcher *M = ConvertPatternToMatcher(*Patterns[i], Variant, CGP)) + if (Matcher *M = ConvertPatternToMatcher(*PTM, Variant, CGP)) PatternMatchers.push_back(M); else break;