]> granicus.if.org Git - llvm/commitdiff
[TableGen] : CodeGenInsrtuction modify to range loop. NFC.
authorJaved Absar <javed.absar@arm.com>
Fri, 6 Oct 2017 09:32:45 +0000 (09:32 +0000)
committerJaved Absar <javed.absar@arm.com>
Fri, 6 Oct 2017 09:32:45 +0000 (09:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315050 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenInstruction.cpp

index 02046a58d6b92f25001992ed8f0cfd9a18f44d52..8fa3050e0780c5a560ea37839b8f5bfd09342d08 100644 (file)
@@ -128,8 +128,8 @@ CGIOperandList::CGIOperandList(Record *R) : TheDef(R) {
 
   // Make sure the constraints list for each operand is large enough to hold
   // constraint info, even if none is present.
-  for (unsigned i = 0, e = OperandList.size(); i != e; ++i)
-    OperandList[i].Constraints.resize(OperandList[i].MINumOperands);
+  for (OperandInfo &OpInfo : OperandList)
+    OpInfo.Constraints.resize(OpInfo.MINumOperands);
 }