File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
__support/macros/properties Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
- //===-- Definition of float16 type ----------------- -----------------------===//
1
+ //===-- Detection of _Float16 compiler builtin type -----------------------===//
2
2
//
3
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
4
// See https://llvm.org/LICENSE.txt for license information.
9
9
#ifndef LLVM_LIBC_TYPES_FLOAT16_H
10
10
#define LLVM_LIBC_TYPES_FLOAT16_H
11
11
12
- #include "src/__support/macros/properties/compiler.h"
13
-
14
12
#if defined(__FLT16_MANT_DIG__ ) && \
15
- (!defined(LIBC_COMPILER_IS_GCC ) || LIBC_COMPILER_GCC_VER >= 1301 )
13
+ (!defined(__GNUC__ ) || __GNUC__ >= 13 || defined( __clang__ ) )
16
14
#define LIBC_TYPES_HAS_FLOAT16
17
- using float16 = _Float16 ;
18
15
#endif
19
16
20
17
#endif // LLVM_LIBC_TYPES_FLOAT16_H
Original file line number Diff line number Diff line change 12
12
13
13
#include " hdr/float_macros.h" // LDBL_MANT_DIG
14
14
#include " include/llvm-libc-types/float128.h" // float128
15
- #include " include/llvm-libc-types/float16.h" // float16
15
+ #include " include/llvm-libc-types/float16.h" // LIBC_TYPES_HAS_FLOAT16
16
16
#include " src/__support/macros/properties/architectures.h"
17
17
#include " src/__support/macros/properties/compiler.h"
18
18
#include " src/__support/macros/properties/cpu_features.h"
40
40
#endif // defined(__SIZEOF_INT128__)
41
41
42
42
// -- float16 support ---------------------------------------------------------
43
- // LIBC_TYPES_HAS_FLOAT16 and 'float16' type are provided by
44
- // "include/llvm-libc-types/float16.h"
43
+ // LIBC_TYPES_HAS_FLOAT16 is provided by "include/llvm-libc-types/float16.h"
44
+ #ifdef LIBC_TYPES_HAS_FLOAT16
45
+ // Type alias for internal use.
46
+ using float16 = _Float16;
47
+ #endif // LIBC_TYPES_HAS_FLOAT16
45
48
46
49
// -- float128 support --------------------------------------------------------
47
50
// LIBC_TYPES_HAS_FLOAT128 and 'float128' type are provided by
Original file line number Diff line number Diff line change 9
9
#ifndef LLVM_LIBC_SRC_MATH_FABSF16_H
10
10
#define LLVM_LIBC_SRC_MATH_FABSF16_H
11
11
12
- #include " include/llvm-libc-types/float16 .h"
12
+ #include " src/__support/macros/properties/types .h"
13
13
14
14
namespace LIBC_NAMESPACE {
15
15
You can’t perform that action at this time.
0 commit comments