[PATCH] D15755: TableGen: Add IsOptional field to AsmOperandClass
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 12:03:14 PST 2016
ab accepted this revision.
ab added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: include/llvm/Target/Target.td:612
@@ +611,3 @@
+ /// instruction if it hasn't matched all the operands yet. However, this
+ /// error will be surppressed if all of the remaining unmatched operands are
+ /// marked as IsOptional.
----------------
Typo: surppressed
================
Comment at: utils/TableGen/AsmMatcherEmitter.cpp:3088
@@ -3074,2 +3087,3 @@
<< " >= Operands.size()) {\n";
- OS << " OperandsValid = (Formal == " <<"InvalidMatchClass);\n";
+ OS << " OperandsValid = (Formal == " <<"InvalidMatchClass) || "
+ << "isSubclass(Formal, OptionalMatchClass);\n";
----------------
That " <<" in the middle is unnecessary, right? Can you delete it?
http://reviews.llvm.org/D15755
More information about the llvm-commits
mailing list