summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-09-26 22:15:19 +0000
committerBill Wendling <isanbard@gmail.com>2012-09-26 22:15:19 +0000
commit896f37f0f9fa928987a66dca6d67aec38895091b (patch)
tree08244eeff73a79a5e62ad21880f7624d705b159a /include
parent2c189061184925c6a8ecbb5a19e648b230a41c0e (diff)
downloadllvm-896f37f0f9fa928987a66dca6d67aec38895091b.tar.gz
llvm-896f37f0f9fa928987a66dca6d67aec38895091b.tar.bz2
llvm-896f37f0f9fa928987a66dca6d67aec38895091b.tar.xz
Query the parameter attributes directly instead of using the Attribute symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Function.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 6d3ee03fea..907b14f599 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -272,13 +272,13 @@ public:
/// @brief Determine if the function returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
- return paramHasAttr(1, Attribute::StructRet);
+ return getParamAttributes(1).hasStructRetAttr();
}
/// @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 paramHasAttr(n, Attribute::NoAlias);
+ return getParamAttributes(n).hasNoAliasAttr();
}
void setDoesNotAlias(unsigned n, bool DoesNotAlias = true) {
if (DoesNotAlias) addAttribute(n, Attribute::NoAlias);
@@ -288,7 +288,7 @@ 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 paramHasAttr(n, Attribute::NoCapture);
+ return getParamAttributes(n).hasNoCaptureAttr();
}
void setDoesNotCapture(unsigned n, bool DoesNotCapture = true) {
if (DoesNotCapture) addAttribute(n, Attribute::NoCapture);