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

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 14:32:55 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)");
----------------
nhaehnle wrote:

Suggest using `!repr` as part of the message?

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


More information about the llvm-commits mailing list