diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-30 13:50:49 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-30 13:50:49 +0000 |
commit | 94e94b350652d3a71993bbc7d44afbe3b304605e (patch) | |
tree | 609b531981802fca42e99c872a3191b1219634c8 /include/llvm | |
parent | 8b62abdd7b9c8fc5d78dad86093f4afdfeba949d (diff) | |
download | llvm-94e94b350652d3a71993bbc7d44afbe3b304605e.tar.gz llvm-94e94b350652d3a71993bbc7d44afbe3b304605e.tar.bz2 llvm-94e94b350652d3a71993bbc7d44afbe3b304605e.tar.xz |
Use the predicate methods off of AttributeSet instead of Attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Attributes.h | 5 | ||||
-rw-r--r-- | include/llvm/Function.h | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index 8ce7651ae9..08063c15ed 100644 --- a/include/llvm/Attributes.h +++ b/include/llvm/Attributes.h @@ -143,9 +143,8 @@ public: static Attribute decodeLLVMAttributesForBitcode(LLVMContext &C, uint64_t EncodedAttrs); - /// \brief The set of attributes set in Attribute is converted to a string of - /// equivalent mnemonics. This is, presumably, for writing out the mnemonics - /// for the assembly writer. + /// \brief The Attribute is converted to a string of equivalent mnemonic. This + /// is, presumably, for writing out the mnemonics for the assembly writer. std::string getAsString() const; }; diff --git a/include/llvm/Function.h b/include/llvm/Function.h index db61250a60..d551caec90 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -264,15 +264,13 @@ public: /// @brief Determine if the function returns a structure through first /// pointer argument. bool hasStructRetAttr() const { - return AttributeList.getParamAttributes(1). - hasAttribute(Attribute::StructRet); + return AttributeList.hasAttribute(1, 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 AttributeList.getParamAttributes(n). - hasAttribute(Attribute::NoAlias); + return AttributeList.hasAttribute(n, Attribute::NoAlias); } void setDoesNotAlias(unsigned n) { addAttribute(n, Attribute::get(getContext(), Attribute::NoAlias)); @@ -281,8 +279,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 AttributeList.getParamAttributes(n). - hasAttribute(Attribute::NoCapture); + return AttributeList.hasAttribute(n, Attribute::NoCapture); } void setDoesNotCapture(unsigned n) { addAttribute(n, Attribute::get(getContext(), Attribute::NoCapture)); |