[llvm] r260928 - [TableGen] Use range-based for loop. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 15 18:48:30 PST 2016
Author: ctopper
Date: Mon Feb 15 20:48:30 2016
New Revision: 260928
URL: http://llvm.org/viewvc/llvm-project?rev=260928&view=rev
Log:
[TableGen] Use range-based for loop. NFC
Modified:
llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=260928&r1=260927&r2=260928&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Mon Feb 15 20:48:30 2016
@@ -75,8 +75,8 @@ private:
static void PrintDefList(const std::vector<Record*> &Uses,
unsigned Num, raw_ostream &OS) {
OS << "static const MCPhysReg ImplicitList" << Num << "[] = { ";
- for (unsigned i = 0, e = Uses.size(); i != e; ++i)
- OS << getQualifiedName(Uses[i]) << ", ";
+ for (Record *U : Uses)
+ OS << getQualifiedName(U) << ", ";
OS << "0 };\n";
}
More information about the llvm-commits
mailing list