[libc++] Add a libc++ configuration that does not support localization

When porting libc++ to embedded systems, it can be useful to drop support
for localization, which these systems don't implement or care about.

Differential Revision: https://reviews.llvm.org/D90072
This commit is contained in:
Louis Dionne 2020-10-09 15:31:05 -04:00
parent 917acac960
commit 88ffc72717
117 changed files with 396 additions and 84 deletions

View File

@ -115,6 +115,12 @@ option(LIBCXX_ENABLE_RANDOM_DEVICE
a source of randomness, such as some embedded platforms. When this is not
supported, most of <random> will still be available, but std::random_device
will not." ON)
option(LIBCXX_ENABLE_LOCALIZATION
"Whether to include support for localization in the library. Disabling
localization can be useful when porting to platforms that don't support
the C locale API (e.g. embedded). When localization is not supported,
several parts of the library will be disabled: <iostream>, <regex>, <locale>
will be completely unusable, and other parts may be only partly available." ON)
option(LIBCXX_TEST_GDB_PRETTY_PRINTERS "Test gdb pretty printers." OFF)
set(LIBCXX_TEST_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/test/configs/legacy.cfg.in" CACHE STRING
"The Lit testing configuration to use when running the tests.")
@ -843,6 +849,7 @@ config_define_if(LIBCXX_HAS_MUSL_LIBC _LIBCPP_HAS_MUSL_LIBC)
config_define_if(LIBCXX_NO_VCRUNTIME _LIBCPP_NO_VCRUNTIME)
config_define_if(LIBCXX_ENABLE_PARALLEL_ALGORITHMS _LIBCPP_HAS_PARALLEL_ALGORITHMS)
config_define_if_not(LIBCXX_ENABLE_RANDOM_DEVICE _LIBCPP_HAS_NO_RANDOM_DEVICE)
config_define_if_not(LIBCXX_ENABLE_LOCALIZATION _LIBCPP_HAS_NO_LOCALIZATION)
if (LIBCXX_ABI_DEFINES)
set(abi_defines)

View File

@ -0,0 +1 @@
set(LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "")

View File

@ -33,6 +33,7 @@
#cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
#cmakedefine _LIBCPP_HAS_PARALLEL_ALGORITHMS
#cmakedefine _LIBCPP_HAS_NO_RANDOM_DEVICE
#cmakedefine _LIBCPP_HAS_NO_LOCALIZATION
@_LIBCPP_ABI_DEFINES@

View File

@ -11,6 +11,11 @@
#define _LIBCPP___LOCALE
#include <__config>
#if defined(_LIBCPP_HAS_NO_LOCALIZATION)
# error "Localization is not supported by this configuration of libc++"
#endif
#include <string>
#include <memory>
#include <utility>

View File

@ -236,9 +236,12 @@ template<class T> complex<T> tanh (const complex<T>&);
#include <stdexcept>
#include <cmath>
#include <iosfwd>
#include <sstream>
#include <version>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <sstream> // for std::basic_ostringstream
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
@ -1430,6 +1433,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
return __is;
}
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
template<class _Tp, class _CharT, class _Traits>
basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
@ -1441,6 +1445,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
__s << '(' << __x.real() << ',' << __x.imag() << ')';
return __os << __s.str();
}
#endif // !_LIBCPP_HAS_NO_LOCALIZATION
#if _LIBCPP_STD_VER > 11
// Literal suffix for complex number literals [complex.literals]

View File

@ -235,16 +235,19 @@
#include <chrono>
#include <iterator>
#include <iosfwd>
#include <locale>
#include <memory>
#include <stack>
#include <string>
#include <system_error>
#include <utility>
#include <iomanip> // for quoted
#include <string_view>
#include <version>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <locale>
# include <iomanip> // for quoted
#endif
#include <__debug>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@ -661,6 +664,10 @@ struct __is_pathable<_Tp, false, true, false> : __is_pathable_char_array<_Tp> {
template <class _Tp>
struct __is_pathable<_Tp, false, false, true> : __is_pathable_iter<_Tp> {};
template <class _ECharT>
struct _PathCVT;
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
template <class _ECharT>
struct _PathCVT {
static_assert(__can_convert_char<_ECharT>::value,
@ -703,6 +710,7 @@ struct _PathCVT {
_Traits::__range_end(__s));
}
};
#endif // !_LIBCPP_HAS_NO_LOCALIZATION
template <>
struct _PathCVT<char> {
@ -779,12 +787,14 @@ public:
_PathCVT<_ItVal>::__append_range(__pn_, __first, __last);
}
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
// TODO Implement locale conversions.
template <class _Source, class = _EnableIfPathable<_Source, void> >
path(const _Source& __src, const locale& __loc, format = format::auto_format);
template <class _InputIt>
path(_InputIt __first, _InputIt _last, const locale& __loc,
format = format::auto_format);
#endif
_LIBCPP_INLINE_VISIBILITY
~path() = default;
@ -983,6 +993,10 @@ public:
_LIBCPP_INLINE_VISIBILITY operator string_type() const { return __pn_; }
_LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; }
_LIBCPP_INLINE_VISIBILITY std::string u8string() const { return __pn_; }
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
template <class _ECharT, class _Traits = char_traits<_ECharT>,
class _Allocator = allocator<_ECharT> >
basic_string<_ECharT, _Traits, _Allocator>
@ -995,19 +1009,22 @@ public:
return __s;
}
_LIBCPP_INLINE_VISIBILITY std::string string() const { return __pn_; }
_LIBCPP_INLINE_VISIBILITY std::wstring wstring() const {
return string<wchar_t>();
}
_LIBCPP_INLINE_VISIBILITY std::string u8string() const { return __pn_; }
_LIBCPP_INLINE_VISIBILITY std::u16string u16string() const {
return string<char16_t>();
}
_LIBCPP_INLINE_VISIBILITY std::u32string u32string() const {
return string<char32_t>();
}
#endif
// generic format observers
std::string generic_string() const { return __pn_; }
std::string generic_u8string() const { return __pn_; }
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
template <class _ECharT, class _Traits = char_traits<_ECharT>,
class _Allocator = allocator<_ECharT> >
basic_string<_ECharT, _Traits, _Allocator>
@ -1015,11 +1032,10 @@ public:
return string<_ECharT, _Traits, _Allocator>(__a);
}
std::string generic_string() const { return __pn_; }
std::wstring generic_wstring() const { return string<wchar_t>(); }
std::string generic_u8string() const { return __pn_; }
std::u16string generic_u16string() const { return string<char16_t>(); }
std::u32string generic_u32string() const { return string<char32_t>(); }
#endif
private:
int __compare(__string_view) const;
@ -1123,6 +1139,7 @@ public:
iterator begin() const;
iterator end() const;
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
template <class _CharT, class _Traits>
_LIBCPP_INLINE_VISIBILITY friend
typename enable_if<is_same<_CharT, char>::value &&
@ -1151,6 +1168,7 @@ public:
__p = __tmp;
return __is;
}
#endif // !_LIBCPP_HAS_NO_LOCALIZATION
friend _LIBCPP_INLINE_VISIBILITY bool operator==(const path& __lhs, const path& __rhs) noexcept {
return __lhs.compare(__rhs) == 0;

View File

@ -19,20 +19,15 @@ set(LIBCXX_SOURCES
include/atomic_support.h
include/config_elast.h
include/refstring.h
ios.cpp
iostream.cpp
locale.cpp
memory.cpp
mutex.cpp
mutex_destructor.cpp
new.cpp
optional.cpp
random_shuffle.cpp
regex.cpp
shared_mutex.cpp
stdexcept.cpp
string.cpp
strstream.cpp
support/runtime/exception_fallback.ipp
support/runtime/exception_glibcxx.ipp
support/runtime/exception_libcxxabi.ipp
@ -66,6 +61,16 @@ if (LIBCXX_ENABLE_RANDOM_DEVICE)
)
endif()
if (LIBCXX_ENABLE_LOCALIZATION)
list(APPEND LIBCXX_SOURCES
ios.cpp
iostream.cpp
locale.cpp
regex.cpp
strstream.cpp
)
endif()
if(WIN32)
list(APPEND LIBCXX_SOURCES
support/win32/locale_win32.cpp

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <strstream>
#include <strstream>

View File

@ -49,7 +49,6 @@
#include <climits>
#include <clocale>
#include <cmath>
#include <codecvt>
#include <compare>
#include <complex>
#include <complex.h>
@ -77,23 +76,17 @@
#include <filesystem>
#include <float.h>
#include <forward_list>
#include <fstream>
#include <functional>
#ifndef _LIBCPP_HAS_NO_THREADS
#include <future>
#endif
#include <initializer_list>
#include <inttypes.h>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <limits.h>
#include <list>
#include <locale>
#include <locale.h>
#include <map>
#include <math.h>
@ -105,11 +98,9 @@
#include <numbers>
#include <numeric>
#include <optional>
#include <ostream>
#include <queue>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <set>
#include <setjmp.h>
@ -117,7 +108,6 @@
#include <shared_mutex>
#endif
#include <span>
#include <sstream>
#include <stack>
#include <stdbool.h>
#include <stddef.h>
@ -125,11 +115,9 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <streambuf>
#include <string>
#include <string.h>
#include <string_view>
#include <strstream>
#include <system_error>
#include <tgmath.h>
#ifndef _LIBCPP_HAS_NO_THREADS
@ -149,6 +137,24 @@
#include <wchar.h>
#include <wctype.h>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
# include <codecvt>
# include <fstream>
# include <iomanip>
# include <ios>
# include <iostream>
# include <istream>
# include <locale>
# include <ostream>
# include <regex>
# include <sstream>
# include <streambuf>
# include <strstream>
# if __cplusplus >= 201103L
# include <experimental/regex>
# endif
#endif
// experimental headers
#if __cplusplus >= 201103L
#include <experimental/algorithm>
@ -164,7 +170,6 @@
#include <experimental/map>
#include <experimental/memory_resource>
#include <experimental/propagate_const>
#include <experimental/regex>
#include <experimental/simd>
#include <experimental/set>
#include <experimental/string>

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
// UNSUPPORTED: libcpp-has-no-localization
// <experimental/regex>

View File

@ -8,6 +8,7 @@
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: no-exceptions
// UNSUPPORTED: libcpp-has-no-localization
#include <cstddef>
#include <cstdint>

View File

@ -0,0 +1,4 @@
# Load the same local configuration as the corresponding one in libcxx/test/std
import os
localConfig = os.path.realpath(__file__).replace('/test/libcxx/', '/test/std/')
config.load_from_path(localConfig, lit_config)

View File

@ -0,0 +1,4 @@
# Load the same local configuration as the corresponding one in libcxx/test/std
import os
localConfig = os.path.realpath(__file__).replace('/test/libcxx/', '/test/std/')
config.load_from_path(localConfig, lit_config)

View File

@ -0,0 +1,4 @@
# Load the same local configuration as the corresponding one in libcxx/test/std
import os
localConfig = os.path.realpath(__file__).replace('/test/libcxx/', '/test/std/')
config.load_from_path(localConfig, lit_config)

View File

@ -0,0 +1,4 @@
# Load the same local configuration as the corresponding one in libcxx/test/std
import os
localConfig = os.path.realpath(__file__).replace('/test/libcxx/', '/test/std/')
config.load_from_path(localConfig, lit_config)

View File

@ -0,0 +1,4 @@
# Load the same local configuration as the corresponding one in libcxx/test/std
import os
localConfig = os.path.realpath(__file__).replace('/test/libcxx/', '/test/std/')
config.load_from_path(localConfig, lit_config)

View File

@ -0,0 +1,4 @@
# Load the same local configuration as the corresponding one in libcxx/test/std
import os
localConfig = os.path.realpath(__file__).replace('/test/libcxx/', '/test/std/')
config.load_from_path(localConfig, lit_config)

View File

@ -0,0 +1,4 @@
# Load the same local configuration as the corresponding one in libcxx/test/std
import os
localConfig = os.path.realpath(__file__).replace('/test/libcxx/', '/test/std/')
config.load_from_path(localConfig, lit_config)

View File

@ -61,8 +61,6 @@ TEST_MACROS();
TEST_MACROS();
#include <cmath>
TEST_MACROS();
#include <codecvt>
TEST_MACROS();
#include <complex>
TEST_MACROS();
#include <complex.h>
@ -109,8 +107,6 @@ TEST_MACROS();
TEST_MACROS();
#include <forward_list>
TEST_MACROS();
#include <fstream>
TEST_MACROS();
#include <functional>
TEST_MACROS();
#ifndef _LIBCPP_HAS_NO_THREADS
@ -121,16 +117,8 @@ TEST_MACROS();
TEST_MACROS();
#include <inttypes.h>
TEST_MACROS();
#include <iomanip>
TEST_MACROS();
#include <ios>
TEST_MACROS();
#include <iosfwd>
TEST_MACROS();
#include <iostream>
TEST_MACROS();
#include <istream>
TEST_MACROS();
#include <iterator>
TEST_MACROS();
#include <limits>
@ -139,8 +127,6 @@ TEST_MACROS();
TEST_MACROS();
#include <list>
TEST_MACROS();
#include <locale>
TEST_MACROS();
#include <locale.h>
TEST_MACROS();
#include <map>
@ -159,16 +145,12 @@ TEST_MACROS();
TEST_MACROS();
#include <optional>
TEST_MACROS();
#include <ostream>
TEST_MACROS();
#include <queue>
TEST_MACROS();
#include <random>
TEST_MACROS();
#include <ratio>
TEST_MACROS();
#include <regex>
TEST_MACROS();
#include <scoped_allocator>
TEST_MACROS();
#include <set>
@ -181,8 +163,6 @@ TEST_MACROS();
#endif
#include <span>
TEST_MACROS();
#include <sstream>
TEST_MACROS();
#include <stack>
TEST_MACROS();
#include <stdbool.h>
@ -197,16 +177,12 @@ TEST_MACROS();
TEST_MACROS();
#include <stdlib.h>
TEST_MACROS();
#include <streambuf>
TEST_MACROS();
#include <string>
TEST_MACROS();
#include <string.h>
TEST_MACROS();
#include <string_view>
TEST_MACROS();
#include <strstream>
TEST_MACROS();
#include <system_error>
TEST_MACROS();
#include <tgmath.h>
@ -240,6 +216,37 @@ TEST_MACROS();
#include <wctype.h>
TEST_MACROS();
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
# include <codecvt>
TEST_MACROS();
# include <fstream>
TEST_MACROS();
# include <iomanip>
TEST_MACROS();
# include <ios>
TEST_MACROS();
# include <iostream>
TEST_MACROS();
# include <istream>
TEST_MACROS();
# include <locale>
TEST_MACROS();
# include <ostream>
TEST_MACROS();
# include <regex>
TEST_MACROS();
# include <sstream>
TEST_MACROS();
# include <streambuf>
TEST_MACROS();
# include <strstream>
TEST_MACROS();
# if __cplusplus >= 201103L
# include <experimental/regex>
TEST_MACROS();
# endif
#endif
// experimental headers
#if __cplusplus >= 201103L
#include <experimental/algorithm>
@ -262,8 +269,6 @@ TEST_MACROS();
TEST_MACROS();
#include <experimental/propagate_const>
TEST_MACROS();
#include <experimental/regex>
TEST_MACROS();
#include <experimental/set>
TEST_MACROS();
#include <experimental/string>

View File

@ -10,9 +10,10 @@
// are not modular
// XFAIL: LIBCXX-WINDOWS-FIXME
// FIXME: The <atomic> header is not supported for single-threaded systems,
// but still gets built as part of the 'std' module, which breaks the build.
// XFAIL: libcpp-has-no-threads
// Some headers are not available when these features are disabled, but they
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// REQUIRES: modules-support
// ADDITIONAL_COMPILE_FLAGS: -fmodules

View File

@ -10,9 +10,10 @@
// are not modular
// XFAIL: LIBCXX-WINDOWS-FIXME
// FIXME: The <atomic> header is not supported for single-threaded systems,
// but still gets built as part of the 'std' module, which breaks the build.
// XFAIL: libcpp-has-no-threads
// Some headers are not available when these features are disabled, but they
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// UNSUPPORTED: c++03

View File

@ -10,9 +10,10 @@
// are not modular
// XFAIL: LIBCXX-WINDOWS-FIXME
// FIXME: The <atomic> header is not supported for single-threaded systems,
// but still gets built as part of the 'std' module, which breaks the build.
// XFAIL: libcpp-has-no-threads
// Some headers are not available when these features are disabled, but they
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// Test that <cstdint> re-exports <stdint.h>

View File

@ -10,9 +10,10 @@
// are not modular
// XFAIL: LIBCXX-WINDOWS-FIXME
// FIXME: The <atomic> header is not supported for single-threaded systems,
// but still gets built as part of the 'std' module, which breaks the build.
// XFAIL: libcpp-has-no-threads
// Some headers are not available when these features are disabled, but they
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// Test that intypes.h re-exports stdint.h

View File

@ -6,9 +6,10 @@
//
//===----------------------------------------------------------------------===//
// FIXME: The <atomic> header is not supported for single-threaded systems,
// but still gets built as part of the 'std' module, which breaks the build.
// XFAIL: libcpp-has-no-threads
// Some headers are not available when these features are disabled, but they
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// Test that int8_t and the like are exported from stdint.h, not inttypes.h

View File

@ -15,9 +15,10 @@
// are not modular
// XFAIL: LIBCXX-WINDOWS-FIXME
// FIXME: The <atomic> header is not supported for single-threaded systems,
// but still gets built as part of the 'std' module, which breaks the build.
// XFAIL: libcpp-has-no-threads
// Some headers are not available when these features are disabled, but they
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// REQUIRES: modules-support

View File

@ -39,7 +39,6 @@
#include <climits>
#include <clocale>
#include <cmath>
#include <codecvt>
#include <compare>
#include <complex>
#include <complex.h>
@ -66,23 +65,17 @@
#include <filesystem>
#include <float.h>
#include <forward_list>
#include <fstream>
#include <functional>
#ifndef _LIBCPP_HAS_NO_THREADS
#include <future>
#endif
#include <initializer_list>
#include <inttypes.h>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <limits.h>
#include <list>
#include <locale>
#include <locale.h>
#include <map>
#include <math.h>
@ -93,11 +86,9 @@
#include <new>
#include <numeric>
#include <optional>
#include <ostream>
#include <queue>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <set>
#include <setjmp.h>
@ -105,7 +96,6 @@
#include <shared_mutex>
#endif
#include <span>
#include <sstream>
#include <stack>
#include <stdbool.h>
#include <stddef.h>
@ -113,11 +103,9 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <streambuf>
#include <string>
#include <string.h>
#include <string_view>
#include <strstream>
#include <system_error>
#include <tgmath.h>
#ifndef _LIBCPP_HAS_NO_THREADS
@ -137,6 +125,24 @@
#include <wchar.h>
#include <wctype.h>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
# include <codecvt>
# include <fstream>
# include <iomanip>
# include <ios>
# include <iostream>
# include <istream>
# include <locale>
# include <ostream>
# include <regex>
# include <sstream>
# include <streambuf>
# include <strstream>
# if __cplusplus >= 201103L
# include <experimental/regex>
# endif
#endif
// experimental headers
#if __cplusplus >= 201103L
#include <experimental/algorithm>
@ -152,7 +158,6 @@
#include <experimental/map>
#include <experimental/memory_resource>
#include <experimental/propagate_const>
#include <experimental/regex>
#include <experimental/simd>
#include <experimental/set>
#include <experimental/string>

View File

@ -0,0 +1,2 @@
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -0,0 +1,2 @@
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <system_error>
// class error_code

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: libcpp-has-no-localization
// <experimental/iterator>
//

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: libcpp-has-no-localization
// <experimental/iterator>
//

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: libcpp-has-no-localization
// <experimental/iterator>
//

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: libcpp-has-no-localization
// <experimental/iterator>
//

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: libcpp-has-no-localization
// <experimental/iterator>
//

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: libcpp-has-no-localization
// <experimental/iterator>
//

View File

@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
// UNSUPPORTED: libcpp-has-no-localization
// <experimental/regex>

View File

@ -0,0 +1,3 @@
# All non-trivial uses of iostreams require localization support
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -8,6 +8,9 @@
// UNSUPPORTED: c++03
// These tests require locale for non-char paths
// UNSUPPORTED: libcpp-has-no-localization
// <filesystem>
// class path

View File

@ -8,6 +8,9 @@
// UNSUPPORTED: c++03
// These tests require locale for non-char paths
// UNSUPPORTED: libcpp-has-no-localization
// <filesystem>
// class path

View File

@ -8,6 +8,9 @@
// UNSUPPORTED: c++03
// These tests require locale for non-char paths
// UNSUPPORTED: libcpp-has-no-localization
// <filesystem>
// class path

View File

@ -8,6 +8,9 @@
// UNSUPPORTED: c++03
// These tests require locale for non-char paths
// UNSUPPORTED: libcpp-has-no-localization
// <filesystem>
// class path

View File

@ -8,6 +8,9 @@
// UNSUPPORTED: c++03
// These tests require locale for non-char paths
// UNSUPPORTED: libcpp-has-no-localization
// <filesystem>
// class path

View File

@ -8,6 +8,9 @@
// UNSUPPORTED: c++03
// These tests require locale for non-char paths
// UNSUPPORTED: libcpp-has-no-localization
// <filesystem>
// class path

View File

@ -8,6 +8,9 @@
// UNSUPPORTED: c++03
// These tests require locale for non-char paths
// UNSUPPORTED: libcpp-has-no-localization
// <filesystem>
// class path

View File

@ -9,6 +9,9 @@
// UNSUPPORTED: c++03
// REQUIRES: libc++
// These tests require locale for non-char paths
// UNSUPPORTED: libcpp-has-no-localization
// <filesystem>
// class path

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
// UNSUPPORTED: libcpp-has-no-localization
// <filesystem>

View File

@ -0,0 +1,3 @@
# All non-trivial uses of iostreams require localization support
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -0,0 +1,3 @@
# All non-trivial uses of iostreams require localization support
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -0,0 +1,3 @@
# All non-trivial uses of iostreams require localization support
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -0,0 +1,3 @@
# All non-trivial uses of iostreams require localization support
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -0,0 +1,3 @@
# All non-trivial uses of iostreams require localization support
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -0,0 +1,3 @@
# All non-trivial uses of iostreams require localization support
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -0,0 +1,3 @@
# All non-trivial uses of iostreams require localization support
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -0,0 +1,3 @@
# All non-trivial uses of iostreams require localization support
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -0,0 +1,3 @@
# stream iterators rely on the streams library, which requires localization
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -9,6 +9,8 @@
// WARNING: This test was generated by generate_feature_test_macro_components.py
// and should not be edited manually.
// UNSUPPORTED: libcpp-has-no-localization
// <iomanip>
// Test the feature test macros defined by <iomanip>

View File

@ -9,6 +9,8 @@
// WARNING: This test was generated by generate_feature_test_macro_components.py
// and should not be edited manually.
// UNSUPPORTED: libcpp-has-no-localization
// <istream>
// Test the feature test macros defined by <istream>

View File

@ -9,6 +9,8 @@
// WARNING: This test was generated by generate_feature_test_macro_components.py
// and should not be edited manually.
// UNSUPPORTED: libcpp-has-no-localization
// <locale>
// Test the feature test macros defined by <locale>

View File

@ -9,6 +9,8 @@
// WARNING: This test was generated by generate_feature_test_macro_components.py
// and should not be edited manually.
// UNSUPPORTED: libcpp-has-no-localization
// <ostream>
// Test the feature test macros defined by <ostream>

View File

@ -9,6 +9,8 @@
// WARNING: This test was generated by generate_feature_test_macro_components.py
// and should not be edited manually.
// UNSUPPORTED: libcpp-has-no-localization
// <regex>
// Test the feature test macros defined by <regex>

View File

@ -0,0 +1,3 @@
# <locale> tests are obviously not supported when localization support is disabled
if 'libcpp-has-no-localization' in config.available_features:
config.unsupported = True

View File

@ -17,6 +17,9 @@
// RUN: %{cxx} %t.tu1.o %t.tu2.o %{flags} %{link_flags} -o %t.exe
// RUN: %{exec} %t.exe
// The functions checked below come from <iostream> & friends
// UNSUPPORTED: libcpp-has-no-localization
#include <cassert>
#include <ios>
#include <istream>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <complex>
// template<class T, class charT, class traits>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <complex>
// template<class T, class charT, class traits>

View File

@ -13,6 +13,9 @@
// explicit discard_block_engine(result_type s = default_seed);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

View File

@ -13,6 +13,9 @@
// template<class Sseq> explicit discard_block_engine(Sseq& q);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class Engine, size_t p, size_t r>

View File

@ -13,6 +13,9 @@
// explicit independent_bits_engine(result_type s = default_seed);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

View File

@ -13,6 +13,9 @@
// template<class Sseq> explicit independent_bits_engine(Sseq& q);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class Engine, size_t w, class UIntType>

View File

@ -13,6 +13,9 @@
// explicit shuffle_order_engine(result_type s = default_seed);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

View File

@ -13,6 +13,9 @@
// template<class Sseq> explicit shuffle_order_engine(Sseq& q);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class Engine, size_t k>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// class bernoulli_distribution

View File

@ -15,6 +15,9 @@
// Test the fix for https://llvm.org/PR44847.
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <numeric>
#include <vector>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class IntType = int>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class IntType = int>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class IntType = int>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class IntType = int>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class IntType = int>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class _IntType = int>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template<class RealType = double>

View File

@ -13,6 +13,9 @@
// explicit linear_congruential_engine(result_type s = default_seed);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template <class UIntType, UIntType a, UIntType c, UIntType m>

View File

@ -15,6 +15,9 @@
// explicit mersenne_twister_engine(result_type s = default_seed);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

View File

@ -15,6 +15,9 @@
// template<class Sseq> explicit mersenne_twister_engine(Sseq& q);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-localization
// <random>
// template <class UIntType, size_t w, size_t n, size_t m, size_t r,

View File

@ -13,6 +13,9 @@
// explicit subtract_with_carry_engine(result_type s = default_seed);
// Serializing/deserializing the state of the RNG requires iostreams
// UNSUPPORTED: libcpp-has-no-localization
#include <random>
#include <sstream>
#include <cassert>

Some files were not shown because too many files have changed in this diff Show More