[llvm] 1a4d588 - [TableGen] Add missing $ before the dag operator name (#140969)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 16:21:23 PDT 2025


Author: Adam Nemet
Date: 2025-05-22T16:21:19-07:00
New Revision: 1a4d5887386d98573bee895f762997abc5b4499c

URL: https://github.com/llvm/llvm-project/commit/1a4d5887386d98573bee895f762997abc5b4499c
DIFF: https://github.com/llvm/llvm-project/commit/1a4d5887386d98573bee895f762997abc5b4499c.diff

LOG: [TableGen] Add missing $ before the dag operator name (#140969)

This way the dump output is roundtripable.

Added: 
    

Modified: 
    llvm/lib/TableGen/Record.cpp
    llvm/test/TableGen/usevalname.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 2f991d5fec165..12f5ce6175dbf 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -2786,7 +2786,7 @@ bool DagInit::isConcrete() const {
 std::string DagInit::getAsString() const {
   std::string Result = "(" + Val->getAsString();
   if (ValName)
-    Result += ":" + ValName->getAsUnquotedString();
+    Result += ":$" + ValName->getAsUnquotedString();
   if (!arg_empty()) {
     Result += " ";
     ListSeparator LS;

diff  --git a/llvm/test/TableGen/usevalname.td b/llvm/test/TableGen/usevalname.td
index d85b98ac33e64..ab90398cde49c 100644
--- a/llvm/test/TableGen/usevalname.td
+++ b/llvm/test/TableGen/usevalname.td
@@ -20,5 +20,5 @@ multiclass shuffle<Reg RC> {
                                        RC:$src1, RC:$src2))]>;
 }
 
-// CHECK: shufp:src3
+// CHECK: shufp:$src3
 defm ADD : shuffle<VR128>;


        


More information about the llvm-commits mailing list