[clang] [Clang] Add __builtin_get_counted_by builtin (PR #102549)
Bill Wendling via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 13 02:54:54 PDT 2024
bwendling wrote:
> Hmm, I could see how this could be useful, but it seems like a rather niche use case.
>
> @AaronBallman Should this go through the ususal process of someone writing an RFC for it seeing as it is a language extension?
I'll be happy to open this up to the larger community and produce an RFC. However, because of its niche usage it might not garner much attention. I don't personally consider this a language extension only a new builtin, but I'm probably in the minority. (And really it's just a matter of nomenclature.)
> I also saw that there’s a GCC bug report (or something like that) about this. Is it clear at this point what the GCC devs’ stance on adding this as a builtin is?
I got the impression that the GCC developers are going forward with this builtin.
> As for the implementation: I’m not really too familiar w/ codegen, so I can’t comment on that part (it seems we’re maybe doing a bit too much checking in codegen as opposed to in sema, but that might just be me). I don’t think the way we’re handling this in Sema is quite right tho atm.
Happy to rectify any issues in Sema and CodeGen. For the record, I'm doing roughly the same number of checks in both places, but in Sema I don't have to deal with code generation, so I can overlook some things I would normally have to consider (*waves hands*).
https://github.com/llvm/llvm-project/pull/102549
More information about the cfe-commits
mailing list