[PATCH] D85853: Eliminate Sphinx warnings from Tablegen/LangRef.rst

Paul C. Anagnostopoulos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 13:14:07 PDT 2020


Paul-C-Anagnostopoulos created this revision.
Paul-C-Anagnostopoulos added a reviewer: nhaehnle.
Herald added a reviewer: jdoerfert.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Paul-C-Anagnostopoulos requested review of this revision.

The TableGen Language Reference document uses the SimpleValue production 10 times. This generates 9 warnings from Sphinx about duplicate production names. I fixed this by appending suffixes "2", "3", etc., to the production names, making them unique.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85853

Files:
  llvm/docs/TableGen/LangRef.rst


Index: llvm/docs/TableGen/LangRef.rst
===================================================================
--- llvm/docs/TableGen/LangRef.rst
+++ llvm/docs/TableGen/LangRef.rst
@@ -268,28 +268,28 @@
 * the implicit template argument ``NAME`` in a ``class`` or ``multiclass``
 
 .. productionlist::
-   SimpleValue: `TokInteger`
+   SimpleValue2: `TokInteger`
 
 This represents the numeric value of the integer.
 
 .. productionlist::
-   SimpleValue: `TokString`+
+   SimpleValue3: `TokString`+
 
 Multiple adjacent string literals are concatenated like in C/C++. The value
 is the concatenation of the strings.
 
 .. productionlist::
-   SimpleValue: `TokCodeFragment`
+   SimpleValue4: `TokCodeFragment`
 
 The value is the string value of the code fragment.
 
 .. productionlist::
-   SimpleValue: "?"
+   SimpleValue5: "?"
 
 ``?`` represents an "unset" initializer.
 
 .. productionlist::
-   SimpleValue: "{" `ValueList` "}"
+   SimpleValue6: "{" `ValueList` "}"
    ValueList: [`ValueListNE`]
    ValueListNE: `Value` ("," `Value`)*
 
@@ -297,14 +297,14 @@
 ``bits<n>`` field (where ``n`` is the number of bits).
 
 .. productionlist::
-   SimpleValue: `ClassID` "<" `ValueListNE` ">"
+   SimpleValue7: `ClassID` "<" `ValueListNE` ">"
 
 This generates a new anonymous record definition (as would be created by an
 unnamed ``def`` inheriting from the given class with the given template
 arguments) and the value is the value of that record definition.
 
 .. productionlist::
-   SimpleValue: "[" `ValueList` "]" ["<" `Type` ">"]
+   SimpleValue8: "[" `ValueList` "]" ["<" `Type` ">"]
 
 A list initializer. The optional :token:`Type` can be used to indicate a
 specific element type, otherwise the element type will be deduced from the
@@ -315,14 +315,14 @@
    leave it out.
 
 .. productionlist::
-   SimpleValue: "(" `DagArg` [`DagArgList`] ")"
+   SimpleValue9: "(" `DagArg` [`DagArgList`] ")"
    DagArgList: `DagArg` ("," `DagArg`)*
    DagArg: `Value` [":" `TokVarName`] | `TokVarName`
 
 The initial :token:`DagArg` is called the "operator" of the dag.
 
 .. productionlist::
-   SimpleValue: `BangOperator` ["<" `Type` ">"] "(" `ValueListNE` ")"
+   SimpleValue10: `BangOperator` ["<" `Type` ">"] "(" `ValueListNE` ")"
               :| `CondOperator` "(" `CondVal` ("," `CondVal`)* ")"
    CondVal: `Value` ":" `Value`
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85853.285168.patch
Type: text/x-patch
Size: 2339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200812/202218e1/attachment.bin>


More information about the llvm-commits mailing list