File tree Expand file tree Collapse file tree 5 files changed +35
-7
lines changed Expand file tree Collapse file tree 5 files changed +35
-7
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,15 @@ add_proxy_header_library(
183183 libc.include .link
184184)
185185
186+ add_proxy_header_library(
187+ locale_macros
188+ HDRS
189+ locale_macros.h
190+ FULL_BUILD_DEPENDS
191+ libc.include .llvm-libc-macros .locale_macros
192+ libc.include .locale
193+ )
194+
186195add_proxy_header_library(
187196 sys_auxv_macros
188197 HDRS
Original file line number Diff line number Diff line change 1+ //===-- Definition of macros from locale.h --------------------------------===//
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_HDR_LOCALE_MACROS_H
10+ #define LLVM_LIBC_HDR_LOCALE_MACROS_H
11+
12+ #ifdef LIBC_FULL_BUILD
13+
14+ #include "include/llvm-libc-macros/locale-macros.h"
15+
16+ #else // Overlay mode
17+
18+ #error "macros not available in overlay mode"
19+
20+ #endif // LLVM_LIBC_FULL_BUILD
21+
22+ #endif // LLVM_LIBC_HDR_LOCALE_MACROS_H
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ add_libc_test(
77 SRCS
88 locale_test.cpp
99 DEPENDS
10- libc.include .locale
10+ libc.hdr.locale_macros
1111 libc.src.locale.newlocale
1212 libc.src.locale.uselocale
1313 libc.src.locale.freelocale
@@ -20,6 +20,6 @@ add_libc_test(
2020 SRCS
2121 localeconv_test.cpp
2222 DEPENDS
23- libc.include .locale
23+ libc.hdr.locale_macros
2424 libc.src.locale.localeconv
2525)
Original file line number Diff line number Diff line change 66//
77// ===----------------------------------------------------------------------===//
88
9+ #include " hdr/locale_macros.h"
910#include " src/locale/freelocale.h"
1011#include " src/locale/newlocale.h"
1112#include " src/locale/uselocale.h"
12-
1313#include " test/UnitTest/Test.h"
1414
15- #include " include/llvm-libc-macros/locale-macros.h"
16-
1715TEST (LlvmLibcLocale, DefaultLocale) {
1816 locale_t new_locale = LIBC_NAMESPACE::newlocale (LC_ALL, " C" , nullptr );
1917 EXPECT_NE (new_locale, static_cast <locale_t >(nullptr ));
Original file line number Diff line number Diff line change 66//
77// ===----------------------------------------------------------------------===//
88
9- #include " include/llvm-libc-macros/locale-macros .h"
9+ #include " hdr/locale_macros .h"
1010#include " src/locale/localeconv.h"
11-
1211#include " test/UnitTest/Test.h"
1312
1413TEST (LlvmLibcLocale, DefaultLocale) {
You can’t perform that action at this time.
0 commit comments