aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/AttributeImpl.h
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-03-21 16:57:19 +0000
committerReid Kleckner <rnk@google.com>2017-03-21 16:57:19 +0000
commit6707770d481ea95dee07c22f675a8de8879e4557 (patch)
tree2f443c18fe06baadbf7af79a82306a24adb3cc0e /lib/IR/AttributeImpl.h
parent45fb365cc4f4a1e7aa31d4fbe4e08dc47919cafc (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AttributeImpl.h')
-rw-r--r--lib/IR/AttributeImpl.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h
index d0d27101aa8..01140b70bfc 100644
--- a/lib/IR/AttributeImpl.h
+++ b/lib/IR/AttributeImpl.h
@@ -150,10 +150,10 @@ typedef std::pair<unsigned, AttributeSetNode *> IndexAttrPair;
/// \class
/// \brief This class represents a set of attributes that apply to the function,
/// return type, and parameters.
-class AttributeSetImpl final
+class AttributeListImpl final
: public FoldingSetNode,
- private TrailingObjects<AttributeSetImpl, IndexAttrPair> {
- friend class AttributeSet;
+ private TrailingObjects<AttributeListImpl, IndexAttrPair> {
+ friend class AttributeList;
friend TrailingObjects;
private:
@@ -171,8 +171,8 @@ private:
}
public:
- AttributeSetImpl(LLVMContext &C,
- ArrayRef<std::pair<unsigned, AttributeSetNode *>> Slots)
+ AttributeListImpl(LLVMContext &C,
+ ArrayRef<std::pair<unsigned, AttributeSetNode *>> Slots)
: Context(C), NumSlots(Slots.size()), AvailableFunctionAttrs(0) {
static_assert(Attribute::EndAttrKinds <=
sizeof(AvailableFunctionAttrs) * CHAR_BIT,
@@ -192,10 +192,10 @@ public:
// Initialize AvailableFunctionAttrs summary bitset.
if (NumSlots > 0) {
- static_assert(AttributeSet::FunctionIndex == ~0u,
+ static_assert(AttributeList::FunctionIndex == ~0u,
"FunctionIndex should be biggest possible index");
const std::pair<unsigned, AttributeSetNode *> &Last = Slots.back();
- if (Last.first == AttributeSet::FunctionIndex) {
+ if (Last.first == AttributeList::FunctionIndex) {
const AttributeSetNode *Node = Last.second;
for (Attribute I : *Node) {
if (!I.isStringAttribute())
@@ -206,12 +206,12 @@ public:
}
// AttributesSetImpt is uniqued, these should not be available.
- AttributeSetImpl(const AttributeSetImpl &) = delete;
- AttributeSetImpl &operator=(const AttributeSetImpl &) = delete;
+ AttributeListImpl(const AttributeListImpl &) = delete;
+ AttributeListImpl &operator=(const AttributeListImpl &) = delete;
void operator delete(void *p) { ::operator delete(p); }
- /// \brief Get the context that created this AttributeSetImpl.
+ /// \brief Get the context that created this AttributeListImpl.
LLVMContext &getContext() { return Context; }
/// \brief Return the number of slots used in this attribute list. This is
@@ -230,8 +230,8 @@ public:
/// \brief Retrieve the attributes for the given "slot" in the AttrNode list.
/// \p Slot is an index into the AttrNodes list, not the index of the return /
/// parameter/ function which the attributes apply to.
- AttributeSet getSlotAttributes(unsigned Slot) const {
- return AttributeSet::get(Context, *getNode(Slot));
+ AttributeList getSlotAttributes(unsigned Slot) const {
+ return AttributeList::get(Context, *getNode(Slot));
}
/// \brief Retrieve the attribute set node for the given "slot" in the