[PATCH] D22204: Add getReturnedArgOperand to Call/InvokeInst, CallSite
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 10 16:00:33 PDT 2016
majnemer added inline comments.
================
Comment at: include/llvm/IR/Attributes.h:343-344
@@ -343,1 +342,4 @@
+ /// of a parameter with the specified attribute is provided.
+ bool hasAttrSomewhere(Attribute::AttrKind Kind,
+ unsigned *Index = nullptr) const;
----------------
hfinkel wrote:
> majnemer wrote:
> > hfinkel wrote:
> > > majnemer wrote:
> > > > Maybe this interface would be nicer if it returned an `Optional<bool>`. I think it would have minimal impact on the callers.
> > > True. I'd need to update all existing callers to call hasValue(), right? I can do that separately.
> > No, `Optional` has an `explicit operator bool()`.
> OIC, thanks! I think I'll do this later regardless because I should, however, also rename the function when I do this. It should become something like:
>
> Optional<unsigned> getAttrIndex(Attribute::AttrKind Kind) const;
>
SGTM
http://reviews.llvm.org/D22204
More information about the llvm-commits
mailing list