Skip to content

Commit 91e77d8

Browse files
authored
[TableGen] Restore OpName::OPERAND_LAST emission in InstrInfoEmitter (#125265)
- Looks like this sentinel value is used in some downstream backends, so restore emitting it. - It now also has the correct value (earlier code may have emitted an incorrect value for OPERAND_LAST and hence it was removed in #124960)
1 parent 9333d8f commit 91e77d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/utils/TableGen/InstrInfoEmitter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ void InstrInfoEmitter::emitOperandNameMappings(
286286
OS << "enum {\n";
287287
for (const auto &[I, Op] : enumerate(OperandNameToID))
288288
OS << " " << Op.first << " = " << I << ",\n";
289+
OS << " OPERAND_LAST = " << NumOperandNames << ",\n";
289290
OS << "};\n";
290291
OS << "} // end namespace llvm::" << Namespace << "::OpName\n";
291292
OS << "#endif //GET_INSTRINFO_OPERAND_ENUM\n\n";

0 commit comments

Comments
 (0)