[clang] [Clang] Add __has_target_builtin macro (PR #126324)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 21 07:01:29 PST 2025
jhuber6 wrote:
> As for next steps, I think we need a broader community discussion on this, so I would recommend an RFC proposing an approach. I don't know whether that's changing the behavior of `__has_builtin`, proposing `__can_use_builtin` and deprecating `__has_builtin`, or something else; I don't have enough expertise in offloading to feel like I should set the direction in that way. But I think the most conservative approach would be to introduce `__can_use_builtin` and deprecate `__has_builtin` as being a confused interface.
I'm not a fan of deprecating `__has_builtin` because it's been around for quite awhile and it perfectly fine at doing what it says in the standardized languages. Offloading languages are kind of in this 'whatever works' area, so I don't think we should change behavior too much around their edge cases.
https://github.com/llvm/llvm-project/pull/126324
More information about the cfe-commits
mailing list