[llvm] 2d27f24 - [NFC] Make documentation for CallBase::hasFnAttr() more clear.

Kevin P. Neal via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 21 10:00:18 PDT 2020


Author: Kevin P. Neal
Date: 2020-07-21T12:59:24-04:00
New Revision: 2d27f24b5a4728ff30cf245b7fd08ef2d3b8d425

URL: https://github.com/llvm/llvm-project/commit/2d27f24b5a4728ff30cf245b7fd08ef2d3b8d425
DIFF: https://github.com/llvm/llvm-project/commit/2d27f24b5a4728ff30cf245b7fd08ef2d3b8d425.diff

LOG: [NFC] Make documentation for CallBase::hasFnAttr() more clear.

Added: 
    

Modified: 
    llvm/include/llvm/IR/InstrTypes.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h
index 07af00ec9240..ce0744bbf087 100644
--- a/llvm/include/llvm/IR/InstrTypes.h
+++ b/llvm/include/llvm/IR/InstrTypes.h
@@ -1393,14 +1393,18 @@ class CallBase : public Instruction {
   ///
   void setAttributes(AttributeList A) { Attrs = A; }
 
-  /// Determine whether this call has the given attribute.
+  /// Determine whether this call has the given attribute. If it does not
+  /// then determine if the called function has the attribute, but only if
+  /// the attribute is allowed for the call.
   bool hasFnAttr(Attribute::AttrKind Kind) const {
     assert(Kind != Attribute::NoBuiltin &&
            "Use CallBase::isNoBuiltin() to check for Attribute::NoBuiltin");
     return hasFnAttrImpl(Kind);
   }
 
-  /// Determine whether this call has the given attribute.
+  /// Determine whether this call has the given attribute. If it does not
+  /// then determine if the called function has the attribute, but only if
+  /// the attribute is allowed for the call.
   bool hasFnAttr(StringRef Kind) const { return hasFnAttrImpl(Kind); }
 
   /// adds the attribute to the list of attributes.


        


More information about the llvm-commits mailing list