[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 7 08:56:28 PST 2025


jhuber6 wrote:

I don't think it makes any sense for `__has_builtin` to return true when the target does not in-fact have the builtin. Most of the time this is used to guard target specific code, which will then be wrong if it's compiled on the device. Realistically the solution that makes sense to me is to not emit any of the aux target's builtins as available.

https://github.com/llvm/llvm-project/pull/121839


More information about the cfe-commits mailing list