[llvm] r315050 - [TableGen] : CodeGenInsrtuction modify to range loop. NFC.

Javed Absar via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 02:32:45 PDT 2017


Author: javed.absar
Date: Fri Oct  6 02:32:45 2017
New Revision: 315050

URL: http://llvm.org/viewvc/llvm-project?rev=315050&view=rev
Log:
[TableGen] : CodeGenInsrtuction modify to range loop. NFC.


Modified:
    llvm/trunk/utils/TableGen/CodeGenInstruction.cpp

Modified: llvm/trunk/utils/TableGen/CodeGenInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenInstruction.cpp?rev=315050&r1=315049&r2=315050&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenInstruction.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenInstruction.cpp Fri Oct  6 02:32:45 2017
@@ -128,8 +128,8 @@ CGIOperandList::CGIOperandList(Record *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);
 }
 
 




More information about the llvm-commits mailing list