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

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 04:18:24 PDT 2023


================
@@ -170,4 +170,12 @@ void CheckAssert(SMLoc Loc, Init *Condition, Init *Message) {
   }
 }
 
+// Dump a message to stderr.
+void dumpMessage(SMLoc Loc, Init *Message) {
+  if (auto *MessageInit = dyn_cast<StringInit>(Message))
+    PrintNote(Loc, MessageInit->getValue());
+  else
+    PrintWarning(Loc, "dump message is not a string - use `!repr`");
----------------
fpetrogalli wrote:

Done

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


More information about the llvm-commits mailing list