[llvm] [Tablegen] Add keywork `dump`. (PR #68793)

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 01:42:47 PDT 2023


================
@@ -170,4 +170,11 @@ void CheckAssert(SMLoc Loc, Init *Condition, Init *Message) {
   }
 }
 
+void CheckDump(SMLoc Loc, Init *Message) {
+  if (auto *MessageInit = dyn_cast<StringInit>(Message))
+    PrintNote(MessageInit->getValue());
+  else
+    PrintNote("(dump message is not a string)");
----------------
fpetrogalli wrote:

Done - but in this case I am printing a warning instead of note. I have added a test for this.

https://github.com/llvm/llvm-project/pull/68793


More information about the llvm-commits mailing list