[libc-commits] [libc] 1f99526 - [libc][NFC] Move `__has_builtin` to `LIBC_HAS_BUILTIN`
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Wed Jun 21 07:50:51 PDT 2023
Author: Joseph Huber
Date: 2023-06-21T09:50:40-05:00
New Revision: 1f99526d9d479dae73820b55896e4426f7fb6e33
URL: https://github.com/llvm/llvm-project/commit/1f99526d9d479dae73820b55896e4426f7fb6e33
DIFF: https://github.com/llvm/llvm-project/commit/1f99526d9d479dae73820b55896e4426f7fb6e33.diff
LOG: [libc][NFC] Move `__has_builtin` to `LIBC_HAS_BUILTIN`
Summary:
These should use the common `LIBC_HAS_BUILTIN` even if we will only
compile this with `clang`.
Added:
Modified:
libc/src/__support/FPUtil/gpu/FMA.h
Removed:
################################################################################
diff --git a/libc/src/__support/FPUtil/gpu/FMA.h b/libc/src/__support/FPUtil/gpu/FMA.h
index 3e75a795ca09e..2828dfe538598 100644
--- a/libc/src/__support/FPUtil/gpu/FMA.h
+++ b/libc/src/__support/FPUtil/gpu/FMA.h
@@ -9,12 +9,13 @@
#ifndef LLVM_LIBC_SRC_SUPPORT_FPUTIL_GPU_FMA_H
#define LLVM_LIBC_SRC_SUPPORT_FPUTIL_GPU_FMA_H
+#include "src/__support/CPP/type_traits.h"
+#include "src/__support/macros/config.h"
+
// These intrinsics map to the FMA instrunctions in the target ISA for the GPU.
// The default rounding mode generated from these will be to the nearest even.
-static_assert(__has_builtin(__builtin_fma), "FMA builtins must be defined");
-static_assert(__has_builtin(__builtin_fmaf), "FMA builtins must be defined");
-
-#include "src/__support/CPP/type_traits.h"
+static_assert(LIBC_HAS_BUILTIN(__builtin_fma), "FMA builtins must be defined");
+static_assert(LIBC_HAS_BUILTIN(__builtin_fmaf), "FMA builtins must be defined");
namespace __llvm_libc {
namespace fputil {
More information about the libc-commits
mailing list