[PATCH] D58757: Add a version of the pass_object_size attribute that works with builtin_dynamic_object_size
Erik Pilkington via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 15 15:58:11 PDT 2019
erik.pilkington added inline comments.
================
Comment at: clang/include/clang/Basic/Attr.td:1570
+def PassDynamicObjectSize : InheritableParamAttr {
+ let Spellings = [Clang<"pass_dynamic_object_size">];
+ let Args = [IntArgument<"Type">];
----------------
aaron.ballman wrote:
> Why use a separate attribute as opposed to a separate spelling and an accessor on `PassObjectSizeAttr` to ask whether it's dynamic or not? The two attributes seem to have identical semantics aside from which builtin is called, so I think it makes sense to use the same semantic attribute type.
Oh, I didn't even know that was possible. I guess thats why `Spellings` is an array :). That simplifies the implementation too, now we can ditch `getPassObjectSizeInfo`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58757/new/
https://reviews.llvm.org/D58757
More information about the cfe-commits
mailing list