[libc-commits] [libc] [libc][complex] simplify header guard for F128 and CF128 (PR #112926)
Shourya Goel via libc-commits
libc-commits at lists.llvm.org
Fri Oct 18 08:40:38 PDT 2024
https://github.com/Sh0g0-1758 created https://github.com/llvm/llvm-project/pull/112926
None
>From 281aede487b44c66a0f4443d160beec9e20329b9 Mon Sep 17 00:00:00 2001
From: Sh0g0-1758 <shouryagoel10000 at gmail.com>
Date: Fri, 18 Oct 2024 21:09:32 +0530
Subject: [PATCH] simplify header
---
libc/include/llvm-libc-types/cfloat128.h | 4 ++--
libc/include/llvm-libc-types/float128.h | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/libc/include/llvm-libc-types/cfloat128.h b/libc/include/llvm-libc-types/cfloat128.h
index a371671cf62353..48b8c58b53f0a3 100644
--- a/libc/include/llvm-libc-types/cfloat128.h
+++ b/libc/include/llvm-libc-types/cfloat128.h
@@ -18,11 +18,11 @@
//
// TODO: Update the complex variant of C23 `_Float128` type detection again when
// clang supports it.
-#if defined(__STDC_IEC_60559_COMPLEX__) && !defined(__clang__)
+#if defined(__STDC_IEC_60559_COMPLEX__)
#if !defined(__cplusplus)
#define LIBC_TYPES_HAS_CFLOAT128
typedef _Complex _Float128 cfloat128;
-#elif defined(__GNUC__) && __GNUC__ >= 13
+#elif __GNUC__ >= 13
#define LIBC_TYPES_HAS_CFLOAT128
typedef _Complex _Float128 cfloat128;
#endif
diff --git a/libc/include/llvm-libc-types/float128.h b/libc/include/llvm-libc-types/float128.h
index 82ebb79f1f5808..bce980900ba288 100644
--- a/libc/include/llvm-libc-types/float128.h
+++ b/libc/include/llvm-libc-types/float128.h
@@ -17,8 +17,7 @@
//
// TODO: Update C23 `_Float128` type detection again when clang supports it.
// https://github.com/llvm/llvm-project/issues/80195
-#if defined(__STDC_IEC_60559_BFP__) && !defined(__clang__) && \
- !defined(__cplusplus)
+#if defined(__STDC_IEC_60559_BFP__) && !defined(__cplusplus)
#define LIBC_TYPES_HAS_FLOAT128
typedef _Float128 float128;
#elif defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
More information about the libc-commits
mailing list