diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-04-18 20:17:28 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-04-18 20:17:28 +0000 |
commit | 8a6a7bb6a601061031cddd77129532a3b467300b (patch) | |
tree | ef2ec979b584f8ae34fa91952a3bf2bc01d45357 /lib/IR/AttributeImpl.h | |
parent | bb1b63c48397a3bac5d00f2ac9d33cc14efd714c (diff) | |
download | external_llvm-8a6a7bb6a601061031cddd77129532a3b467300b.zip external_llvm-8a6a7bb6a601061031cddd77129532a3b467300b.tar.gz external_llvm-8a6a7bb6a601061031cddd77129532a3b467300b.tar.bz2 |
Cleanup patch:
Semantics of parameters named Index and Idx were inconsistent between
"include/llvm/IR/Attributes.h", "lib/IR/AttributeImpl.h" and
"lib/IR/Attributes.cpp": sometimes these were fixed 1-based indexes of IR
parameters (or AttributeSet::ReturnIndex for IR return values or
AttributeSet::FunctionIndex for IR functions), other times they were the
internal slot for storage in the underlying AttributeSetImpl. I renamed usage of
the former to "Index" and usage of the latter to "Slot" ("Slot" was already
being used consistently for the latter in a subset of cases)
Patch by Stephen Lin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AttributeImpl.h')
-rw-r--r-- | lib/IR/AttributeImpl.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h index 7d34c72..b17aa43 100644 --- a/lib/IR/AttributeImpl.h +++ b/lib/IR/AttributeImpl.h @@ -248,15 +248,15 @@ public: typedef AttributeSetNode::iterator iterator; typedef AttributeSetNode::const_iterator const_iterator; - iterator begin(unsigned Idx) - { return AttrNodes[Idx].second->begin(); } - iterator end(unsigned Idx) - { return AttrNodes[Idx].second->end(); } - - const_iterator begin(unsigned Idx) const - { return AttrNodes[Idx].second->begin(); } - const_iterator end(unsigned Idx) const - { return AttrNodes[Idx].second->end(); } + iterator begin(unsigned Slot) + { return AttrNodes[Slot].second->begin(); } + iterator end(unsigned Slot) + { return AttrNodes[Slot].second->end(); } + + const_iterator begin(unsigned Slot) const + { return AttrNodes[Slot].second->begin(); } + const_iterator end(unsigned Slot) const + { return AttrNodes[Slot].second->end(); } void Profile(FoldingSetNodeID &ID) const { Profile(ID, AttrNodes); |