[clang] [Clang] Add __has_target_builtin macro (PR #126324)
Nick Sarnie via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 10 10:28:12 PST 2025
================
@@ -357,6 +357,7 @@ void Preprocessor::RegisterBuiltinMacros() {
Ident__has_builtin = RegisterBuiltinMacro("__has_builtin");
Ident__has_constexpr_builtin =
RegisterBuiltinMacro("__has_constexpr_builtin");
+ Ident__has_target_builtin = RegisterBuiltinMacro("__has_target_builtin");
----------------
sarnex wrote:
Thanks, will do this. I can't find a good way to detect offloading languages in general here, so I'm just going to check for CUDA/HIP/SYCLDevice/OpenMPDevice, let me know if there's some common logic I can rely on that I missed.
https://github.com/llvm/llvm-project/pull/126324
More information about the cfe-commits
mailing list