[clang] [Clang] Add __has_target_builtin macro (PR #126324)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 10 14:59:07 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");
----------------
jhuber6 wrote:

Yeah, `__has_target_builtin()` is probably identical to `__has_builtin` on non-offloading related things. It's up to them if they keep it portable.

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


More information about the cfe-commits mailing list