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 | 527784b30f2676ccf9378665a5e290471c5336e9 (patch) | |
| tree | 6d26c39ddfe562fe37dbfc2ac6bb6f5437e476ed | |
| parent | 6f83fa99347ee220edecec703e90e126d1323b90 (diff) | |
| download | bcm5719-llvm-527784b30f2676ccf9378665a5e290471c5336e9.tar.gz bcm5719-llvm-527784b30f2676ccf9378665a5e290471c5336e9.zip | |
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
llvm-svn: 321648
| -rw-r--r-- | llvm/include/llvm/IR/Function.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h index 79c56abe1c3..def842f5fce 100644 --- a/llvm/include/llvm/IR/Function.h +++ b/llvm/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); } |

