[llvm] [TableGen][Docs] ValueList should allow a trailing comma (PR #124728)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 02:59:35 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-tablegen

Author: Jay Foad (jayfoad)

<details>
<summary>Changes</summary>

TableGen accepts trailing commas like [1,2,] and {1,2,}.


---
Full diff: https://github.com/llvm/llvm-project/pull/124728.diff


1 Files Affected:

- (modified) llvm/docs/TableGen/ProgRef.rst (+1-1) 


``````````diff
diff --git a/llvm/docs/TableGen/ProgRef.rst b/llvm/docs/TableGen/ProgRef.rst
index cfe61382658ec4..74fb2bea25233c 100644
--- a/llvm/docs/TableGen/ProgRef.rst
+++ b/llvm/docs/TableGen/ProgRef.rst
@@ -392,7 +392,7 @@ A question mark represents an uninitialized value.
 .. productionlist::
    SimpleValue4: "{" [`ValueList`] "}"
    ValueList: `ValueListNE`
-   ValueListNE: `Value` ("," `Value`)*
+   ValueListNE: `Value` ("," `Value`)* [","]
 
 This value represents a sequence of bits, which can be used to initialize a
 ``bits<``\ *n*\ ``>`` field (note the braces). When doing so, the values

``````````

</details>


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


More information about the llvm-commits mailing list