Skip to content

Commit 1675f8a

Browse files
committed
[TableGen] Pull the increment of a variable out of an assert.
The variable is only used by the assert so the code was fine before, but it was flagged in PR47072.
1 parent a31b389 commit 1675f8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/utils/TableGen/RegisterInfoEmitter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,8 @@ RegisterInfoEmitter::runTargetDesc(raw_ostream &OS, CodeGenTarget &Target,
12881288
OS << CGH.getMode(M).Name;
12891289
OS << ")\n";
12901290
for (const auto &RC : RegisterClasses) {
1291-
assert(RC.EnumValue == EV++ && "Unexpected order of register classes");
1291+
assert(RC.EnumValue == EV && "Unexpected order of register classes");
1292+
++EV;
12921293
(void)EV;
12931294
const RegSizeInfo &RI = RC.RSI.get(M);
12941295
OS << " { " << RI.RegSize << ", " << RI.SpillSize << ", "

0 commit comments

Comments
 (0)