summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-12-30 12:45:13 +0000
committerBill Wendling <isanbard@gmail.com>2012-12-30 12:45:13 +0000
commit39cd0c8e477255a7296b2bd1dc67193f8d38c003 (patch)
tree554bb34610153ab2b8cd996b6b2a8ca23ba0687b /include/llvm
parent831737d329a727f53a1fb0572f7b7a8127208881 (diff)
downloadllvm-39cd0c8e477255a7296b2bd1dc67193f8d38c003.tar.gz
llvm-39cd0c8e477255a7296b2bd1dc67193f8d38c003.tar.bz2
llvm-39cd0c8e477255a7296b2bd1dc67193f8d38c003.tar.xz
Remove Function::getParamAttributes and use the AttributeSet accessor methods instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Function.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index ba04098dfe..1a65950aa8 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -189,17 +189,11 @@ public:
void setGC(const char *Str);
void clearGC();
-
/// getRetAttributes - Return the return attributes for querying.
Attribute getRetAttributes() const {
return AttributeList.getRetAttributes();
}
- /// getParamAttributes - Return the parameter attributes for querying.
- Attribute getParamAttributes(unsigned Idx) const {
- return AttributeList.getParamAttributes(Idx);
- }
-
/// addAttribute - adds the attribute to the list of attributes.
void addAttribute(unsigned i, Attribute attr);
@@ -275,13 +269,15 @@ public:
/// @brief Determine if the function returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
- return getParamAttributes(1).hasAttribute(Attribute::StructRet);
+ return AttributeList.getParamAttributes(1).
+ hasAttribute(Attribute::StructRet);
}
/// @brief Determine if the parameter does not alias other parameters.
/// @param n The parameter to check. 1 is the first parameter, 0 is the return
bool doesNotAlias(unsigned n) const {
- return getParamAttributes(n).hasAttribute(Attribute::NoAlias);
+ return AttributeList.getParamAttributes(n).
+ hasAttribute(Attribute::NoAlias);
}
void setDoesNotAlias(unsigned n) {
addAttribute(n, Attribute::get(getContext(), Attribute::NoAlias));
@@ -290,7 +286,8 @@ public:
/// @brief Determine if the parameter can be captured.
/// @param n The parameter to check. 1 is the first parameter, 0 is the return
bool doesNotCapture(unsigned n) const {
- return getParamAttributes(n).hasAttribute(Attribute::NoCapture);
+ return AttributeList.getParamAttributes(n).
+ hasAttribute(Attribute::NoCapture);
}
void setDoesNotCapture(unsigned n) {
addAttribute(n, Attribute::get(getContext(), Attribute::NoCapture));