[LLVMdev] Adding/checking an attribute to function argument (original) (raw)
Tarun Prabhu tarunprabhu at gmail.com
Thu Jul 9 19:06:57 PDT 2015
- Previous message: [LLVMdev] Windows interface for clang
- Next message: [LLVMdev] Adding/checking an attribute to function argument
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
I am trying to add custom attributes to function arguments. I can add them using Argument->addAttr().
| AttrBuilder attrbuilder; | Attribute attr = Attribute::get(context, "attrname", "attrval"); | attrBuilder.addAttribute(attr); | arg->addAttr(AttributeSet::get(context, 0, attrBuilder));
But I can't find a way to check if a Argument has attribute "attrname".
You can do this for functions with addFnAttribute("attrname", "attrval"), and then query it with hasFnAttribute("attrname").
Is there a similar API for Arguments which, for some reason, doesn't appear in the documentation?
Thanks,
Tarun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150709/863df909/attachment.html>
- Previous message: [LLVMdev] Windows interface for clang
- Next message: [LLVMdev] Adding/checking an attribute to function argument
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]