Skip to content

Commit e169673

Browse files
committed
Update docs
1 parent e235152 commit e169673

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

llvm/docs/TableGen/BackGuide.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -610,29 +610,29 @@ functions returns null.
610610
Getting Record Superclasses
611611
===========================
612612

613-
The ``Record`` class provides a function to obtain the superclasses of a
614-
record. It is named ``getSuperClasses`` and returns an ``ArrayRef`` of an
615-
array of ``std::pair`` pairs. The superclasses are in post-order: the order
616-
in which the superclasses were visited while copying their fields into the
617-
record. Each pair consists of a pointer to the ``Record`` instance for a
618-
superclass record and an instance of the ``SMRange`` class. The range
619-
indicates the source file locations of the beginning and end of the class
620-
definition.
613+
The ``Record`` class provides a function to obtain the direct superclasses
614+
of a record. It is named ``getDirectSuperClasses`` and returns an
615+
``ArrayRef`` of an array of ``std::pair`` pairs. Each pair consists of a
616+
pointer to the ``Record`` instance for a superclass record and an instance
617+
of the ``SMRange`` class. The range indicates the source file locations of
618+
the beginning and end of the class definition.
621619

622-
This example obtains the superclasses of the ``Prototype`` record and then
623-
iterates over the pairs in the returned array.
620+
This example obtains the direct superclasses of the ``Prototype`` record and
621+
then iterates over the pairs in the returned array.
624622

625623
.. code-block:: text
626624
627625
ArrayRef<std::pair<const Record *, SMRange>>
628-
Superclasses = Prototype->getSuperClasses();
629-
for (const auto &SuperPair : Superclasses) {
626+
Superclasses = Prototype->getDirectSuperClasses();
627+
for (const auto &[Super, Range] : Superclasses) {
630628
...
631629
}
632630
633-
The ``Record`` class also provides a function, ``getDirectSuperClasses``, to
634-
append the *direct* superclasses of a record to a given vector of type
635-
``SmallVectorImpl<Record *>``.
631+
The ``Record`` class also provides a function, ``getSuperClasses``, to
632+
append *all* superclasses of a record to a given vector of type
633+
``SmallVectorImpl<Record *>``. The superclasses are in post-order: the order
634+
in which the superclasses were visited while copying their fields into the
635+
record.
636636

637637
Emitting Text to the Output Stream
638638
==================================

0 commit comments

Comments
 (0)