summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AttributeImpl.h
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-04-24 22:25:02 +0000
committerReid Kleckner <rnk@google.com>2017-04-24 22:25:02 +0000
commit63b26f0eeadc411ce877bfe340f5fac128397f5f (patch)
tree659d28f96c53cde43a3d37ab34f1d5071de3928a /llvm/lib/IR/AttributeImpl.h
parent729377f06303485eea7c2e031af4eb7f13c0cb96 (diff)
downloadbcm5719-llvm-63b26f0eeadc411ce877bfe340f5fac128397f5f.tar.gz
bcm5719-llvm-63b26f0eeadc411ce877bfe340f5fac128397f5f.zip
Make getSlotAttributes return an AttributeSet instead of a wrapper list
Remove the temporary, poorly named getSlotSet method which did the same thing. Also remove getSlotNode, which is a hold-over from when we were dealing with AttributeSetNode* instead of AttributeSet. llvm-svn: 301267
Diffstat (limited to 'llvm/lib/IR/AttributeImpl.h')
-rw-r--r--llvm/lib/IR/AttributeImpl.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h
index 09f03736579..cf292525469 100644
--- a/llvm/lib/IR/AttributeImpl.h
+++ b/llvm/lib/IR/AttributeImpl.h
@@ -255,17 +255,10 @@ public:
/// \brief Retrieve the attribute set node for the given "slot" in the
/// AttrNode list.
- AttributeSet getSlotNode(unsigned Slot) const {
+ AttributeSet getSlotAttributes(unsigned Slot) const {
return getSlotPair(Slot)->second;
}
- /// \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.
- AttributeList getSlotAttributes(unsigned Slot) const {
- return AttributeList::get(Context, *getSlotPair(Slot));
- }
-
/// \brief Return true if the AttributeSet or the FunctionIndex has an
/// enum attribute of the given kind.
bool hasFnAttribute(Attribute::AttrKind Kind) const {
@@ -273,8 +266,10 @@ public:
}
typedef AttributeSet::iterator iterator;
- iterator begin(unsigned Slot) const { return getSlotNode(Slot).begin(); }
- iterator end(unsigned Slot) const { return getSlotNode(Slot).end(); }
+ iterator begin(unsigned Slot) const {
+ return getSlotAttributes(Slot).begin();
+ }
+ iterator end(unsigned Slot) const { return getSlotAttributes(Slot).end(); }
void Profile(FoldingSetNodeID &ID) const;
static void Profile(FoldingSetNodeID &ID,
OpenPOWER on IntegriCloud