[llvm] [TableGen] Add let append/prepend syntax for field concatenation (PR #182382)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 08:03:06 PST 2026


================
@@ -3637,8 +3689,15 @@ bool TGParser::ParseBodyItem(Record *CurRec) {
     return false;
   }
 
-  // LET ID OptionalRangeList '=' Value ';'
-  if (Lex.Lex() != tgtok::Id)
+  // LET [append|prepend] ID OptionalBitList '=' Value ';'
+  Lex.Lex(); // eat 'let'.
+
+  if (Lex.getCode() != tgtok::Id)
----------------
jurahul wrote:

Also, can you add a unit test for fields named append/prepend and use them in let without append/prepend and with append/prepend?

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


More information about the llvm-commits mailing list