The OpTypes::OperandType was creating an enum for all records that inherit from
Operand, but in reality there are operands for instructions that inherit from
other types too. In particular, RegisterOperand and RegisterClass. This
commit adds those types to the list of operand types that are tracked by
the OperandType enum.
Details
Details
Diff Detail
Diff Detail
Event Timeline
utils/TableGen/InstrInfoEmitter.cpp | ||
---|---|---|
347–355 | Wouldn't it be simpler to have: for (const std::vector<Record *> &CurrentVec : { &Operands, &RegisterOperands, &RegisterClasses }) { for (const Record *Op : CurrentVec) { |
utils/TableGen/InstrInfoEmitter.cpp | ||
---|---|---|
347–355 | I think my thought process at the time was that I didn't want to "hard code" the fact that the data comes from a vector... but yeah it's complex and I think I like your suggestion better. |
Wouldn't it be simpler to have: