From 2d27f24b5a4728ff30cf245b7fd08ef2d3b8d425 Mon Sep 17 00:00:00 2001 From: "Kevin P. Neal" Date: Tue, 21 Jul 2020 12:55:25 -0400 Subject: [PATCH] [NFC] Make documentation for CallBase::hasFnAttr() more clear. --- llvm/include/llvm/IR/InstrTypes.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h index 07af00e..ce0744b 100644 --- a/llvm/include/llvm/IR/InstrTypes.h +++ b/llvm/include/llvm/IR/InstrTypes.h @@ -1393,14 +1393,18 @@ public: /// 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. -- 2.7.4