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