[PATCH] D126288: [TableGen][CodeEmitterGen] Do not crash on insufficient positional instruction operands.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 9 03:01:10 PDT 2022
foad added inline comments.
================
Comment at: llvm/utils/TableGen/CodeEmitterGen.cpp:124
- if (NumberedOp >= CGI.Operands.back().MIOperandNo +
- CGI.Operands.back().MINumOperands) {
- errs() << "Too few operands in record " << R->getName() <<
- " (no match for variable " << VarName << "):\n";
- errs() << *R;
- errs() << '\n';
-
- return;
- }
+ if (NumberedOp >=
+ CGI.Operands.back().MIOperandNo + CGI.Operands.back().MINumOperands) {
----------------
Do I understand correctly: the fix is to do this check even if the "while" loop above executed 0 times?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126288/new/
https://reviews.llvm.org/D126288
More information about the llvm-commits
mailing list