Skip to content

Commit a34e8c3

Browse files
[llvm] Proofread TableGen/BackGuide.rst (llvm#164365)
1 parent 956836c commit a34e8c3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

llvm/docs/TableGen/BackGuide.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ information is coded in a declarative style involving classes and records,
1717
which are then processed by TableGen. The internalized records are passed on
1818
to various backends, which extract information from a subset of the records
1919
and generate an output file. These output files are typically ``.inc`` files
20-
for C++, but may be any type of file that the backend developer needs.
20+
for C++, but they may be any type of file that the backend developer needs.
2121

2222
This document is a guide to writing a backend for TableGen. It is not a
2323
complete reference manual, but rather a guide to using the facilities
@@ -114,7 +114,7 @@ The ``Record`` class provides many useful functions.
114114
superclasses.
115115

116116
* Functions to get a particular field value by specifying its name in various
117-
forms, and returning its value in various forms
117+
forms and returning its value in various forms
118118
(see `Getting Record Names and Fields`_).
119119

120120
* Boolean functions to check the various attributes of the record.
@@ -301,7 +301,7 @@ The ``BitInit`` class is a subclass of ``TypedInit``. Its instances
301301
represent the possible values of a bit: 0 or 1. It includes a data member
302302
that contains the bit.
303303

304-
*All* of the classes derived from ``TypedInit`` provide the following functions.
304+
*All* of the classes derived from ``TypedInit`` provide the following functions:
305305

306306
* A static function named ``get()`` that returns an ``Init`` representing
307307
the specified value(s). In the case of ``BitInit``, ``get(true)`` returns
@@ -334,7 +334,7 @@ The class provides the following additional functions.
334334
~~~~~~~~~~~
335335

336336
The ``DagInit`` class is a subclass of ``TypedInit``. Its instances
337-
represent the possible direct acyclic graphs (``dag``).
337+
represent the possible directed acyclic graphs (``dag``).
338338

339339
The class includes a pointer to an ``Init`` for the DAG operator and a
340340
pointer to a ``StringInit`` for the operator name. It includes the count of
@@ -357,7 +357,7 @@ The class provides many additional functions:
357357
* Functions to get the operands, both individually and together.
358358

359359
* Functions to determine whether there are any names and to
360-
get the number of names
360+
get the number of names.
361361

362362
* Functions to get the names, both individually and together.
363363

@@ -410,7 +410,7 @@ The class provides the usual ``get()`` and ``getValues()`` functions. The
410410
latter function returns an ``ArrayRef`` of the vector of pointers to ``Init``
411411
instances.
412412

413-
The class provides these additional functions.
413+
The class provides these additional functions:
414414

415415
* A function to get the element type.
416416

@@ -461,7 +461,7 @@ The Backend Skeleton
461461
====================
462462

463463
The file ``TableGenBackendSkeleton.cpp`` provides a skeleton C++ translation
464-
unit for writing a new TableGen backend. Here are a few notes on the file.
464+
unit for writing a new TableGen backend. Here are a few notes on the file:
465465

466466
* The list of includes is the minimal list required by most backends.
467467

@@ -484,7 +484,7 @@ unit for writing a new TableGen backend. Here are a few notes on the file.
484484
* The ``run`` function should use the ``emitSourceFileHeader`` helper function
485485
to include a standard header in the emitted file.
486486

487-
* Register the class or the function as the command line option
487+
* Register the class or the function as the command-line option
488488
with ``llvm/TableGen/TableGenBackend.h``.
489489

490490
* Use ``llvm::TableGen::Emitter::OptClass<AddressModesEmitter>``
@@ -516,7 +516,7 @@ If you need to iterate over all the class records:
516516
...
517517
}
518518
519-
``ClassPair.second`` gets the class's ``unique_ptr``, then ``.get()`` gets the
519+
``ClassPair.second`` gets the class's ``unique_ptr``, and then ``.get()`` gets the
520520
class ``Record`` itself.
521521

522522

@@ -612,7 +612,7 @@ Getting Record Superclasses
612612

613613
The ``Record`` class provides a function to obtain the direct superclasses
614614
of a record. It is named ``getDirectSuperClasses`` and returns an
615-
``ArrayRef`` of an array of ``std::pair`` pairs. Each pair consists of a
615+
``ArrayRef`` of an array of ``std::pair`` instances. Each pair consists of a
616616
pointer to the ``Record`` instance for a superclass record and an instance
617617
of the ``SMRange`` class. The range indicates the source file locations of
618618
the beginning and end of the class definition.
@@ -630,7 +630,7 @@ then iterates over the pairs in the returned array.
630630
631631
The ``Record`` class also provides a function, ``getSuperClasses``, to
632632
return a vector of *all* superclasses of a record. The superclasses are in
633-
post-order: the order in which the superclasses were visited while copying
633+
postorder: the order in which the superclasses were visited while copying
634634
their fields into the record.
635635

636636
Emitting Text to the Output Stream
@@ -752,7 +752,7 @@ The ``PrintDetailedRecords`` Backend
752752
The TableGen command option ``--print-detailed-records`` invokes a backend
753753
that prints all the global variables, classes, and records defined in the
754754
source files. The format of the output is *not* guaranteed to be constant
755-
over time. The output looks like this.
755+
over time. The output looks like this:
756756

757757
.. code-block:: text
758758

0 commit comments

Comments
 (0)