[PATCH] D53342: [SimplifyLibCalls] Mark known arguments with nonnull
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 11:53:36 PDT 2019
jdoerfert added a comment.
In D53342#1637822 <https://reviews.llvm.org/D53342#1637822>, @xbolva00 wrote:
> For some cases I would like to copy just attributes for argno 0 - but I dont know to do it :(
>
> I mean something like this:
>
> NewCI->setAttrubutes(0, CI->getAttributes(0))
>
> Maybe you can help me?
Take the attribute list (`getAttributes()`) then `getParamAttributes(ArgNo)`, then probably foreach `addParamAttr(NewArgNo)`, and then set the attribute list. Make sure to always check that you update the list properly.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D53342/new/
https://reviews.llvm.org/D53342
More information about the llvm-commits
mailing list