[libc-commits] [libc] [libc][complex] simplify header guard for F128 and CF128 (PR #112926)

via libc-commits libc-commits at lists.llvm.org
Fri Oct 18 08:41:11 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Shourya Goel (Sh0g0-1758)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/112926.diff


2 Files Affected:

- (modified) libc/include/llvm-libc-types/cfloat128.h (+2-2) 
- (modified) libc/include/llvm-libc-types/float128.h (+1-2) 


``````````diff
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__)

``````````

</details>


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


More information about the libc-commits mailing list