================ @@ -96,6 +100,47 @@ the ``<cmath>`` header file to conditionally make a function constexpr whenever the constant evaluation of the corresponding builtin (for example, ``std::fmax`` calls ``__builtin_fmax``) is supported in Clang. +``__has_target_builtin`` +------------------------ + +This function-like macro takes a single identifier argument that is the name of +a builtin function, a builtin pseudo-function (taking one or more type +arguments), or a builtin template. +It evaluates to 1 if the builtin is supported on the current target or 0 if not. + +``__has_builtin`` and ``__has_target_builtin`` behave identically for normal C++ compilations. ---------------- jhuber6 wrote:
Probably better to be portable with GCC for average users, but it's the recommended solution for code that's intended to be run on the GPU I'd say. https://github.com/llvm/llvm-project/pull/126324 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits