From: Javed Absar Date: Fri, 6 Oct 2017 09:32:45 +0000 (+0000) Subject: [TableGen] : CodeGenInsrtuction modify to range loop. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7351883ca61b8268fd72dacb843c566f153c543;p=llvm [TableGen] : CodeGenInsrtuction modify to range loop. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315050 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp index 02046a58d6b..8fa3050e078 100644 --- a/utils/TableGen/CodeGenInstruction.cpp +++ b/utils/TableGen/CodeGenInstruction.cpp @@ -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); }