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

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 9 10:51:47 PDT 2026


================
@@ -26,13 +26,29 @@ struct MultiClass;
 struct SubClassReference;
 struct SubMultiClassReference;
 
+/// Specifies how a 'let' assignment interacts with the existing field value.
+/// - Replace: overwrite the field (default behavior).
+/// - Append: concatenate the new value after the existing value.
+/// - Prepend: concatenate the new value before the existing value.
+enum class LetMode { Replace, Append, Prepend };
+
+/// Parsed let mode keyword and field name (e.g. `let append x` yields
+/// Mode=Append, Name="x"; plain `let x` yields Mode=Replace, Name="x").
+struct LetModeAndName {
----------------
jurahul wrote:

nit: wondering if we can just use a std::tuple here.

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


More information about the llvm-commits mailing list