diff options
author | Dmitry Venikov <quolyk@gmail.com> | 2018-01-02 14:13:16 +0000 |
---|---|---|
committer | Dmitry Venikov <quolyk@gmail.com> | 2018-01-02 14:13:16 +0000 |
commit | 6f151b491ebe618163d802c1cce71d3f267c9506 (patch) | |
tree | 58ef147abf1ac322e20944d98c01100fefedf19e /include | |
parent | 21623270b8b07e1e82eca1f1dbd88d079176ca48 (diff) |
NFC. Add description comments to Function header
Reviewers: ruiu, davidxl, silvas, brzycki
Reviewed By: brzycki
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41609
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/IR/Function.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/IR/Function.h b/include/llvm/IR/Function.h index 79c56abe1c37..def842f5fcee 100644 --- a/include/llvm/IR/Function.h +++ b/include/llvm/IR/Function.h @@ -218,6 +218,7 @@ public: Attribute::get(getContext(), Kind, Val)); } + /// @brief Add function attributes to this function. void addFnAttr(Attribute Attr) { addAttribute(AttributeList::FunctionIndex, Attr); } @@ -268,6 +269,8 @@ public: bool hasFnAttribute(Attribute::AttrKind Kind) const { return AttributeSets.hasFnAttribute(Kind); } + + /// @brief Return true if the function has the attribute. bool hasFnAttribute(StringRef Kind) const { return AttributeSets.hasFnAttribute(Kind); } @@ -276,6 +279,8 @@ public: Attribute getFnAttribute(Attribute::AttrKind Kind) const { return getAttribute(AttributeList::FunctionIndex, Kind); } + + /// @brief Return the attribute for the given attribute kind. Attribute getFnAttribute(StringRef Kind) const { return getAttribute(AttributeList::FunctionIndex, Kind); } @@ -342,10 +347,12 @@ public: return getAttributes().hasParamAttribute(ArgNo, Kind); } + /// @brief gets the attribute from the list of attributes. Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const { return AttributeSets.getAttribute(i, Kind); } + /// @brief gets the attribute from the list of attributes. Attribute getAttribute(unsigned i, StringRef Kind) const { return AttributeSets.getAttribute(i, Kind); } |