File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
libc/include/llvm-libc-macros Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
3131 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /${LIBC_TARGET_OS} )
3232endif ()
3333
34+ add_macro_header(
35+ annex_k_macros
36+ HDR
37+ annex-k-macros .h
38+ )
39+
3440add_macro_header(
3541 assert_macros
3642 HDR
Original file line number Diff line number Diff line change 1+ // ===-- Definition of macros to be used with Annex K functions ------------===//
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_INCLUDE_LLVM_LIBC_MACROS_ANNEX_K_MACROS_H
10+ #define LLVM_LIBC_INCLUDE_LLVM_LIBC_MACROS_ANNEX_K_MACROS_H
11+
12+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
13+ (defined (__cplusplus) && __cplusplus >= 201703L )
14+
15+ // TODO(bassiounix): Who should def this macro (clang vs libc)? Where?
16+ #define __STDC_LIB_EXT1__ 201112L
17+
18+ #if defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ == 1
19+
20+ #define LIBC_HAS_ANNEX_K
21+
22+ #endif // defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ == 1
23+
24+ #endif // (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) ||
25+ // (defined(__cplusplus) && __cplusplus >= 201703L)
26+ #endif // LLVM_LIBC_INCLUDE_LLVM_LIBC_MACROS_ANNEX_K_MACROS_H
You can’t perform that action at this time.
0 commit comments