]> granicus.if.org Git - llvm/commitdiff
NFC. Add description comments to Function header
authorDmitry Venikov <quolyk@gmail.com>
Tue, 2 Jan 2018 14:13:16 +0000 (14:13 +0000)
committerDmitry Venikov <quolyk@gmail.com>
Tue, 2 Jan 2018 14:13:16 +0000 (14:13 +0000)
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

include/llvm/IR/Function.h

index 79c56abe1c377bf8f6f84047fb063d296bed5943..def842f5fcee14e6b358d7f8a22012b1a6d63ad0 100644 (file)
@@ -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);
   }