[PATCH] D50457: [MC][PredicateExpander] Extend the grammar to support simple switch and return statements.

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 8 09:59:24 PDT 2018


mattd added a comment.

I really like this change!  The result is easier to read.



================
Comment at: utils/TableGen/PredicateExpander.cpp:186
+
+void PredicateExpander::expandOpcodeSwitchCase(formatted_raw_ostream &OS,
+                                         const Record *Rec) {
----------------
I'm curious, do we assume all cases are fall-through?  I don't see a break statement being generated, perhaps I overlooked that?


================
Comment at: utils/TableGen/PredicateExpander.h:82
   void expandPredicate(formatted_raw_ostream &OS, const Record *Rec);
+
+  void expandReturnStatement(formatted_raw_ostream &OS, const Record *Rec);
----------------
nit: Don't really need this whitespace.


https://reviews.llvm.org/D50457





More information about the llvm-commits mailing list