diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-25 21:30:53 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-25 21:30:53 +0000 |
commit | 25e65a61ccc6a68b522ef841f949755fab5bb263 (patch) | |
tree | 631e2fabe7728ebea9ea78223ddcdeedcf5b04c7 /llvm/lib/IR/AttributeImpl.h | |
parent | a520a7dcf3c681b75373357c6fec65b4d4aa7440 (diff) | |
download | bcm5719-llvm-25e65a61ccc6a68b522ef841f949755fab5bb263.tar.gz bcm5719-llvm-25e65a61ccc6a68b522ef841f949755fab5bb263.zip |
Add an accessor method to get the slot's index. This will limit the use of AttributeWithIndex.
llvm-svn: 173495
Diffstat (limited to 'llvm/lib/IR/AttributeImpl.h')
-rw-r--r-- | llvm/lib/IR/AttributeImpl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h index b35e5e0f0b3..ebd90e29e21 100644 --- a/llvm/lib/IR/AttributeImpl.h +++ b/llvm/lib/IR/AttributeImpl.h @@ -122,6 +122,10 @@ public: LLVMContext &getContext() { return Context; } ArrayRef<AttributeWithIndex> getAttributes() const { return AttrList; } unsigned getNumAttributes() const { return AttrList.size(); } + unsigned getSlotIndex(unsigned Slot) const { + // FIXME: This needs to use AttrNodes instead. + return AttrList[Slot].Index; + } void Profile(FoldingSetNodeID &ID) const { Profile(ID, AttrList); |