[llvm] [TableGen][Docs] Defm ParentClassList cannot be empty (PR #124740)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 05:13:24 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-tablegen

Author: Jay Foad (jayfoad)

<details>
<summary>Changes</summary>

For Def, Class and MultiClass, the ParentClassList may be empty. Fix the
production for Defm where it cannot.


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


1 Files Affected:

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


``````````diff
diff --git a/llvm/docs/TableGen/ProgRef.rst b/llvm/docs/TableGen/ProgRef.rst
index cfe61382658ec4..7371ab5d22e249 100644
--- a/llvm/docs/TableGen/ProgRef.rst
+++ b/llvm/docs/TableGen/ProgRef.rst
@@ -970,10 +970,10 @@ multiclasses. Those record definitions are specified by ``def``
 statements in the multiclasses, and indirectly by ``defm`` statements.
 
 .. productionlist::
-   Defm: "defm" [`NameValue`] `ParentClassList` ";"
+   Defm: "defm" [`NameValue`] `ParentClassListNE` ";"
 
 The optional :token:`NameValue` is formed in the same way as the name of a
-``def``. The :token:`ParentClassList` is a colon followed by a list of at
+``def``. The :token:`ParentClassListNE` is a colon followed by a list of at
 least one multiclass and any number of regular classes. The multiclasses
 must precede the regular classes. Note that the ``defm`` does not have a
 body.

``````````

</details>


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


More information about the llvm-commits mailing list