| 1 | //===-- Definition of cfloat128 type --------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLVM_LIBC_TYPES_CFLOAT128_H |
| 10 | #define LLVM_LIBC_TYPES_CFLOAT128_H |
| 11 | |
| 12 | #include "../llvm-libc-macros/cfloat128-macros.h" |
| 13 | |
| 14 | #ifdef LIBC_TYPES_HAS_CFLOAT128 |
| 15 | #ifndef LIBC_TYPES_CFLOAT128_IS_COMPLEX_LONG_DOUBLE |
| 16 | #if defined(__GNUC__) && !defined(__clang__) |
| 17 | // Remove the workaround when https://gcc.gnu.org/PR32187 gets fixed. |
| 18 | typedef __typeof__(_Complex __float128) cfloat128; |
| 19 | #else // ^^^ workaround / no workaround vvv |
| 20 | typedef _Complex __float128 cfloat128; |
| 21 | #endif // ^^^ no workaround ^^^ |
| 22 | #else |
| 23 | typedef _Complex long double cfloat128; |
| 24 | #endif // LIBC_TYPES_CFLOAT128_IS_COMPLEX_LONG_DOUBLE |
| 25 | #endif // LIBC_TYPES_HAS_CFLOAT128 |
| 26 | |
| 27 | #endif // LLVM_LIBC_TYPES_CFLOAT128_H |
| 28 | |