diff options
author | Reid Kleckner <rnk@google.com> | 2017-03-21 16:57:19 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2017-03-21 16:57:19 +0000 |
commit | b518054b87c40afc4c301dfb26eaa11ee8902208 (patch) | |
tree | b1696798e0788018bf6ec60ef17d314968b895f9 /llvm/docs/HowToUseAttributes.rst | |
parent | 3b25c91a9e7769e3254c27979c833fb7185a9fd0 (diff) | |
download | bcm5719-llvm-b518054b87c40afc4c301dfb26eaa11ee8902208.tar.gz bcm5719-llvm-b518054b87c40afc4c301dfb26eaa11ee8902208.zip |
Rename AttributeSet to AttributeList
Summary:
This class is a list of AttributeSetNodes corresponding the function
prototype of a call or function declaration. This class used to be
called ParamAttrListPtr, then AttrListPtr, then AttributeSet. It is
typically accessed by parameter and return value index, so
"AttributeList" seems like a more intuitive name.
Rename AttributeSetImpl to AttributeListImpl to follow suit.
It's useful to rename this class so that we can rename AttributeSetNode
to AttributeSet later. AttributeSet is the set of attributes that apply
to a single function, argument, or return value.
Reviewers: sanjoy, javed.absar, chandlerc, pete
Reviewed By: pete
Subscribers: pete, jholewinski, arsenm, dschuff, mehdi_amini, jfb, nhaehnle, sbc100, void, llvm-commits
Differential Revision: https://reviews.llvm.org/D31102
llvm-svn: 298393
Diffstat (limited to 'llvm/docs/HowToUseAttributes.rst')
-rw-r--r-- | llvm/docs/HowToUseAttributes.rst | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/llvm/docs/HowToUseAttributes.rst b/llvm/docs/HowToUseAttributes.rst index 66c44c01f63..bb7f63f43a3 100644 --- a/llvm/docs/HowToUseAttributes.rst +++ b/llvm/docs/HowToUseAttributes.rst @@ -38,36 +38,35 @@ Because attributes are no longer represented as a bit mask, you will need to convert any code which does treat them as a bit mask to use the new query methods on the Attribute class. -``AttributeSet`` +``AttributeList`` ================ -The ``AttributeSet`` class replaces the old ``AttributeList`` class. The -``AttributeSet`` stores a collection of Attribute objects for each kind of -object that may have an attribute associated with it: the function as a -whole, the return type, or the function's parameters. A function's attributes -are at index ``AttributeSet::FunctionIndex``; the return type's attributes are -at index ``AttributeSet::ReturnIndex``; and the function's parameters' -attributes are at indices 1, ..., n (where 'n' is the number of parameters). -Most methods on the ``AttributeSet`` class take an index parameter. +The ``AttributeList`` stores a collection of Attribute objects for each kind of +object that may have an attribute associated with it: the function as a whole, +the return type, or the function's parameters. A function's attributes are at +index ``AttributeList::FunctionIndex``; the return type's attributes are at +index ``AttributeList::ReturnIndex``; and the function's parameters' attributes +are at indices 1, ..., n (where 'n' is the number of parameters). Most methods +on the ``AttributeList`` class take an index parameter. -An ``AttributeSet`` is also a uniqued and immutable object. You create an -``AttributeSet`` through the ``AttributeSet::get`` methods. You can add and -remove attributes, which result in the creation of a new ``AttributeSet``. +An ``AttributeList`` is also a uniqued and immutable object. You create an +``AttributeList`` through the ``AttributeList::get`` methods. You can add and +remove attributes, which result in the creation of a new ``AttributeList``. -An ``AttributeSet`` object is designed to be passed around by value. +An ``AttributeList`` object is designed to be passed around by value. -Note: It is advised that you do *not* use the ``AttributeSet`` "introspection" +Note: It is advised that you do *not* use the ``AttributeList`` "introspection" methods (e.g. ``Raw``, ``getRawPointer``, etc.). These methods break encapsulation, and may be removed in a future release (i.e. LLVM 4.0). ``AttrBuilder`` =============== -Lastly, we have a "builder" class to help create the ``AttributeSet`` object +Lastly, we have a "builder" class to help create the ``AttributeList`` object without having to create several different intermediate uniqued -``AttributeSet`` objects. The ``AttrBuilder`` class allows you to add and +``AttributeList`` objects. The ``AttrBuilder`` class allows you to add and remove attributes at will. The attributes won't be uniqued until you call the -appropriate ``AttributeSet::get`` method. +appropriate ``AttributeList::get`` method. An ``AttrBuilder`` object is *not* designed to be passed around by value. It should be passed by reference. |