summaryrefslogtreecommitdiff
path: root/include/llvm/IR
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-04-18 20:17:28 +0000
committerBill Wendling <isanbard@gmail.com>2013-04-18 20:17:28 +0000
commit8a6a7bb6a601061031cddd77129532a3b467300b (patch)
treeef2ec979b584f8ae34fa91952a3bf2bc01d45357 /include/llvm/IR
parentbb1b63c48397a3bac5d00f2ac9d33cc14efd714c (diff)
downloadllvm-8a6a7bb6a601061031cddd77129532a3b467300b.tar.gz
llvm-8a6a7bb6a601061031cddd77129532a3b467300b.tar.bz2
llvm-8a6a7bb6a601061031cddd77129532a3b467300b.tar.xz
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 'include/llvm/IR')
-rw-r--r--include/llvm/IR/Attributes.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h
index 9246ba26b5..4e113d6a61 100644
--- a/include/llvm/IR/Attributes.h
+++ b/include/llvm/IR/Attributes.h
@@ -209,7 +209,7 @@ private:
AttributeSetImpl *pImpl;
/// \brief The attributes for the specified index are returned.
- AttributeSetNode *getAttributes(unsigned Idx) const;
+ AttributeSetNode *getAttributes(unsigned Index) const;
/// \brief Create an AttributeSet with the specified parameters in it.
static AttributeSet get(LLVMContext &C,
@@ -233,35 +233,35 @@ public:
/// \brief Return an AttributeSet with the specified parameters in it.
static AttributeSet get(LLVMContext &C, ArrayRef<AttributeSet> Attrs);
- static AttributeSet get(LLVMContext &C, unsigned Idx,
+ static AttributeSet get(LLVMContext &C, unsigned Index,
ArrayRef<Attribute::AttrKind> Kind);
- static AttributeSet get(LLVMContext &C, unsigned Idx, AttrBuilder &B);
+ static AttributeSet get(LLVMContext &C, unsigned Index, AttrBuilder &B);
/// \brief Add an attribute to the attribute set at the given index. Since
/// attribute sets are immutable, this returns a new set.
- AttributeSet addAttribute(LLVMContext &C, unsigned Idx,
+ AttributeSet addAttribute(LLVMContext &C, unsigned Index,
Attribute::AttrKind Attr) const;
/// \brief Add an attribute to the attribute set at the given index. Since
/// attribute sets are immutable, this returns a new set.
- AttributeSet addAttribute(LLVMContext &C, unsigned Idx,
+ AttributeSet addAttribute(LLVMContext &C, unsigned Index,
StringRef Kind) const;
/// \brief Add attributes to the attribute set at the given index. Since
/// attribute sets are immutable, this returns a new set.
- AttributeSet addAttributes(LLVMContext &C, unsigned Idx,
+ AttributeSet addAttributes(LLVMContext &C, unsigned Index,
AttributeSet Attrs) const;
/// \brief Remove the specified attribute at the specified index from this
/// attribute list. Since attribute lists are immutable, this returns the new
/// list.
- AttributeSet removeAttribute(LLVMContext &C, unsigned Idx,
+ AttributeSet removeAttribute(LLVMContext &C, unsigned Index,
Attribute::AttrKind Attr) const;
/// \brief Remove the specified attributes at the specified index from this
/// attribute list. Since attribute lists are immutable, this returns the new
/// list.
- AttributeSet removeAttributes(LLVMContext &C, unsigned Idx,
+ AttributeSet removeAttributes(LLVMContext &C, unsigned Index,
AttributeSet Attrs) const;
//===--------------------------------------------------------------------===//
@@ -272,7 +272,7 @@ public:
LLVMContext &getContext() const;
/// \brief The attributes for the specified index are returned.
- AttributeSet getParamAttributes(unsigned Idx) const;
+ AttributeSet getParamAttributes(unsigned Index) const;
/// \brief The attributes for the ret value are returned.
AttributeSet getRetAttributes() const;
@@ -300,7 +300,7 @@ public:
Attribute getAttribute(unsigned Index, StringRef Kind) const;
/// \brief Return the alignment for the specified function parameter.
- unsigned getParamAlignment(unsigned Idx) const;
+ unsigned getParamAlignment(unsigned Index) const;
/// \brief Get the stack alignment.
unsigned getStackAlignment(unsigned Index) const;
@@ -311,8 +311,8 @@ public:
typedef ArrayRef<Attribute>::iterator iterator;
- iterator begin(unsigned Idx) const;
- iterator end(unsigned Idx) const;
+ iterator begin(unsigned Slot) const;
+ iterator end(unsigned Slot) const;
/// operator==/!= - Provide equality predicates.
bool operator==(const AttributeSet &RHS) const {