[PATCH] D93911: [TableGen] Add the assert statement, step 1

Paul C. Anagnostopoulos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 29 13:18:19 PST 2020


Paul-C-Anagnostopoulos added a reviewer: craig.topper.
Paul-C-Anagnostopoulos added inline comments.


================
Comment at: llvm/lib/TableGen/TGParser.cpp:3203
+
+  if (CurMultiClass)
+    assert(false && "assert in multiclass not yet implemented");
----------------
craig.topper wrote:
> Put curly braces on this to be consistent with the elses
Will do.


================
Comment at: llvm/lib/TableGen/TGParser.cpp:3204
+  if (CurMultiClass)
+    assert(false && "assert in multiclass not yet implemented");
+
----------------
craig.topper wrote:
> Can we use a real error here? I assert(false) should usually be llvm_unreachable but since this is something the user can create it looks like its not truly unreachable.
Will do.


================
Comment at: llvm/lib/TableGen/TGParser.cpp:3208
+    CurRec->addAssertion(ConditionLoc, Condition, Message);
+
+  } else { // at top level
----------------
craig.topper wrote:
> Drop this blank line
Will do.


================
Comment at: llvm/lib/TableGen/TGParser.cpp:3311
 ///  MultiClassObject ::= LETCommand Object
-///
 bool TGParser::ParseMultiClass() {
----------------
craig.topper wrote:
> Why is this line removed?
Because almost none of the comments have a blank comment line at the end and I was being compulsive. I'll put it back.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93911/new/

https://reviews.llvm.org/D93911



More information about the llvm-commits mailing list