[llvm] f1aaa30 - [TableGen] Use range-based for loop. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 18 12:44:53 PDT 2021
Author: Craig Topper
Date: 2021-04-18T12:41:09-07:00
New Revision: f1aaa306ee6c7bf73dfd7b578a57ba8807bde539
URL: https://github.com/llvm/llvm-project/commit/f1aaa306ee6c7bf73dfd7b578a57ba8807bde539
DIFF: https://github.com/llvm/llvm-project/commit/f1aaa306ee6c7bf73dfd7b578a57ba8807bde539.diff
LOG: [TableGen] Use range-based for loop. NFC
Added:
Modified:
llvm/utils/TableGen/DAGISelEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp
index 7b3dc03a67e18..2f211e2958fa7 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<Matcher*> 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;
More information about the llvm-commits
mailing list