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

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 00:55:03 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:

```suggestion
    PrintNote("(dump message is not a string - use `!repr`)");
```

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


More information about the llvm-commits mailing list