diff --git a/cmake/Modules/Platform/Emscripten.cmake b/cmake/Modules/Platform/Emscripten.cmake index 9919234ef0212..1cb1905c93066 100644 --- a/cmake/Modules/Platform/Emscripten.cmake +++ b/cmake/Modules/Platform/Emscripten.cmake @@ -380,3 +380,22 @@ endif() # complain about unused CMake variable. if (CMAKE_CROSSCOMPILING_EMULATOR) endif() + +# C++23 stl modules (Ref: https://cmake.org/cmake/help/latest/manual/cmake-cxxmodules.7.html#import-std-support) +if(CMAKE_VERSION VERSION_GREATER_EQUAL 4.3 AND CMAKE_CXX_MODULE_STD AND NOT CMAKE_CXX_STDLIB_MODULES_JSON) + set(CMAKE_CXX_STDLIB_MODULES_JSON "${EMSCRIPTEN_SYSROOT}/lib/${CMAKE_LIBRARY_ARCHITECTURE}/libc++.modules.json") + + # Ref: https://cmake.org/cmake/help/latest/variable/CMAKE_CXX_COMPILER_IMPORT_STD.html + foreach(_FEATURE IN LISTS CMAKE_CXX_COMPILE_FEATURES) + if(_FEATURE MATCHES [[cxx_std_([0-9]+)]] AND CMAKE_MATCH_1 GREATER_EQUAL 23 AND CMAKE_MATCH_1 LESS 98) + list(APPEND CMAKE_CXX_COMPILER_IMPORT_STD ${CMAKE_MATCH_1}) + endif() + endforeach() + + set_property(SOURCE + "${EMSCRIPTEN_SYSROOT}/share/libc++/v1/std.cppm" + "${EMSCRIPTEN_SYSROOT}/share/libc++/v1/std.compat.cppm" + PROPERTY + COMPILE_FLAGS -Wno-reserved-module-identifier + ) +endif() diff --git a/system/lib/libcxx/build_modules.py b/system/lib/libcxx/build_modules.py new file mode 100644 index 0000000000000..1b3eedd2d3d11 --- /dev/null +++ b/system/lib/libcxx/build_modules.py @@ -0,0 +1,52 @@ +import os +import sys +import subprocess +import tempfile +import shutil +from pathlib import Path + +cwd = Path(__file__).parent +os.chdir(cwd) + +def main(): + with tempfile.TemporaryDirectory() as tmp: + src = os.path.abspath('modules') + install_prefix = src + '/prefix' + + lib = 'lib/emscripten' + share = 'share/libc++/v1' + + build_dir = 'out' + dist = f'{tmp}/{build_dir}/dist/' + build_lib = dist + lib + build_share = dist + share + + vars = [ + ('LIBCXX_INSTALL_LIBRARY_DIR', lib), + ('LIBCXX_INSTALL_MODULES_DIR', share), + ('LIBCXX_LIBRARY_DIR', build_lib), + ('LIBCXX_GENERATED_MODULE_DIR', build_share), + ] + + args = '' + for var in vars: + args += f' -D{var[0]}={var[1]}' + + with open(tmp + '/CMakeLists.txt', 'x', encoding='utf-8') as CMakeLists: + CMakeLists.write(f'''\ + cmake_minimum_required(VERSION 3.10) + project(libcxx-modules) + add_subdirectory("{src}" libcxx) + ''') + + subprocess.run(f'cmake -B {build_dir} -S {tmp} {args}', cwd=tmp, shell=True) + subprocess.run(['cmake', '--build', build_dir], cwd=tmp) + shutil.copytree(dist, install_prefix, dirs_exist_ok=True) + + return 0 + +if __name__ == '__main__': + try: + sys.exit(main()) + except KeyboardInterrupt: + sys.exit(1) diff --git a/system/lib/libcxx/modules/.clang-format b/system/lib/libcxx/modules/.clang-format new file mode 100644 index 0000000000000..69dcdadf00fa4 --- /dev/null +++ b/system/lib/libcxx/modules/.clang-format @@ -0,0 +1,3 @@ +BasedOnStyle: InheritParentConfig + +NamespaceIndentation: All diff --git a/system/lib/libcxx/modules/CMakeLists.txt b/system/lib/libcxx/modules/CMakeLists.txt new file mode 100644 index 0000000000000..d47d19a475531 --- /dev/null +++ b/system/lib/libcxx/modules/CMakeLists.txt @@ -0,0 +1,269 @@ +# The headers of Table 24: C++ library headers [tab:headers.cpp] +# and the headers of Table 25: C++ headers for C library facilities [tab:headers.cpp.c] +set(LIBCXX_MODULE_STD_SOURCES + std/algorithm.inc + std/any.inc + std/array.inc + std/atomic.inc + std/barrier.inc + std/bit.inc + std/bitset.inc + std/cassert.inc + std/cctype.inc + std/cerrno.inc + std/cfenv.inc + std/cfloat.inc + std/charconv.inc + std/chrono.inc + std/cinttypes.inc + std/climits.inc + std/clocale.inc + std/cmath.inc + std/codecvt.inc + std/compare.inc + std/complex.inc + std/concepts.inc + std/condition_variable.inc + std/coroutine.inc + std/csetjmp.inc + std/csignal.inc + std/cstdarg.inc + std/cstddef.inc + std/cstdint.inc + std/cstdio.inc + std/cstdlib.inc + std/cstring.inc + std/ctime.inc + std/cuchar.inc + std/cwchar.inc + std/cwctype.inc + std/deque.inc + std/exception.inc + std/execution.inc + std/expected.inc + std/filesystem.inc + std/flat_map.inc + std/flat_set.inc + std/format.inc + std/forward_list.inc + std/fstream.inc + std/functional.inc + std/future.inc + std/generator.inc + std/hazard_pointer.inc + std/initializer_list.inc + std/iomanip.inc + std/ios.inc + std/iosfwd.inc + std/iostream.inc + std/istream.inc + std/iterator.inc + std/latch.inc + std/limits.inc + std/list.inc + std/locale.inc + std/map.inc + std/mdspan.inc + std/memory.inc + std/memory_resource.inc + std/mutex.inc + std/new.inc + std/numbers.inc + std/numeric.inc + std/optional.inc + std/ostream.inc + std/print.inc + std/queue.inc + std/random.inc + std/ranges.inc + std/ratio.inc + std/rcu.inc + std/regex.inc + std/scoped_allocator.inc + std/semaphore.inc + std/set.inc + std/shared_mutex.inc + std/source_location.inc + std/span.inc + std/spanstream.inc + std/sstream.inc + std/stack.inc + std/stacktrace.inc + std/stdexcept.inc + std/stdfloat.inc + std/stop_token.inc + std/streambuf.inc + std/string.inc + std/string_view.inc + std/strstream.inc + std/syncstream.inc + std/system_error.inc + std/text_encoding.inc + std/thread.inc + std/tuple.inc + std/type_traits.inc + std/typeindex.inc + std/typeinfo.inc + std/unordered_map.inc + std/unordered_set.inc + std/utility.inc + std/valarray.inc + std/variant.inc + std/vector.inc + std/version.inc +) + +set(LIBCXX_MODULE_STD_COMPAT_SOURCES + std.compat/cassert.inc + std.compat/cctype.inc + std.compat/cerrno.inc + std.compat/cfenv.inc + std.compat/cfloat.inc + std.compat/cinttypes.inc + std.compat/climits.inc + std.compat/clocale.inc + std.compat/cmath.inc + std.compat/csetjmp.inc + std.compat/csignal.inc + std.compat/cstdarg.inc + std.compat/cstddef.inc + std.compat/cstdint.inc + std.compat/cstdio.inc + std.compat/cstdlib.inc + std.compat/cstring.inc + std.compat/ctime.inc + std.compat/cuchar.inc + std.compat/cwchar.inc + std.compat/cwctype.inc +) + +# TODO MODULES the CMakeLists.txt in the build directory is only temporary. +# This allows using as available in the build directory. Once build systems +# have proper support for the installed files this will be removed. +if ("${LIBCXX_GENERATED_INCLUDE_DIR}" STREQUAL "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}") + # This typically happens when the target is not installed. + set(LIBCXX_CONFIGURED_INCLUDE_DIRS "${LIBCXX_GENERATED_INCLUDE_DIR}") +else() + # It's important that the arch directory be included first so that its header files + # which interpose on the default include dir be included instead of the default ones. + set(LIBCXX_CONFIGURED_INCLUDE_DIRS + "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR};${LIBCXX_GENERATED_INCLUDE_DIR}" + ) +endif() +configure_file( + "CMakeLists.txt.in" + "${LIBCXX_GENERATED_MODULE_DIR}/CMakeLists.txt" + @ONLY +) + +set(LIBCXX_MODULE_STD_INCLUDE_SOURCES) +foreach(file ${LIBCXX_MODULE_STD_SOURCES}) + set( + LIBCXX_MODULE_STD_INCLUDE_SOURCES + "${LIBCXX_MODULE_STD_INCLUDE_SOURCES}#include \"${file}\"\n" + ) +endforeach() + +configure_file( + "std.cppm.in" + "${LIBCXX_GENERATED_MODULE_DIR}/std.cppm" + @ONLY +) + +set(LIBCXX_MODULE_STD_COMPAT_INCLUDE_SOURCES) +foreach(file ${LIBCXX_MODULE_STD_COMPAT_SOURCES}) + set( + LIBCXX_MODULE_STD_COMPAT_INCLUDE_SOURCES + "${LIBCXX_MODULE_STD_COMPAT_INCLUDE_SOURCES}#include \"${file}\"\n" + ) +endforeach() + +configure_file( + "std.compat.cppm.in" + "${LIBCXX_GENERATED_MODULE_DIR}/std.compat.cppm" + @ONLY +) + +set(_all_modules) +list(APPEND _all_modules "${LIBCXX_GENERATED_MODULE_DIR}/CMakeLists.txt") +list(APPEND _all_modules "${LIBCXX_GENERATED_MODULE_DIR}/std.cppm") +list(APPEND _all_modules "${LIBCXX_GENERATED_MODULE_DIR}/std.compat.cppm") +foreach(file ${LIBCXX_MODULE_STD_SOURCES} ${LIBCXX_MODULE_STD_COMPAT_SOURCES}) + set(src "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + set(dst "${LIBCXX_GENERATED_MODULE_DIR}/${file}") + add_custom_command(OUTPUT ${dst} + DEPENDS ${src} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} + COMMENT "Copying CXX module ${file}") + list(APPEND _all_modules "${dst}") +endforeach() + +add_custom_target(generate-cxx-modules + ALL DEPENDS + ${_all_modules} +) + +# Configure the modules manifest. +# Use the relative path between the installation and the module in the json +# file. This allows moving the entire installation to a different location. +if("${CMAKE_INSTALL_PREFIX}" STREQUAL "") + set(BASE_DIRECTORY "/") +else() + set(BASE_DIRECTORY ${CMAKE_INSTALL_PREFIX}) +endif() +cmake_path(ABSOLUTE_PATH LIBCXX_INSTALL_LIBRARY_DIR + BASE_DIRECTORY ${BASE_DIRECTORY} + OUTPUT_VARIABLE ABS_LIBRARY_DIR) +cmake_path(ABSOLUTE_PATH LIBCXX_INSTALL_MODULES_DIR + BASE_DIRECTORY ${BASE_DIRECTORY} + OUTPUT_VARIABLE ABS_MODULES_DIR) +file(RELATIVE_PATH LIBCXX_MODULE_RELATIVE_PATH + ${ABS_LIBRARY_DIR} + ${ABS_MODULES_DIR}) +configure_file( + "modules.json.in" + "${LIBCXX_LIBRARY_DIR}/libc++.modules.json" + @ONLY +) + +# Dummy library to make modules an installation component. +add_library(cxx-modules INTERFACE) +add_dependencies(cxx-modules generate-cxx-modules) + +if (LIBCXX_INSTALL_MODULES) + foreach(file ${LIBCXX_MODULE_STD_SOURCES} ${LIBCXX_MODULE_STD_COMPAT_SOURCES}) + get_filename_component(dir ${file} DIRECTORY) + install(FILES ${file} + DESTINATION "${LIBCXX_INSTALL_MODULES_DIR}/${dir}" + COMPONENT cxx-modules + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + endforeach() + + # Install the generated module files. + install(FILES + "${LIBCXX_GENERATED_MODULE_DIR}/std.cppm" + "${LIBCXX_GENERATED_MODULE_DIR}/std.compat.cppm" + DESTINATION "${LIBCXX_INSTALL_MODULES_DIR}" + COMPONENT cxx-modules + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + + # Install the module manifest. + install(FILES + "${LIBCXX_LIBRARY_DIR}/libc++.modules.json" + DESTINATION "${LIBCXX_INSTALL_LIBRARY_DIR}" + COMPONENT cxx-modules + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + ) + + if (NOT CMAKE_CONFIGURATION_TYPES) + add_custom_target(install-cxx-modules + DEPENDS cxx-modules + COMMAND "${CMAKE_COMMAND}" + -DCMAKE_INSTALL_COMPONENT=cxx-modules + -P "${CMAKE_BINARY_DIR}/cmake_install.cmake") + # Stripping is a no-op for modules + add_custom_target(install-cxx-modules-stripped DEPENDS install-cxx-modules) + endif() +endif() diff --git a/system/lib/libcxx/modules/CMakeLists.txt.in b/system/lib/libcxx/modules/CMakeLists.txt.in new file mode 100644 index 0000000000000..9fef16e9cefde --- /dev/null +++ b/system/lib/libcxx/modules/CMakeLists.txt.in @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.26) + +project(libc++-modules LANGUAGES CXX) + +# Enable CMake's module support +if(CMAKE_VERSION VERSION_LESS "3.28.0") + if(CMAKE_VERSION VERSION_LESS "3.27.0") + set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "2182bf5c-ef0d-489a-91da-49dbc3090d2a") + else() + set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "aa1f7df0-828a-4fcd-9afc-2dc80491aca7") + endif() + set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) +else() + cmake_policy(VERSION 3.28) +endif() + +# Default to C++ extensions being off. Libc++'s modules support have trouble +# with extensions right now. +set(CMAKE_CXX_EXTENSIONS OFF) + +# Propagates the CMake options to the modules. +# +# This uses the std module hard-coded since the std.compat module does not +# depend on these flags. +macro(compile_define_if_not condition def) + if (NOT ${condition}) + target_compile_definitions(std PRIVATE ${def}) + endif() +endmacro() +macro(compile_define_if condition def) + if (${condition}) + target_compile_definitions(std PRIVATE ${def}) + endif() +endmacro() + +### STD + +add_library(std) +target_sources(std + PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES + std.cppm +) + +target_include_directories(std SYSTEM PUBLIC @LIBCXX_CONFIGURED_INCLUDE_DIRS@) + +if (NOT @LIBCXX_ENABLE_EXCEPTIONS@) + target_compile_options(std PUBLIC -fno-exceptions) +endif() + +target_compile_options(std + PUBLIC + -nostdinc++ + @LIBCXX_COMPILE_FLAGS@ +) +target_compile_options(std + PRIVATE + -Wno-reserved-module-identifier + -Wno-reserved-user-defined-literal +) +target_link_options(std PUBLIC -nostdlib++ -Wl,-rpath,@LIBCXX_LIBRARY_DIR@ -L@LIBCXX_LIBRARY_DIR@) +target_link_libraries(std c++) +set_target_properties(std + PROPERTIES + OUTPUT_NAME "c++std" +) + +### STD.COMPAT + +add_library(std.compat) +target_sources(std.compat + PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES + std.compat.cppm +) + +target_include_directories(std.compat SYSTEM PUBLIC @LIBCXX_CONFIGURED_INCLUDE_DIRS@) + +if (NOT @LIBCXX_ENABLE_EXCEPTIONS@) + target_compile_options(std.compat PUBLIC -fno-exceptions) +endif() + +target_compile_options(std.compat + PUBLIC + -nostdinc++ + @LIBCXX_COMPILE_FLAGS@ +) +target_compile_options(std.compat + PRIVATE + -Wno-reserved-module-identifier + -Wno-reserved-user-defined-literal +) +set_target_properties(std.compat + PROPERTIES + OUTPUT_NAME "c++std.compat" +) +add_dependencies(std.compat std) +target_link_libraries(std.compat PUBLIC std c++) diff --git a/system/lib/libcxx/modules/README.md b/system/lib/libcxx/modules/README.md new file mode 100644 index 0000000000000..23dd60602beb1 --- /dev/null +++ b/system/lib/libcxx/modules/README.md @@ -0,0 +1,21 @@ +# The "module partitions" for the std module + +The files in this directory contain the exported named declarations per header. +These files are used for the following purposes: + + - During testing exported named declarations are tested against the named + declarations in the associated header. This excludes reserved names; they + are not exported. + - Generate the module std. + +These use cases require including the required headers for these "partitions" +at different locations. This means the user of these "partitions" are +responsible for including the proper header and validating whether the header can +be loaded in the current libc++ configuration. For example "include " +fails when locales are not available. The "partitions" use the libc++ feature +macros to export the declarations available in the current configuration. This +configuration is available if the user includes the `__config' header. + +We use `.inc` files that we include from the top-level module instead of +using real C++ module partitions. This is a lot faster than module partitions, +see [this](https://discourse.llvm.org/t/alternatives-to-the-implementation-of-std-modules/71958) for details. diff --git a/system/lib/libcxx/modules/modules.json.in b/system/lib/libcxx/modules/modules.json.in new file mode 100644 index 0000000000000..759ac92d81f18 --- /dev/null +++ b/system/lib/libcxx/modules/modules.json.in @@ -0,0 +1,26 @@ +{ + "version": 1, + "revision": 1, + "modules": [ + { + "logical-name": "std", + "source-path": "@LIBCXX_MODULE_RELATIVE_PATH@/std.cppm", + "is-std-library": true, + "local-arguments": { + "system-include-directories": [ + "@LIBCXX_MODULE_RELATIVE_PATH@" + ] + } + }, + { + "logical-name": "std.compat", + "source-path": "@LIBCXX_MODULE_RELATIVE_PATH@/std.compat.cppm", + "is-std-library": true, + "local-arguments": { + "system-include-directories": [ + "@LIBCXX_MODULE_RELATIVE_PATH@" + ] + } + } + ] +} diff --git a/system/lib/libcxx/modules/prefix/lib/emscripten/libc++.modules.json b/system/lib/libcxx/modules/prefix/lib/emscripten/libc++.modules.json new file mode 100644 index 0000000000000..401339f11c408 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/lib/emscripten/libc++.modules.json @@ -0,0 +1,26 @@ +{ + "version": 1, + "revision": 1, + "modules": [ + { + "logical-name": "std", + "source-path": "../../share/libc++/v1/std.cppm", + "is-std-library": true, + "local-arguments": { + "system-include-directories": [ + "../../share/libc++/v1" + ] + } + }, + { + "logical-name": "std.compat", + "source-path": "../../share/libc++/v1/std.compat.cppm", + "is-std-library": true, + "local-arguments": { + "system-include-directories": [ + "../../share/libc++/v1" + ] + } + } + ] +} diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/CMakeLists.txt b/system/lib/libcxx/modules/prefix/share/libc++/v1/CMakeLists.txt new file mode 100644 index 0000000000000..b722ab4db08bf --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/CMakeLists.txt @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.26) + +project(libc++-modules LANGUAGES CXX) + +# Enable CMake's module support +if(CMAKE_VERSION VERSION_LESS "3.28.0") + if(CMAKE_VERSION VERSION_LESS "3.27.0") + set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "2182bf5c-ef0d-489a-91da-49dbc3090d2a") + else() + set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "aa1f7df0-828a-4fcd-9afc-2dc80491aca7") + endif() + set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 1) +else() + cmake_policy(VERSION 3.28) +endif() + +# Default to C++ extensions being off. Libc++'s modules support have trouble +# with extensions right now. +set(CMAKE_CXX_EXTENSIONS OFF) + +# Propagates the CMake options to the modules. +# +# This uses the std module hard-coded since the std.compat module does not +# depend on these flags. +macro(compile_define_if_not condition def) + if (NOT ${condition}) + target_compile_definitions(std PRIVATE ${def}) + endif() +endmacro() +macro(compile_define_if condition def) + if (${condition}) + target_compile_definitions(std PRIVATE ${def}) + endif() +endmacro() + +### STD + +add_library(std) +target_sources(std + PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES + std.cppm +) + +target_include_directories(std SYSTEM PUBLIC ) + +if (NOT ) + target_compile_options(std PUBLIC -fno-exceptions) +endif() + +target_compile_options(std + PUBLIC + -nostdinc++ + +) +target_compile_options(std + PRIVATE + -Wno-reserved-module-identifier + -Wno-reserved-user-defined-literal +) +target_link_options(std PUBLIC -nostdlib++ -Wl,-rpath,/tmp/tmpuful_rzi/out/dist/lib/emscripten -L/tmp/tmpuful_rzi/out/dist/lib/emscripten) +target_link_libraries(std c++) +set_target_properties(std + PROPERTIES + OUTPUT_NAME "c++std" +) + +### STD.COMPAT + +add_library(std.compat) +target_sources(std.compat + PUBLIC FILE_SET cxx_modules TYPE CXX_MODULES FILES + std.compat.cppm +) + +target_include_directories(std.compat SYSTEM PUBLIC ) + +if (NOT ) + target_compile_options(std.compat PUBLIC -fno-exceptions) +endif() + +target_compile_options(std.compat + PUBLIC + -nostdinc++ + +) +target_compile_options(std.compat + PRIVATE + -Wno-reserved-module-identifier + -Wno-reserved-user-defined-literal +) +set_target_properties(std.compat + PROPERTIES + OUTPUT_NAME "c++std.compat" +) +add_dependencies(std.compat std) +target_link_libraries(std.compat PUBLIC std c++) diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat.cppm b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat.cppm new file mode 100644 index 0000000000000..23ac64286965e --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat.cppm @@ -0,0 +1,108 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// WARNING, this entire header is generated by +// utils/generate_libcxx_cppm_in.py +// DO NOT MODIFY! + +module; + +#include <__config> + +// The headers of Table 24: C++ library headers [tab:headers.cpp] +// and the headers of Table 25: C++ headers for C library facilities [tab:headers.cpp.c] +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// *** Headers not yet available *** +// +// This validation is mainly to catch when a new header is added but adding the +// corresponding .inc file is forgotten. However, the check based on __has_include +// alone doesn't work on Windows because the Windows SDK is on the include path, +// and that means the MSVC STL headers can be found as well, tricking __has_include +// into thinking that libc++ provides the header. +// +#ifndef _WIN32 +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +#endif // _WIN32 + +export module std.compat; +export import std; + + +#include "std.compat/cassert.inc" +#include "std.compat/cctype.inc" +#include "std.compat/cerrno.inc" +#include "std.compat/cfenv.inc" +#include "std.compat/cfloat.inc" +#include "std.compat/cinttypes.inc" +#include "std.compat/climits.inc" +#include "std.compat/clocale.inc" +#include "std.compat/cmath.inc" +#include "std.compat/csetjmp.inc" +#include "std.compat/csignal.inc" +#include "std.compat/cstdarg.inc" +#include "std.compat/cstddef.inc" +#include "std.compat/cstdint.inc" +#include "std.compat/cstdio.inc" +#include "std.compat/cstdlib.inc" +#include "std.compat/cstring.inc" +#include "std.compat/ctime.inc" +#include "std.compat/cuchar.inc" +#include "std.compat/cwchar.inc" +#include "std.compat/cwctype.inc" + diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cassert.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cassert.inc new file mode 100644 index 0000000000000..ac0533d14e9a9 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cassert.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // This module exports nothing. +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cctype.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cctype.inc new file mode 100644 index 0000000000000..5cde12ddb38d7 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cctype.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::isalnum _LIBCPP_USING_IF_EXISTS; + using ::isalpha _LIBCPP_USING_IF_EXISTS; + using ::isblank _LIBCPP_USING_IF_EXISTS; + using ::iscntrl _LIBCPP_USING_IF_EXISTS; + using ::isdigit _LIBCPP_USING_IF_EXISTS; + using ::isgraph _LIBCPP_USING_IF_EXISTS; + using ::islower _LIBCPP_USING_IF_EXISTS; + using ::isprint _LIBCPP_USING_IF_EXISTS; + using ::ispunct _LIBCPP_USING_IF_EXISTS; + using ::isspace _LIBCPP_USING_IF_EXISTS; + using ::isupper _LIBCPP_USING_IF_EXISTS; + using ::isxdigit _LIBCPP_USING_IF_EXISTS; + using ::tolower _LIBCPP_USING_IF_EXISTS; + using ::toupper _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cerrno.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cerrno.inc new file mode 100644 index 0000000000000..ac0533d14e9a9 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cerrno.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // This module exports nothing. +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cfenv.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cfenv.inc new file mode 100644 index 0000000000000..5a373f6469712 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cfenv.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // types + using ::fenv_t _LIBCPP_USING_IF_EXISTS; + using ::fexcept_t _LIBCPP_USING_IF_EXISTS; + + // functions + using ::feclearexcept _LIBCPP_USING_IF_EXISTS; + using ::fegetexceptflag _LIBCPP_USING_IF_EXISTS; + using ::feraiseexcept _LIBCPP_USING_IF_EXISTS; + using ::fesetexceptflag _LIBCPP_USING_IF_EXISTS; + using ::fetestexcept _LIBCPP_USING_IF_EXISTS; + + using ::fegetround _LIBCPP_USING_IF_EXISTS; + using ::fesetround _LIBCPP_USING_IF_EXISTS; + + using ::fegetenv _LIBCPP_USING_IF_EXISTS; + using ::feholdexcept _LIBCPP_USING_IF_EXISTS; + using ::fesetenv _LIBCPP_USING_IF_EXISTS; + using ::feupdateenv _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cfloat.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cfloat.inc new file mode 100644 index 0000000000000..ac0533d14e9a9 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cfloat.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // This module exports nothing. +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cinttypes.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cinttypes.inc new file mode 100644 index 0000000000000..4789ec3310200 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cinttypes.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::imaxdiv_t _LIBCPP_USING_IF_EXISTS; + + using ::imaxabs _LIBCPP_USING_IF_EXISTS; + using ::imaxdiv _LIBCPP_USING_IF_EXISTS; + using ::strtoimax _LIBCPP_USING_IF_EXISTS; + using ::strtoumax _LIBCPP_USING_IF_EXISTS; + using ::wcstoimax _LIBCPP_USING_IF_EXISTS; + using ::wcstoumax _LIBCPP_USING_IF_EXISTS; + + // abs is conditionally here, but always present in cmath.cppm. To avoid + // conflicing declarations omit the using here. + + // div is conditionally here, but always present in cstdlib.cppm. To avoid + // conflicing declarations omit the using here. +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/climits.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/climits.inc new file mode 100644 index 0000000000000..ac0533d14e9a9 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/climits.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // This module exports nothing. +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/clocale.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/clocale.inc new file mode 100644 index 0000000000000..bc1c0c4d1adc9 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/clocale.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { +#if _LIBCPP_HAS_LOCALIZATION + using ::lconv _LIBCPP_USING_IF_EXISTS; + + using ::localeconv _LIBCPP_USING_IF_EXISTS; + using ::setlocale _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_LOCALIZATION +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cmath.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cmath.inc new file mode 100644 index 0000000000000..6c86d0df57406 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cmath.inc @@ -0,0 +1,268 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::double_t _LIBCPP_USING_IF_EXISTS; + using ::float_t _LIBCPP_USING_IF_EXISTS; + + using ::acos _LIBCPP_USING_IF_EXISTS; + using ::acosf _LIBCPP_USING_IF_EXISTS; + using ::acosl _LIBCPP_USING_IF_EXISTS; + + using ::asin _LIBCPP_USING_IF_EXISTS; + using ::asinf _LIBCPP_USING_IF_EXISTS; + using ::asinl _LIBCPP_USING_IF_EXISTS; + + using ::atan _LIBCPP_USING_IF_EXISTS; + using ::atanf _LIBCPP_USING_IF_EXISTS; + using ::atanl _LIBCPP_USING_IF_EXISTS; + + using ::atan2 _LIBCPP_USING_IF_EXISTS; + using ::atan2f _LIBCPP_USING_IF_EXISTS; + using ::atan2l _LIBCPP_USING_IF_EXISTS; + + using ::cos _LIBCPP_USING_IF_EXISTS; + using ::cosf _LIBCPP_USING_IF_EXISTS; + using ::cosl _LIBCPP_USING_IF_EXISTS; + + using ::sin _LIBCPP_USING_IF_EXISTS; + using ::sinf _LIBCPP_USING_IF_EXISTS; + using ::sinl _LIBCPP_USING_IF_EXISTS; + + using ::tan _LIBCPP_USING_IF_EXISTS; + using ::tanf _LIBCPP_USING_IF_EXISTS; + using ::tanl _LIBCPP_USING_IF_EXISTS; + + using ::acosh _LIBCPP_USING_IF_EXISTS; + using ::acoshf _LIBCPP_USING_IF_EXISTS; + using ::acoshl _LIBCPP_USING_IF_EXISTS; + + using ::asinh _LIBCPP_USING_IF_EXISTS; + using ::asinhf _LIBCPP_USING_IF_EXISTS; + using ::asinhl _LIBCPP_USING_IF_EXISTS; + + using ::atanh _LIBCPP_USING_IF_EXISTS; + using ::atanhf _LIBCPP_USING_IF_EXISTS; + using ::atanhl _LIBCPP_USING_IF_EXISTS; + + using ::cosh _LIBCPP_USING_IF_EXISTS; + using ::coshf _LIBCPP_USING_IF_EXISTS; + using ::coshl _LIBCPP_USING_IF_EXISTS; + + using ::sinh _LIBCPP_USING_IF_EXISTS; + using ::sinhf _LIBCPP_USING_IF_EXISTS; + using ::sinhl _LIBCPP_USING_IF_EXISTS; + + using ::tanh _LIBCPP_USING_IF_EXISTS; + using ::tanhf _LIBCPP_USING_IF_EXISTS; + using ::tanhl _LIBCPP_USING_IF_EXISTS; + + using ::exp _LIBCPP_USING_IF_EXISTS; + using ::expf _LIBCPP_USING_IF_EXISTS; + using ::expl _LIBCPP_USING_IF_EXISTS; + + using ::exp2 _LIBCPP_USING_IF_EXISTS; + using ::exp2f _LIBCPP_USING_IF_EXISTS; + using ::exp2l _LIBCPP_USING_IF_EXISTS; + + using ::expm1 _LIBCPP_USING_IF_EXISTS; + using ::expm1f _LIBCPP_USING_IF_EXISTS; + using ::expm1l _LIBCPP_USING_IF_EXISTS; + + using ::frexp _LIBCPP_USING_IF_EXISTS; + using ::frexpf _LIBCPP_USING_IF_EXISTS; + using ::frexpl _LIBCPP_USING_IF_EXISTS; + + using ::ilogb _LIBCPP_USING_IF_EXISTS; + using ::ilogbf _LIBCPP_USING_IF_EXISTS; + using ::ilogbl _LIBCPP_USING_IF_EXISTS; + + using ::ldexp _LIBCPP_USING_IF_EXISTS; + using ::ldexpf _LIBCPP_USING_IF_EXISTS; + using ::ldexpl _LIBCPP_USING_IF_EXISTS; + + using ::log _LIBCPP_USING_IF_EXISTS; + using ::logf _LIBCPP_USING_IF_EXISTS; + using ::logl _LIBCPP_USING_IF_EXISTS; + + using ::log10 _LIBCPP_USING_IF_EXISTS; + using ::log10f _LIBCPP_USING_IF_EXISTS; + using ::log10l _LIBCPP_USING_IF_EXISTS; + + using ::log1p _LIBCPP_USING_IF_EXISTS; + using ::log1pf _LIBCPP_USING_IF_EXISTS; + using ::log1pl _LIBCPP_USING_IF_EXISTS; + + using ::log2 _LIBCPP_USING_IF_EXISTS; + using ::log2f _LIBCPP_USING_IF_EXISTS; + using ::log2l _LIBCPP_USING_IF_EXISTS; + + using ::logb _LIBCPP_USING_IF_EXISTS; + using ::logbf _LIBCPP_USING_IF_EXISTS; + using ::logbl _LIBCPP_USING_IF_EXISTS; + + using ::modf _LIBCPP_USING_IF_EXISTS; + using ::modff _LIBCPP_USING_IF_EXISTS; + using ::modfl _LIBCPP_USING_IF_EXISTS; + + using ::scalbn _LIBCPP_USING_IF_EXISTS; + using ::scalbnf _LIBCPP_USING_IF_EXISTS; + using ::scalbnl _LIBCPP_USING_IF_EXISTS; + + using ::scalbln _LIBCPP_USING_IF_EXISTS; + using ::scalblnf _LIBCPP_USING_IF_EXISTS; + using ::scalblnl _LIBCPP_USING_IF_EXISTS; + + using ::cbrt _LIBCPP_USING_IF_EXISTS; + using ::cbrtf _LIBCPP_USING_IF_EXISTS; + using ::cbrtl _LIBCPP_USING_IF_EXISTS; + + // [c.math.abs], absolute values + using ::abs _LIBCPP_USING_IF_EXISTS; + + using ::fabs _LIBCPP_USING_IF_EXISTS; + using ::fabsf _LIBCPP_USING_IF_EXISTS; + using ::fabsl _LIBCPP_USING_IF_EXISTS; + + using ::hypot _LIBCPP_USING_IF_EXISTS; + using ::hypotf _LIBCPP_USING_IF_EXISTS; + using ::hypotl _LIBCPP_USING_IF_EXISTS; + + // [c.math.hypot3], three-dimensional hypotenuse + + using ::pow _LIBCPP_USING_IF_EXISTS; + using ::powf _LIBCPP_USING_IF_EXISTS; + using ::powl _LIBCPP_USING_IF_EXISTS; + + using ::sqrt _LIBCPP_USING_IF_EXISTS; + using ::sqrtf _LIBCPP_USING_IF_EXISTS; + using ::sqrtl _LIBCPP_USING_IF_EXISTS; + + using ::erf _LIBCPP_USING_IF_EXISTS; + using ::erff _LIBCPP_USING_IF_EXISTS; + using ::erfl _LIBCPP_USING_IF_EXISTS; + + using ::erfc _LIBCPP_USING_IF_EXISTS; + using ::erfcf _LIBCPP_USING_IF_EXISTS; + using ::erfcl _LIBCPP_USING_IF_EXISTS; + + using ::lgamma _LIBCPP_USING_IF_EXISTS; + using ::lgammaf _LIBCPP_USING_IF_EXISTS; + using ::lgammal _LIBCPP_USING_IF_EXISTS; + + using ::tgamma _LIBCPP_USING_IF_EXISTS; + using ::tgammaf _LIBCPP_USING_IF_EXISTS; + using ::tgammal _LIBCPP_USING_IF_EXISTS; + + using ::ceil _LIBCPP_USING_IF_EXISTS; + using ::ceilf _LIBCPP_USING_IF_EXISTS; + using ::ceill _LIBCPP_USING_IF_EXISTS; + + using ::floor _LIBCPP_USING_IF_EXISTS; + using ::floorf _LIBCPP_USING_IF_EXISTS; + using ::floorl _LIBCPP_USING_IF_EXISTS; + + using ::nearbyint _LIBCPP_USING_IF_EXISTS; + using ::nearbyintf _LIBCPP_USING_IF_EXISTS; + using ::nearbyintl _LIBCPP_USING_IF_EXISTS; + + using ::rint _LIBCPP_USING_IF_EXISTS; + using ::rintf _LIBCPP_USING_IF_EXISTS; + using ::rintl _LIBCPP_USING_IF_EXISTS; + + using ::lrint _LIBCPP_USING_IF_EXISTS; + using ::lrintf _LIBCPP_USING_IF_EXISTS; + using ::lrintl _LIBCPP_USING_IF_EXISTS; + + using ::llrint _LIBCPP_USING_IF_EXISTS; + using ::llrintf _LIBCPP_USING_IF_EXISTS; + using ::llrintl _LIBCPP_USING_IF_EXISTS; + + using ::round _LIBCPP_USING_IF_EXISTS; + using ::roundf _LIBCPP_USING_IF_EXISTS; + using ::roundl _LIBCPP_USING_IF_EXISTS; + + using ::lround _LIBCPP_USING_IF_EXISTS; + using ::lroundf _LIBCPP_USING_IF_EXISTS; + using ::lroundl _LIBCPP_USING_IF_EXISTS; + + using ::llround _LIBCPP_USING_IF_EXISTS; + using ::llroundf _LIBCPP_USING_IF_EXISTS; + using ::llroundl _LIBCPP_USING_IF_EXISTS; + + using ::trunc _LIBCPP_USING_IF_EXISTS; + using ::truncf _LIBCPP_USING_IF_EXISTS; + using ::truncl _LIBCPP_USING_IF_EXISTS; + + using ::fmod _LIBCPP_USING_IF_EXISTS; + using ::fmodf _LIBCPP_USING_IF_EXISTS; + using ::fmodl _LIBCPP_USING_IF_EXISTS; + + using ::remainder _LIBCPP_USING_IF_EXISTS; + using ::remainderf _LIBCPP_USING_IF_EXISTS; + using ::remainderl _LIBCPP_USING_IF_EXISTS; + + using ::remquo _LIBCPP_USING_IF_EXISTS; + using ::remquof _LIBCPP_USING_IF_EXISTS; + using ::remquol _LIBCPP_USING_IF_EXISTS; + + using ::copysign _LIBCPP_USING_IF_EXISTS; + using ::copysignf _LIBCPP_USING_IF_EXISTS; + using ::copysignl _LIBCPP_USING_IF_EXISTS; + + using ::nan _LIBCPP_USING_IF_EXISTS; + using ::nanf _LIBCPP_USING_IF_EXISTS; + using ::nanl _LIBCPP_USING_IF_EXISTS; + + using ::nextafter _LIBCPP_USING_IF_EXISTS; + using ::nextafterf _LIBCPP_USING_IF_EXISTS; + using ::nextafterl _LIBCPP_USING_IF_EXISTS; + + using ::nexttoward _LIBCPP_USING_IF_EXISTS; + using ::nexttowardf _LIBCPP_USING_IF_EXISTS; + using ::nexttowardl _LIBCPP_USING_IF_EXISTS; + + using ::fdim _LIBCPP_USING_IF_EXISTS; + using ::fdimf _LIBCPP_USING_IF_EXISTS; + using ::fdiml _LIBCPP_USING_IF_EXISTS; + + using ::fmax _LIBCPP_USING_IF_EXISTS; + using ::fmaxf _LIBCPP_USING_IF_EXISTS; + using ::fmaxl _LIBCPP_USING_IF_EXISTS; + + using ::fmin _LIBCPP_USING_IF_EXISTS; + using ::fminf _LIBCPP_USING_IF_EXISTS; + using ::fminl _LIBCPP_USING_IF_EXISTS; + + using ::fma _LIBCPP_USING_IF_EXISTS; + using ::fmaf _LIBCPP_USING_IF_EXISTS; + using ::fmal _LIBCPP_USING_IF_EXISTS; + + // [c.math.lerp], linear interpolation + // [support.c.headers.other]/1 + // ... placed within the global namespace scope, except for the functions + // described in [sf.cmath], the std::lerp function overloads ([c.math.lerp]) + // ... + + // [c.math.fpclass], classification / comparison functions + using ::fpclassify _LIBCPP_USING_IF_EXISTS; + using ::isfinite _LIBCPP_USING_IF_EXISTS; + using ::isgreater _LIBCPP_USING_IF_EXISTS; + using ::isgreaterequal _LIBCPP_USING_IF_EXISTS; + using ::isinf _LIBCPP_USING_IF_EXISTS; + using ::isless _LIBCPP_USING_IF_EXISTS; + using ::islessequal _LIBCPP_USING_IF_EXISTS; + using ::islessgreater _LIBCPP_USING_IF_EXISTS; + using ::isnan _LIBCPP_USING_IF_EXISTS; + using ::isnormal _LIBCPP_USING_IF_EXISTS; + using ::isunordered _LIBCPP_USING_IF_EXISTS; + using ::signbit _LIBCPP_USING_IF_EXISTS; + + // [sf.cmath], mathematical special functions +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/csetjmp.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/csetjmp.inc new file mode 100644 index 0000000000000..53e1421a2fbdd --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/csetjmp.inc @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::jmp_buf _LIBCPP_USING_IF_EXISTS; + using ::longjmp _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/csignal.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/csignal.inc new file mode 100644 index 0000000000000..bf72459df1653 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/csignal.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::sig_atomic_t _LIBCPP_USING_IF_EXISTS; + + // [support.signal], signal handlers + using ::signal _LIBCPP_USING_IF_EXISTS; + + using ::raise _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdarg.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdarg.inc new file mode 100644 index 0000000000000..79b5df4ec99ce --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdarg.inc @@ -0,0 +1,10 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { using ::va_list _LIBCPP_USING_IF_EXISTS; } // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstddef.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstddef.inc new file mode 100644 index 0000000000000..8704a31e01f32 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstddef.inc @@ -0,0 +1,22 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::max_align_t _LIBCPP_USING_IF_EXISTS; + using ::nullptr_t; + using ::ptrdiff_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + + // [support.c.headers]/1 + // ... placed within the global namespace scope, except for ... the + // declaration of std::byte ([cstddef.syn]), and the functions and + // function templates described in [support.types.byteops]. ... + + // [support.types.byteops], byte type operations +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdint.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdint.inc new file mode 100644 index 0000000000000..a8dd6898cb266 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdint.inc @@ -0,0 +1,50 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // signed + using ::int8_t _LIBCPP_USING_IF_EXISTS; + using ::int16_t _LIBCPP_USING_IF_EXISTS; + using ::int32_t _LIBCPP_USING_IF_EXISTS; + using ::int64_t _LIBCPP_USING_IF_EXISTS; + + using ::int_fast16_t _LIBCPP_USING_IF_EXISTS; + using ::int_fast32_t _LIBCPP_USING_IF_EXISTS; + using ::int_fast64_t _LIBCPP_USING_IF_EXISTS; + using ::int_fast8_t _LIBCPP_USING_IF_EXISTS; + + using ::int_least16_t _LIBCPP_USING_IF_EXISTS; + using ::int_least32_t _LIBCPP_USING_IF_EXISTS; + using ::int_least64_t _LIBCPP_USING_IF_EXISTS; + using ::int_least8_t _LIBCPP_USING_IF_EXISTS; + + using ::intmax_t _LIBCPP_USING_IF_EXISTS; + + using ::intptr_t _LIBCPP_USING_IF_EXISTS; + + // unsigned + using ::uint8_t _LIBCPP_USING_IF_EXISTS; + using ::uint16_t _LIBCPP_USING_IF_EXISTS; + using ::uint32_t _LIBCPP_USING_IF_EXISTS; + using ::uint64_t _LIBCPP_USING_IF_EXISTS; + + using ::uint_fast16_t _LIBCPP_USING_IF_EXISTS; + using ::uint_fast32_t _LIBCPP_USING_IF_EXISTS; + using ::uint_fast64_t _LIBCPP_USING_IF_EXISTS; + using ::uint_fast8_t _LIBCPP_USING_IF_EXISTS; + + using ::uint_least16_t _LIBCPP_USING_IF_EXISTS; + using ::uint_least32_t _LIBCPP_USING_IF_EXISTS; + using ::uint_least64_t _LIBCPP_USING_IF_EXISTS; + using ::uint_least8_t _LIBCPP_USING_IF_EXISTS; + + using ::uintmax_t _LIBCPP_USING_IF_EXISTS; + + using ::uintptr_t _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdio.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdio.inc new file mode 100644 index 0000000000000..33dd2cbfb0d7c --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdio.inc @@ -0,0 +1,61 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::FILE _LIBCPP_USING_IF_EXISTS; + using ::fpos_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + + using ::clearerr _LIBCPP_USING_IF_EXISTS; + using ::fclose _LIBCPP_USING_IF_EXISTS; + using ::feof _LIBCPP_USING_IF_EXISTS; + using ::ferror _LIBCPP_USING_IF_EXISTS; + using ::fflush _LIBCPP_USING_IF_EXISTS; + using ::fgetc _LIBCPP_USING_IF_EXISTS; + using ::fgetpos _LIBCPP_USING_IF_EXISTS; + using ::fgets _LIBCPP_USING_IF_EXISTS; + using ::fopen _LIBCPP_USING_IF_EXISTS; + using ::fprintf _LIBCPP_USING_IF_EXISTS; + using ::fputc _LIBCPP_USING_IF_EXISTS; + using ::fputs _LIBCPP_USING_IF_EXISTS; + using ::fread _LIBCPP_USING_IF_EXISTS; + using ::freopen _LIBCPP_USING_IF_EXISTS; + using ::fscanf _LIBCPP_USING_IF_EXISTS; + using ::fseek _LIBCPP_USING_IF_EXISTS; + using ::fsetpos _LIBCPP_USING_IF_EXISTS; + using ::ftell _LIBCPP_USING_IF_EXISTS; + using ::fwrite _LIBCPP_USING_IF_EXISTS; + using ::getc _LIBCPP_USING_IF_EXISTS; + using ::getchar _LIBCPP_USING_IF_EXISTS; + using ::perror _LIBCPP_USING_IF_EXISTS; + using ::printf _LIBCPP_USING_IF_EXISTS; + using ::putc _LIBCPP_USING_IF_EXISTS; + using ::putchar _LIBCPP_USING_IF_EXISTS; + using ::puts _LIBCPP_USING_IF_EXISTS; + using ::remove _LIBCPP_USING_IF_EXISTS; + using ::rename _LIBCPP_USING_IF_EXISTS; + using ::rewind _LIBCPP_USING_IF_EXISTS; + using ::scanf _LIBCPP_USING_IF_EXISTS; + using ::setbuf _LIBCPP_USING_IF_EXISTS; + using ::setvbuf _LIBCPP_USING_IF_EXISTS; + using ::snprintf _LIBCPP_USING_IF_EXISTS; + using ::sprintf _LIBCPP_USING_IF_EXISTS; + using ::sscanf _LIBCPP_USING_IF_EXISTS; + using ::tmpfile _LIBCPP_USING_IF_EXISTS; + using ::tmpnam _LIBCPP_USING_IF_EXISTS; + using ::ungetc _LIBCPP_USING_IF_EXISTS; + using ::vfprintf _LIBCPP_USING_IF_EXISTS; + using ::vfscanf _LIBCPP_USING_IF_EXISTS; + using ::vprintf _LIBCPP_USING_IF_EXISTS; + using ::vscanf _LIBCPP_USING_IF_EXISTS; + using ::vsnprintf _LIBCPP_USING_IF_EXISTS; + using ::vsprintf _LIBCPP_USING_IF_EXISTS; + using ::vsscanf _LIBCPP_USING_IF_EXISTS; + +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdlib.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdlib.inc new file mode 100644 index 0000000000000..84583d9efa59b --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstdlib.inc @@ -0,0 +1,72 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::div_t _LIBCPP_USING_IF_EXISTS; + using ::ldiv_t _LIBCPP_USING_IF_EXISTS; + using ::lldiv_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + + // [support.start.term], start and termination + using ::_Exit _LIBCPP_USING_IF_EXISTS; + using ::abort _LIBCPP_USING_IF_EXISTS; + using ::at_quick_exit _LIBCPP_USING_IF_EXISTS; + using ::atexit _LIBCPP_USING_IF_EXISTS; + using ::exit _LIBCPP_USING_IF_EXISTS; + using ::quick_exit _LIBCPP_USING_IF_EXISTS; + + using ::getenv _LIBCPP_USING_IF_EXISTS; + using ::system _LIBCPP_USING_IF_EXISTS; + + // [c.malloc], C library memory allocation + using ::aligned_alloc _LIBCPP_USING_IF_EXISTS; + using ::calloc _LIBCPP_USING_IF_EXISTS; + using ::free _LIBCPP_USING_IF_EXISTS; + using ::malloc _LIBCPP_USING_IF_EXISTS; + using ::realloc _LIBCPP_USING_IF_EXISTS; + + using ::atof _LIBCPP_USING_IF_EXISTS; + using ::atoi _LIBCPP_USING_IF_EXISTS; + using ::atol _LIBCPP_USING_IF_EXISTS; + using ::atoll _LIBCPP_USING_IF_EXISTS; + using ::strtod _LIBCPP_USING_IF_EXISTS; + using ::strtof _LIBCPP_USING_IF_EXISTS; + using ::strtol _LIBCPP_USING_IF_EXISTS; + using ::strtold _LIBCPP_USING_IF_EXISTS; + using ::strtoll _LIBCPP_USING_IF_EXISTS; + using ::strtoul _LIBCPP_USING_IF_EXISTS; + using ::strtoull _LIBCPP_USING_IF_EXISTS; + + // [c.mb.wcs], multibyte / wide string and character conversion functions + using ::mblen _LIBCPP_USING_IF_EXISTS; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using ::mbstowcs _LIBCPP_USING_IF_EXISTS; + using ::mbtowc _LIBCPP_USING_IF_EXISTS; + using ::wcstombs _LIBCPP_USING_IF_EXISTS; + using ::wctomb _LIBCPP_USING_IF_EXISTS; +#endif + // [alg.c.library], C standard library algorithms + using ::bsearch _LIBCPP_USING_IF_EXISTS; + using ::qsort _LIBCPP_USING_IF_EXISTS; + + // [c.math.rand], low-quality random number generation + using ::rand _LIBCPP_USING_IF_EXISTS; + using ::srand _LIBCPP_USING_IF_EXISTS; + + // [c.math.abs], absolute values + using ::abs _LIBCPP_USING_IF_EXISTS; + + using ::labs _LIBCPP_USING_IF_EXISTS; + using ::llabs _LIBCPP_USING_IF_EXISTS; + + using ::div _LIBCPP_USING_IF_EXISTS; + using ::ldiv _LIBCPP_USING_IF_EXISTS; + using ::lldiv _LIBCPP_USING_IF_EXISTS; + +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstring.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstring.inc new file mode 100644 index 0000000000000..5029a7674bb21 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cstring.inc @@ -0,0 +1,36 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::size_t _LIBCPP_USING_IF_EXISTS; + + using ::memchr _LIBCPP_USING_IF_EXISTS; + using ::memcmp _LIBCPP_USING_IF_EXISTS; + using ::memcpy _LIBCPP_USING_IF_EXISTS; + using ::memmove _LIBCPP_USING_IF_EXISTS; + using ::memset _LIBCPP_USING_IF_EXISTS; + using ::strcat _LIBCPP_USING_IF_EXISTS; + using ::strchr _LIBCPP_USING_IF_EXISTS; + using ::strcmp _LIBCPP_USING_IF_EXISTS; + using ::strcoll _LIBCPP_USING_IF_EXISTS; + using ::strcpy _LIBCPP_USING_IF_EXISTS; + using ::strcspn _LIBCPP_USING_IF_EXISTS; + using ::strerror _LIBCPP_USING_IF_EXISTS; + using ::strlen _LIBCPP_USING_IF_EXISTS; + using ::strncat _LIBCPP_USING_IF_EXISTS; + using ::strncmp _LIBCPP_USING_IF_EXISTS; + using ::strncpy _LIBCPP_USING_IF_EXISTS; + using ::strpbrk _LIBCPP_USING_IF_EXISTS; + using ::strrchr _LIBCPP_USING_IF_EXISTS; + using ::strspn _LIBCPP_USING_IF_EXISTS; + using ::strstr _LIBCPP_USING_IF_EXISTS; + using ::strtok _LIBCPP_USING_IF_EXISTS; + using ::strxfrm _LIBCPP_USING_IF_EXISTS; + +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/ctime.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/ctime.inc new file mode 100644 index 0000000000000..eba8234a08969 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/ctime.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::clock_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + using ::time_t _LIBCPP_USING_IF_EXISTS; + + using ::timespec _LIBCPP_USING_IF_EXISTS; + using ::tm _LIBCPP_USING_IF_EXISTS; + + using ::asctime _LIBCPP_USING_IF_EXISTS; + using ::clock _LIBCPP_USING_IF_EXISTS; + using ::ctime _LIBCPP_USING_IF_EXISTS; + using ::difftime _LIBCPP_USING_IF_EXISTS; + using ::gmtime _LIBCPP_USING_IF_EXISTS; + using ::localtime _LIBCPP_USING_IF_EXISTS; + using ::mktime _LIBCPP_USING_IF_EXISTS; + using ::strftime _LIBCPP_USING_IF_EXISTS; + using ::time _LIBCPP_USING_IF_EXISTS; + using ::timespec_get _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cuchar.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cuchar.inc new file mode 100644 index 0000000000000..119a8511252bf --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cuchar.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // Note the Standard does not mark these symbols optional, but libc++'s header + // does. So this seems strictly not to be conforming. + + // mbstate_t is conditionally here, but always present in cwchar.cppm. To avoid + // conflicing declarations omit the using here. + + // size_t is conditionally here, but always present in cstddef.cppm. To avoid + // conflicing declarations omit the using here. + +#if _LIBCPP_HAS_C8RTOMB_MBRTOC8 + using ::mbrtoc8 _LIBCPP_USING_IF_EXISTS; + using ::c8rtomb _LIBCPP_USING_IF_EXISTS; +#endif + using ::mbrtoc16 _LIBCPP_USING_IF_EXISTS; + using ::c16rtomb _LIBCPP_USING_IF_EXISTS; + using ::mbrtoc32 _LIBCPP_USING_IF_EXISTS; + using ::c32rtomb _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cwchar.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cwchar.inc new file mode 100644 index 0000000000000..38df15653e4a1 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cwchar.inc @@ -0,0 +1,80 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { +#if _LIBCPP_HAS_WIDE_CHARACTERS + using ::mbstate_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + using ::wint_t _LIBCPP_USING_IF_EXISTS; + + using ::tm _LIBCPP_USING_IF_EXISTS; + + using ::btowc _LIBCPP_USING_IF_EXISTS; + using ::fgetwc _LIBCPP_USING_IF_EXISTS; + using ::fgetws _LIBCPP_USING_IF_EXISTS; + using ::fputwc _LIBCPP_USING_IF_EXISTS; + using ::fputws _LIBCPP_USING_IF_EXISTS; + using ::fwide _LIBCPP_USING_IF_EXISTS; + using ::fwprintf _LIBCPP_USING_IF_EXISTS; + using ::fwscanf _LIBCPP_USING_IF_EXISTS; + using ::getwc _LIBCPP_USING_IF_EXISTS; + using ::getwchar _LIBCPP_USING_IF_EXISTS; + using ::putwc _LIBCPP_USING_IF_EXISTS; + using ::putwchar _LIBCPP_USING_IF_EXISTS; + using ::swprintf _LIBCPP_USING_IF_EXISTS; + using ::swscanf _LIBCPP_USING_IF_EXISTS; + using ::ungetwc _LIBCPP_USING_IF_EXISTS; + using ::vfwprintf _LIBCPP_USING_IF_EXISTS; + using ::vfwscanf _LIBCPP_USING_IF_EXISTS; + using ::vswprintf _LIBCPP_USING_IF_EXISTS; + using ::vswscanf _LIBCPP_USING_IF_EXISTS; + using ::vwprintf _LIBCPP_USING_IF_EXISTS; + using ::vwscanf _LIBCPP_USING_IF_EXISTS; + using ::wcscat _LIBCPP_USING_IF_EXISTS; + using ::wcschr _LIBCPP_USING_IF_EXISTS; + using ::wcscmp _LIBCPP_USING_IF_EXISTS; + using ::wcscoll _LIBCPP_USING_IF_EXISTS; + using ::wcscpy _LIBCPP_USING_IF_EXISTS; + using ::wcscspn _LIBCPP_USING_IF_EXISTS; + using ::wcsftime _LIBCPP_USING_IF_EXISTS; + using ::wcslen _LIBCPP_USING_IF_EXISTS; + using ::wcsncat _LIBCPP_USING_IF_EXISTS; + using ::wcsncmp _LIBCPP_USING_IF_EXISTS; + using ::wcsncpy _LIBCPP_USING_IF_EXISTS; + using ::wcspbrk _LIBCPP_USING_IF_EXISTS; + using ::wcsrchr _LIBCPP_USING_IF_EXISTS; + using ::wcsspn _LIBCPP_USING_IF_EXISTS; + using ::wcsstr _LIBCPP_USING_IF_EXISTS; + using ::wcstod _LIBCPP_USING_IF_EXISTS; + using ::wcstof _LIBCPP_USING_IF_EXISTS; + using ::wcstok _LIBCPP_USING_IF_EXISTS; + using ::wcstol _LIBCPP_USING_IF_EXISTS; + using ::wcstold _LIBCPP_USING_IF_EXISTS; + using ::wcstoll _LIBCPP_USING_IF_EXISTS; + using ::wcstoul _LIBCPP_USING_IF_EXISTS; + using ::wcstoull _LIBCPP_USING_IF_EXISTS; + using ::wcsxfrm _LIBCPP_USING_IF_EXISTS; + using ::wctob _LIBCPP_USING_IF_EXISTS; + using ::wmemchr _LIBCPP_USING_IF_EXISTS; + using ::wmemcmp _LIBCPP_USING_IF_EXISTS; + using ::wmemcpy _LIBCPP_USING_IF_EXISTS; + using ::wmemmove _LIBCPP_USING_IF_EXISTS; + using ::wmemset _LIBCPP_USING_IF_EXISTS; + using ::wprintf _LIBCPP_USING_IF_EXISTS; + using ::wscanf _LIBCPP_USING_IF_EXISTS; + + // [c.mb.wcs], multibyte / wide string and character conversion functions + using ::mbrlen _LIBCPP_USING_IF_EXISTS; + using ::mbrtowc _LIBCPP_USING_IF_EXISTS; + using ::mbsinit _LIBCPP_USING_IF_EXISTS; + using ::mbsrtowcs _LIBCPP_USING_IF_EXISTS; + using ::wcrtomb _LIBCPP_USING_IF_EXISTS; + using ::wcsrtombs _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_WIDE_CHARACTERS +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cwctype.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cwctype.inc new file mode 100644 index 0000000000000..d9c3c6556d490 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.compat/cwctype.inc @@ -0,0 +1,35 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { +#if _LIBCPP_HAS_WIDE_CHARACTERS + using ::wctrans_t _LIBCPP_USING_IF_EXISTS; + using ::wctype_t _LIBCPP_USING_IF_EXISTS; + using ::wint_t _LIBCPP_USING_IF_EXISTS; + + using ::iswalnum _LIBCPP_USING_IF_EXISTS; + using ::iswalpha _LIBCPP_USING_IF_EXISTS; + using ::iswblank _LIBCPP_USING_IF_EXISTS; + using ::iswcntrl _LIBCPP_USING_IF_EXISTS; + using ::iswctype _LIBCPP_USING_IF_EXISTS; + using ::iswdigit _LIBCPP_USING_IF_EXISTS; + using ::iswgraph _LIBCPP_USING_IF_EXISTS; + using ::iswlower _LIBCPP_USING_IF_EXISTS; + using ::iswprint _LIBCPP_USING_IF_EXISTS; + using ::iswpunct _LIBCPP_USING_IF_EXISTS; + using ::iswspace _LIBCPP_USING_IF_EXISTS; + using ::iswupper _LIBCPP_USING_IF_EXISTS; + using ::iswxdigit _LIBCPP_USING_IF_EXISTS; + using ::towctrans _LIBCPP_USING_IF_EXISTS; + using ::towlower _LIBCPP_USING_IF_EXISTS; + using ::towupper _LIBCPP_USING_IF_EXISTS; + using ::wctrans _LIBCPP_USING_IF_EXISTS; + using ::wctype _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_WIDE_CHARACTERS +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std.cppm b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.cppm new file mode 100644 index 0000000000000..1a2d1a1fc7d43 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std.cppm @@ -0,0 +1,280 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// WARNING, this entire header is generated by +// utils/generate_libcxx_cppm_in.py +// DO NOT MODIFY! + +module; + +#include <__config> + +// The headers of Table 24: C++ library headers [tab:headers.cpp] +// and the headers of Table 25: C++ headers for C library facilities [tab:headers.cpp.c] +#include +#include +#include +#if _LIBCPP_HAS_ATOMIC_HEADER +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// *** Headers not yet available *** +// +// This validation is mainly to catch when a new header is added but adding the +// corresponding .inc file is forgotten. However, the check based on __has_include +// alone doesn't work on Windows because the Windows SDK is on the include path, +// and that means the MSVC STL headers can be found as well, tricking __has_include +// into thinking that libc++ provides the header. +// +#ifndef _WIN32 +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +#endif // _WIN32 + +export module std; + + +#include "std/algorithm.inc" +#include "std/any.inc" +#include "std/array.inc" +#include "std/atomic.inc" +#include "std/barrier.inc" +#include "std/bit.inc" +#include "std/bitset.inc" +#include "std/cassert.inc" +#include "std/cctype.inc" +#include "std/cerrno.inc" +#include "std/cfenv.inc" +#include "std/cfloat.inc" +#include "std/charconv.inc" +#include "std/chrono.inc" +#include "std/cinttypes.inc" +#include "std/climits.inc" +#include "std/clocale.inc" +#include "std/cmath.inc" +#include "std/codecvt.inc" +#include "std/compare.inc" +#include "std/complex.inc" +#include "std/concepts.inc" +#include "std/condition_variable.inc" +#include "std/coroutine.inc" +#include "std/csetjmp.inc" +#include "std/csignal.inc" +#include "std/cstdarg.inc" +#include "std/cstddef.inc" +#include "std/cstdint.inc" +#include "std/cstdio.inc" +#include "std/cstdlib.inc" +#include "std/cstring.inc" +#include "std/ctime.inc" +#include "std/cuchar.inc" +#include "std/cwchar.inc" +#include "std/cwctype.inc" +#include "std/deque.inc" +#include "std/exception.inc" +#include "std/execution.inc" +#include "std/expected.inc" +#include "std/filesystem.inc" +#include "std/flat_map.inc" +#include "std/flat_set.inc" +#include "std/format.inc" +#include "std/forward_list.inc" +#include "std/fstream.inc" +#include "std/functional.inc" +#include "std/future.inc" +#include "std/generator.inc" +#include "std/hazard_pointer.inc" +#include "std/initializer_list.inc" +#include "std/iomanip.inc" +#include "std/ios.inc" +#include "std/iosfwd.inc" +#include "std/iostream.inc" +#include "std/istream.inc" +#include "std/iterator.inc" +#include "std/latch.inc" +#include "std/limits.inc" +#include "std/list.inc" +#include "std/locale.inc" +#include "std/map.inc" +#include "std/mdspan.inc" +#include "std/memory.inc" +#include "std/memory_resource.inc" +#include "std/mutex.inc" +#include "std/new.inc" +#include "std/numbers.inc" +#include "std/numeric.inc" +#include "std/optional.inc" +#include "std/ostream.inc" +#include "std/print.inc" +#include "std/queue.inc" +#include "std/random.inc" +#include "std/ranges.inc" +#include "std/ratio.inc" +#include "std/rcu.inc" +#include "std/regex.inc" +#include "std/scoped_allocator.inc" +#include "std/semaphore.inc" +#include "std/set.inc" +#include "std/shared_mutex.inc" +#include "std/source_location.inc" +#include "std/span.inc" +#include "std/spanstream.inc" +#include "std/sstream.inc" +#include "std/stack.inc" +#include "std/stacktrace.inc" +#include "std/stdexcept.inc" +#include "std/stdfloat.inc" +#include "std/stop_token.inc" +#include "std/streambuf.inc" +#include "std/string.inc" +#include "std/string_view.inc" +#include "std/strstream.inc" +#include "std/syncstream.inc" +#include "std/system_error.inc" +#include "std/text_encoding.inc" +#include "std/thread.inc" +#include "std/tuple.inc" +#include "std/type_traits.inc" +#include "std/typeindex.inc" +#include "std/typeinfo.inc" +#include "std/unordered_map.inc" +#include "std/unordered_set.inc" +#include "std/utility.inc" +#include "std/valarray.inc" +#include "std/variant.inc" +#include "std/vector.inc" +#include "std/version.inc" + diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/algorithm.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/algorithm.inc new file mode 100644 index 0000000000000..95c05f01e5562 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/algorithm.inc @@ -0,0 +1,624 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + namespace ranges { + // [algorithms.results], algorithm result types + using std::ranges::in_found_result; + using std::ranges::in_fun_result; + using std::ranges::in_in_out_result; + using std::ranges::in_in_result; + using std::ranges::in_out_out_result; + using std::ranges::in_out_result; +#if _LIBCPP_STD_VER >= 23 + using std::ranges::in_value_result; +#endif + using std::ranges::min_max_result; +#if _LIBCPP_STD_VER >= 23 + using std::ranges::out_value_result; +#endif + } // namespace ranges + + // [alg.nonmodifying], non-modifying sequence operations + // [alg.all.of], all of + using std::all_of; + namespace ranges { + using std::ranges::all_of; + } + + // [alg.any.of], any of + using std::any_of; + namespace ranges { + using std::ranges::any_of; + } + + // [alg.none.of], none of + using std::none_of; + namespace ranges { + using std::ranges::none_of; + } + +#if _LIBCPP_STD_VER >= 23 + // [alg.contains], contains + namespace ranges { + using std::ranges::contains; + using std::ranges::contains_subrange; + } // namespace ranges +#endif // _LIBCPP_STD_VER >= 23 + + // [alg.foreach], for each + using std::for_each; + + namespace ranges { + using std::ranges::for_each; + using std::ranges::for_each_result; + } // namespace ranges + + using std::for_each_n; + + namespace ranges { + using std::ranges::for_each_n_result; + + using std::ranges::for_each_n; + } // namespace ranges + + // [alg.find], find + using std::find; + using std::find_if; + using std::find_if_not; + + namespace ranges { + using std::ranges::find; + using std::ranges::find_if; + using std::ranges::find_if_not; + } // namespace ranges + +#if _LIBCPP_STD_VER >= 23 + // [alg.find.last], find last + namespace ranges { + using std::ranges::find_last; + using std::ranges::find_last_if; + using std::ranges::find_last_if_not; + } // namespace ranges +#endif + + // [alg.find.end], find end + using std::find_end; + + namespace ranges { + using std::ranges::find_end; + } + + // [alg.find.first.of], find first + using std::find_first_of; + + namespace ranges { + using std::ranges::find_first_of; + } + + // [alg.adjacent.find], adjacent find + using std::adjacent_find; + + namespace ranges { + using std::ranges::adjacent_find; + } + + // [alg.count], count + using std::count; + using std::count_if; + + namespace ranges { + using std::ranges::count; + using std::ranges::count_if; + } // namespace ranges + + // [mismatch], mismatch + using std::mismatch; + + namespace ranges { + using std::ranges::mismatch_result; + + using std::ranges::mismatch; + } // namespace ranges + + // [alg.equal], equal + using std::equal; + + namespace ranges { + using std::ranges::equal; + } + + // [alg.is.permutation], is permutation + using std::is_permutation; + + namespace ranges { + using std::ranges::is_permutation; + } + + // [alg.search], search + using std::search; + + namespace ranges { + using std::ranges::search; + } + + using std::search_n; + + namespace ranges { + using std::ranges::search_n; + } + + namespace ranges { +#if _LIBCPP_STD_VER >= 23 + // [alg.starts.with], starts with + using std::ranges::starts_with; + + // [alg.ends.with], ends with + using std::ranges::ends_with; + + // [alg.fold], fold + using std::ranges::fold_left; + using std::ranges::fold_left_with_iter; + using std::ranges::fold_left_with_iter_result; +# if 0 + using std::ranges::fold_left_first; + using std::ranges::fold_right; + using std::ranges::fold_right_last; + using std::ranges::fold_left_with_iter; + using std::ranges::fold_left_first_with_iter; + using std::ranges::fold_left_first_with_iter; +# endif +#endif // _LIBCPP_STD_VER >= 23 + } // namespace ranges + + // [alg.modifying.operations], mutating sequence operations + // [alg.copy], copy + using std::copy; + + namespace ranges { + using std::ranges::copy; + using std::ranges::copy_result; + } // namespace ranges + + using std::copy_n; + + namespace ranges { + using std::ranges::copy_n; + using std::ranges::copy_n_result; + } // namespace ranges + + using std::copy_if; + + namespace ranges { + using std::ranges::copy_if; + using std::ranges::copy_if_result; + } // namespace ranges + + using std::copy_backward; + + namespace ranges { + using std::ranges::copy_backward; + using std::ranges::copy_backward_result; + } // namespace ranges + + // [alg.move], move + using std::move; + + namespace ranges { + using std::ranges::move; + using std::ranges::move_result; + } // namespace ranges + + using std::move_backward; + + namespace ranges { + using std::ranges::move_backward; + using std::ranges::move_backward_result; + } // namespace ranges + + // [alg.swap], swap + using std::swap_ranges; + + namespace ranges { + using std::ranges::swap_ranges; + using std::ranges::swap_ranges_result; + } // namespace ranges + + using std::iter_swap; + + // [alg.transform], transform + using std::transform; + + namespace ranges { + using std::ranges::binary_transform_result; + using std::ranges::unary_transform_result; + + using std::ranges::transform; + + } // namespace ranges + + using std::replace; + using std::replace_if; + + namespace ranges { + using std::ranges::replace; + using std::ranges::replace_if; + } // namespace ranges + + using std::replace_copy; + using std::replace_copy_if; + + namespace ranges { + using std::ranges::replace_copy; + using std::ranges::replace_copy_if; + using std::ranges::replace_copy_if_result; + using std::ranges::replace_copy_result; + } // namespace ranges + + // [alg.fill], fill + using std::fill; + using std::fill_n; + + namespace ranges { + using std::ranges::fill; + using std::ranges::fill_n; + } // namespace ranges + + // [alg.generate], generate + using std::generate; + using std::generate_n; + + namespace ranges { + using std::ranges::generate; + using std::ranges::generate_n; + } // namespace ranges + + // [alg.remove], remove + using std::remove; + using std::remove_if; + + namespace ranges { + using std::ranges::remove; + using std::ranges::remove_if; + } // namespace ranges + + using std::remove_copy; + using std::remove_copy_if; + namespace ranges { + using std::ranges::remove_copy; + using std::ranges::remove_copy_if; + using std::ranges::remove_copy_if_result; + using std::ranges::remove_copy_result; + } // namespace ranges + + // [alg.unique], unique + using std::unique; + + namespace ranges { + using std::ranges::unique; + } + + using std::unique_copy; + + namespace ranges { + using std::ranges::unique_copy; + using std::ranges::unique_copy_result; + } // namespace ranges + + // [alg.reverse], reverse + using std::reverse; + + namespace ranges { + using std::ranges::reverse; + } + + using std::reverse_copy; + + namespace ranges { + using std::ranges::reverse_copy; + using std::ranges::reverse_copy_result; + } // namespace ranges + + // [alg.rotate], rotate + using std::rotate; + + namespace ranges { + using std::ranges::rotate; + } + + using std::rotate_copy; + + namespace ranges { + using std::ranges::rotate_copy; + using std::ranges::rotate_copy_result; + } // namespace ranges + + // [alg.random.sample], sample + using std::sample; + + namespace ranges { + using std::ranges::sample; + } + + // [alg.random.shuffle], shuffle + using std::shuffle; + + namespace ranges { + using std::ranges::shuffle; + } + + // [alg.shift], shift + using std::shift_left; + + namespace ranges { + // using std::ranges::shift_left; + } + + using std::shift_right; + + namespace ranges { + // using std::ranges::shift_right; + } + + // [alg.sorting], sorting and related operations + // [alg.sort], sorting + using std::sort; + + namespace ranges { + using std::ranges::sort; + } + + using std::stable_sort; + + namespace ranges { + using std::ranges::stable_sort; + } + + using std::partial_sort; + + namespace ranges { + using std::ranges::partial_sort; + } + using std::partial_sort_copy; + + namespace ranges { + using std::ranges::partial_sort_copy; + using std::ranges::partial_sort_copy_result; + } // namespace ranges + + using std::is_sorted; + using std::is_sorted_until; + + namespace ranges { + using std::ranges::is_sorted; + using std::ranges::is_sorted_until; + } // namespace ranges + + // [alg.nth.element], Nth element + using std::nth_element; + + namespace ranges { + using std::ranges::nth_element; + } + + // [alg.binary.search], binary search + using std::lower_bound; + + namespace ranges { + using std::ranges::lower_bound; + } + + using std::upper_bound; + + namespace ranges { + using std::ranges::upper_bound; + } + + using std::equal_range; + + namespace ranges { + using std::ranges::equal_range; + } + + using std::binary_search; + + namespace ranges { + using std::ranges::binary_search; + } + + // [alg.partitions], partitions + using std::is_partitioned; + + namespace ranges { + using std::ranges::is_partitioned; + } + + using std::partition; + + namespace ranges { + using std::ranges::partition; + } + + using std::stable_partition; + + namespace ranges { + using std::ranges::stable_partition; + } + + using std::partition_copy; + + namespace ranges { + using std::ranges::partition_copy; + using std::ranges::partition_copy_result; + } // namespace ranges + + using std::partition_point; + + namespace ranges { + using std::ranges::partition_point; + } + // [alg.merge], merge + using std::merge; + namespace ranges { + using std::ranges::merge; + using std::ranges::merge_result; + } // namespace ranges + + using std::inplace_merge; + + namespace ranges { + using std::ranges::inplace_merge; + } + + // [alg.set.operations], set operations + using std::includes; + namespace ranges { + using std::ranges::includes; + } + + using std::set_union; + + namespace ranges { + using std::ranges::set_union; + using std::ranges::set_union_result; + } // namespace ranges + + using std::set_intersection; + namespace ranges { + using std::ranges::set_intersection; + using std::ranges::set_intersection_result; + } // namespace ranges + + using std::set_difference; + + namespace ranges { + using std::ranges::set_difference; + using std::ranges::set_difference_result; + } // namespace ranges + + using std::set_symmetric_difference; + + namespace ranges { + using std::ranges::set_symmetric_difference_result; + + using std::ranges::set_symmetric_difference; + } // namespace ranges + + // [alg.heap.operations], heap operations + using std::push_heap; + + namespace ranges { + using std::ranges::push_heap; + } + + using std::pop_heap; + + namespace ranges { + using std::ranges::pop_heap; + } + + using std::make_heap; + + namespace ranges { + using std::ranges::make_heap; + } + + using std::sort_heap; + + namespace ranges { + using std::ranges::sort_heap; + } + + using std::is_heap; + + namespace ranges { + using std::ranges::is_heap; + } + + using std::is_heap_until; + + namespace ranges { + using std::ranges::is_heap_until; + } + + // [alg.min.max], minimum and maximum + using std::min; + + namespace ranges { + using std::ranges::min; + } + + using std::max; + + namespace ranges { + using std::ranges::max; + } + + using std::minmax; + + namespace ranges { + using std::ranges::minmax_result; + + using std::ranges::minmax; + } // namespace ranges + + using std::min_element; + + namespace ranges { + using std::ranges::min_element; + } + + using std::max_element; + + namespace ranges { + using std::ranges::max_element; + } + + using std::minmax_element; + + namespace ranges { + using std::ranges::minmax_element_result; + + using std::ranges::minmax_element; + } // namespace ranges + // [alg.clamp], bounded value + using std::clamp; + + namespace ranges { + using std::ranges::clamp; + } + + // [alg.lex.comparison], lexicographical comparison + using std::lexicographical_compare; + + namespace ranges { + using std::ranges::lexicographical_compare; + } + + // [alg.three.way], three-way comparison algorithms + using std::lexicographical_compare_three_way; + + // [alg.permutation.generators], permutations + using std::next_permutation; + + namespace ranges { + using std::ranges::next_permutation_result; + + using std::ranges::next_permutation; + } // namespace ranges + + using std::prev_permutation; + + namespace ranges { + using std::ranges::prev_permutation_result; + + using std::ranges::prev_permutation; + } // namespace ranges + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/any.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/any.inc new file mode 100644 index 0000000000000..c57257ede8490 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/any.inc @@ -0,0 +1,23 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [any.bad.any.cast], class bad_any_cast + using std::bad_any_cast; + + // [any.class], class any + using std::any; + + // [any.nonmembers], non-member functions + using std::any_cast; + using std::make_any; + using std::swap; + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/array.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/array.inc new file mode 100644 index 0000000000000..d55779c8bd128 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/array.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [array], class template array + using std::array; + + using std::operator==; + using std::operator<=>; + + // [array.special], specialized algorithms + using std::swap; + + // [array.creation], array creation functions + using std::to_array; + + // [array.tuple], tuple interface + using std::get; + using std::tuple_element; + using std::tuple_size; + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/atomic.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/atomic.inc new file mode 100644 index 0000000000000..9a30fb7affe71 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/atomic.inc @@ -0,0 +1,141 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [atomics.order], order and consistency + using std::memory_order _LIBCPP_USING_IF_EXISTS; + using std::memory_order_acq_rel _LIBCPP_USING_IF_EXISTS; + using std::memory_order_acquire _LIBCPP_USING_IF_EXISTS; + using std::memory_order_consume _LIBCPP_USING_IF_EXISTS; + using std::memory_order_relaxed _LIBCPP_USING_IF_EXISTS; + using std::memory_order_release _LIBCPP_USING_IF_EXISTS; + using std::memory_order_seq_cst _LIBCPP_USING_IF_EXISTS; + + using std::kill_dependency _LIBCPP_USING_IF_EXISTS; + + // [atomics.ref.generic], class template atomic_ref + // [atomics.ref.pointer], partial specialization for pointers + using std::atomic_ref _LIBCPP_USING_IF_EXISTS; + + // [atomics.types.generic], class template atomic + using std::atomic _LIBCPP_USING_IF_EXISTS; + + // [atomics.nonmembers], non-member functions + using std::atomic_compare_exchange_strong _LIBCPP_USING_IF_EXISTS; + using std::atomic_compare_exchange_strong_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_compare_exchange_weak _LIBCPP_USING_IF_EXISTS; + using std::atomic_compare_exchange_weak_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_exchange _LIBCPP_USING_IF_EXISTS; + using std::atomic_exchange_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_is_lock_free _LIBCPP_USING_IF_EXISTS; + using std::atomic_load _LIBCPP_USING_IF_EXISTS; + using std::atomic_load_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_store _LIBCPP_USING_IF_EXISTS; + using std::atomic_store_explicit _LIBCPP_USING_IF_EXISTS; + + using std::atomic_fetch_add _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_add_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_and _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_and_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_or _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_or_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_sub _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_sub_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_xor _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_xor_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_notify_all _LIBCPP_USING_IF_EXISTS; + using std::atomic_notify_one _LIBCPP_USING_IF_EXISTS; + using std::atomic_wait _LIBCPP_USING_IF_EXISTS; + using std::atomic_wait_explicit _LIBCPP_USING_IF_EXISTS; + + // [atomics.alias], type aliases + using std::atomic_bool _LIBCPP_USING_IF_EXISTS; + using std::atomic_char _LIBCPP_USING_IF_EXISTS; + using std::atomic_char16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_char32_t _LIBCPP_USING_IF_EXISTS; +#if _LIBCPP_HAS_CHAR8_T + using std::atomic_char8_t _LIBCPP_USING_IF_EXISTS; +#endif + using std::atomic_int _LIBCPP_USING_IF_EXISTS; + using std::atomic_llong _LIBCPP_USING_IF_EXISTS; + using std::atomic_long _LIBCPP_USING_IF_EXISTS; + using std::atomic_schar _LIBCPP_USING_IF_EXISTS; + using std::atomic_short _LIBCPP_USING_IF_EXISTS; + using std::atomic_uchar _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint _LIBCPP_USING_IF_EXISTS; + using std::atomic_ullong _LIBCPP_USING_IF_EXISTS; + using std::atomic_ulong _LIBCPP_USING_IF_EXISTS; + using std::atomic_ushort _LIBCPP_USING_IF_EXISTS; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::atomic_wchar_t _LIBCPP_USING_IF_EXISTS; +#endif + + using std::atomic_int16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int8_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint8_t _LIBCPP_USING_IF_EXISTS; + + using std::atomic_int_least16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_least32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_least64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_least8_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_least16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_least32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_least64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_least8_t _LIBCPP_USING_IF_EXISTS; + + using std::atomic_int_fast16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_fast32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_fast64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_fast8_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_fast16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_fast32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_fast64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_fast8_t _LIBCPP_USING_IF_EXISTS; + + using std::atomic_intmax_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_intptr_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_ptrdiff_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_size_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uintmax_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uintptr_t _LIBCPP_USING_IF_EXISTS; + +#ifndef _LIBCPP_NO_LOCK_FREE_TYPES + using std::atomic_signed_lock_free _LIBCPP_USING_IF_EXISTS; + using std::atomic_unsigned_lock_free _LIBCPP_USING_IF_EXISTS; +#endif + + // [atomics.flag], flag type and operations + using std::atomic_flag _LIBCPP_USING_IF_EXISTS; + + using std::atomic_flag_clear _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_clear_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_test _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_test_and_set _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_test_and_set_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_test_explicit _LIBCPP_USING_IF_EXISTS; + + using std::atomic_flag_notify_all _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_notify_one _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_wait _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_wait_explicit _LIBCPP_USING_IF_EXISTS; + + // [atomics.fences], fences + using std::atomic_signal_fence _LIBCPP_USING_IF_EXISTS; + using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS; + + // [depr.atomics.nonmembers] + using std::atomic_init _LIBCPP_USING_IF_EXISTS; + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/barrier.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/barrier.inc new file mode 100644 index 0000000000000..2d6a888b4d4fc --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/barrier.inc @@ -0,0 +1,14 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + using std::barrier; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/bit.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/bit.inc new file mode 100644 index 0000000000000..027a6c17ad6a6 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/bit.inc @@ -0,0 +1,38 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [bit.cast], bit_cast + using std::bit_cast; + +#if _LIBCPP_STD_VER >= 23 + // [bit.byteswap], byteswap + using std::byteswap; +#endif + + // [bit.pow.two], integral powers of 2 + using std::bit_ceil; + using std::bit_floor; + using std::bit_width; + using std::has_single_bit; + + // [bit.rotate], rotating + using std::rotl; + using std::rotr; + + // [bit.count], counting + using std::countl_one; + using std::countl_zero; + using std::countr_one; + using std::countr_zero; + using std::popcount; + + // [bit.endian], endian + using std::endian; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/bitset.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/bitset.inc new file mode 100644 index 0000000000000..bb528860eb561 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/bitset.inc @@ -0,0 +1,23 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::bitset; + + // [bitset.operators], bitset operators + using std::operator&; + using std::operator|; + using std::operator^; + using std::operator>>; + using std::operator<<; + + // [bitset.hash], hash support + using std::hash; + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cassert.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cassert.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cassert.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cctype.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cctype.inc new file mode 100644 index 0000000000000..43417aa159624 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cctype.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::isalnum _LIBCPP_USING_IF_EXISTS; + using std::isalpha _LIBCPP_USING_IF_EXISTS; + using std::isblank _LIBCPP_USING_IF_EXISTS; + using std::iscntrl _LIBCPP_USING_IF_EXISTS; + using std::isdigit _LIBCPP_USING_IF_EXISTS; + using std::isgraph _LIBCPP_USING_IF_EXISTS; + using std::islower _LIBCPP_USING_IF_EXISTS; + using std::isprint _LIBCPP_USING_IF_EXISTS; + using std::ispunct _LIBCPP_USING_IF_EXISTS; + using std::isspace _LIBCPP_USING_IF_EXISTS; + using std::isupper _LIBCPP_USING_IF_EXISTS; + using std::isxdigit _LIBCPP_USING_IF_EXISTS; + using std::tolower _LIBCPP_USING_IF_EXISTS; + using std::toupper _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cerrno.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cerrno.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cerrno.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cfenv.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cfenv.inc new file mode 100644 index 0000000000000..831c1fed8ebef --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cfenv.inc @@ -0,0 +1,30 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // types + using std::fenv_t _LIBCPP_USING_IF_EXISTS; + using std::fexcept_t _LIBCPP_USING_IF_EXISTS; + + // functions + using std::feclearexcept _LIBCPP_USING_IF_EXISTS; + using std::fegetexceptflag _LIBCPP_USING_IF_EXISTS; + using std::feraiseexcept _LIBCPP_USING_IF_EXISTS; + using std::fesetexceptflag _LIBCPP_USING_IF_EXISTS; + using std::fetestexcept _LIBCPP_USING_IF_EXISTS; + + using std::fegetround _LIBCPP_USING_IF_EXISTS; + using std::fesetround _LIBCPP_USING_IF_EXISTS; + + using std::fegetenv _LIBCPP_USING_IF_EXISTS; + using std::feholdexcept _LIBCPP_USING_IF_EXISTS; + using std::fesetenv _LIBCPP_USING_IF_EXISTS; + using std::feupdateenv _LIBCPP_USING_IF_EXISTS; + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cfloat.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cfloat.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cfloat.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/charconv.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/charconv.inc new file mode 100644 index 0000000000000..6fee460108d65 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/charconv.inc @@ -0,0 +1,34 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // floating-point format for primitive numerical conversion + using std::chars_format; + + // chars_format is a bitmask type. + // [bitmask.types] specified operators + using std::operator&; + using std::operator&=; + using std::operator^; + using std::operator^=; + using std::operator|; + using std::operator|=; + using std::operator~; + + // [charconv.to.chars], primitive numerical output conversion + using std::to_chars_result; + + using std::to_chars; + + // [charconv.from.chars], primitive numerical input conversion + using std::from_chars_result; + + using std::from_chars; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/chrono.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/chrono.inc new file mode 100644 index 0000000000000..66eccd8d290ad --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/chrono.inc @@ -0,0 +1,302 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + namespace chrono { + using std::chrono::duration; + using std::chrono::time_point; + + } // namespace chrono + + using std::common_type; + + namespace chrono { + + // [time.traits], customization traits + using std::chrono::treat_as_floating_point; + using std::chrono::treat_as_floating_point_v; + + using std::chrono::duration_values; + + // using std::chrono::is_clock; + // using std::chrono::is_clock_v; + + // [time.duration.nonmember], duration arithmetic + using std::chrono::operator+; + using std::chrono::operator-; + using std::chrono::operator*; + using std::chrono::operator/; + using std::chrono::operator%; + + // [time.duration.comparisons], duration comparisons + using std::chrono::operator==; + using std::chrono::operator<; + using std::chrono::operator>; + using std::chrono::operator<=; + using std::chrono::operator>=; + using std::chrono::operator<=>; + + // [time.duration.cast], conversions + using std::chrono::ceil; + using std::chrono::duration_cast; + using std::chrono::floor; + using std::chrono::round; + + // [time.duration.io], duration I/O +#if _LIBCPP_HAS_LOCALIZATION + using std::chrono::operator<<; +#endif + // using std::chrono::from_stream; + + // convenience typedefs + using std::chrono::days; + using std::chrono::hours; + using std::chrono::microseconds; + using std::chrono::milliseconds; + using std::chrono::minutes; + using std::chrono::months; + using std::chrono::nanoseconds; + using std::chrono::seconds; + using std::chrono::weeks; + using std::chrono::years; + + // [time.point.nonmember], time_point arithmetic + + // [time.point.comparisons], time_point comparisons + + // [time.point.cast], conversions + using std::chrono::time_point_cast; + + // [time.duration.alg], specialized algorithms + using std::chrono::abs; + + // [time.clock.system], class system_clock + using std::chrono::system_clock; + + using std::chrono::sys_days; + using std::chrono::sys_seconds; + using std::chrono::sys_time; + +#if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION +# ifdef _LIBCPP_ENABLE_EXPERIMENTAL + + // [time.clock.utc], class utc_clock + using std::chrono::utc_clock; + + using std::chrono::utc_seconds; + using std::chrono::utc_time; + + using std::chrono::leap_second_info; + + using std::chrono::get_leap_second_info; + + // [time.clock.tai], class tai_clock + using std::chrono::tai_clock; + + using std::chrono::tai_seconds; + using std::chrono::tai_time; + + // [time.clock.gps], class gps_clock + using std::chrono::gps_clock; + + using std::chrono::gps_seconds; + using std::chrono::gps_time; +# endif // _LIBCPP_ENABLE_EXPERIMENTAL +#endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION + + // [time.clock.file], type file_clock + using std::chrono::file_clock; + + using std::chrono::file_time; + +#if _LIBCPP_HAS_MONOTONIC_CLOCK + // [time.clock.steady], class steady_clock + using std::chrono::steady_clock; +#endif + + // [time.clock.hires], class high_resolution_clock + using std::chrono::high_resolution_clock; + + // [time.clock.local], local time + using std::chrono::local_days; + using std::chrono::local_seconds; + using std::chrono::local_t; + using std::chrono::local_time; + + // [time.clock.cast], time_point conversions + // using std::chrono::clock_time_conversion; + + // using std::chrono::clock_cast; + + // [time.cal.last], class last_spec + using std::chrono::last_spec; + + // [time.cal.day], class day + using std::chrono::day; + + // [time.cal.month], class month + using std::chrono::month; + + // [time.cal.year], class year + using std::chrono::year; + + // [time.cal.wd], class weekday + using std::chrono::weekday; + + // [time.cal.wdidx], class weekday_indexed + using std::chrono::weekday_indexed; + + // [time.cal.wdlast], class weekday_last + using std::chrono::weekday_last; + + // [time.cal.md], class month_day + using std::chrono::month_day; + + // [time.cal.mdlast], class month_day_last + using std::chrono::month_day_last; + + // [time.cal.mwd], class month_weekday + using std::chrono::month_weekday; + + // [time.cal.mwdlast], class month_weekday_last + using std::chrono::month_weekday_last; + + // [time.cal.ym], class year_month + using std::chrono::year_month; + + // [time.cal.ymd], class year_month_day + using std::chrono::year_month_day; + + // [time.cal.ymdlast], class year_month_day_last + using std::chrono::year_month_day_last; + + // [time.cal.ymwd], class year_month_weekday + using std::chrono::year_month_weekday; + + // [time.cal.ymwdlast], class year_month_weekday_last + using std::chrono::year_month_weekday_last; + + // [time.cal.operators], civil calendar conventional syntax operators + + // [time.hms], class template hh_mm_ss + using std::chrono::hh_mm_ss; + + // [time.12], 12/24 hour functions + using std::chrono::is_am; + using std::chrono::is_pm; + using std::chrono::make12; + using std::chrono::make24; + +#ifdef _LIBCPP_ENABLE_EXPERIMENTAL + +# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION + + // [time.zone.db], time zone database + using std::chrono::tzdb; + using std::chrono::tzdb_list; + + // [time.zone.db.access], time zone database access + using std::chrono::current_zone; + using std::chrono::get_tzdb; + using std::chrono::get_tzdb_list; + using std::chrono::locate_zone; + + // [time.zone.db.remote], remote time zone database support + using std::chrono::reload_tzdb; + using std::chrono::remote_version; + +# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION + + // [time.zone.exception], exception classes + using std::chrono::ambiguous_local_time; + using std::chrono::nonexistent_local_time; + + // [time.zone.info], information classes + using std::chrono::local_info; + using std::chrono::sys_info; + +# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION + + // [time.zone.timezone], class time_zone + using std::chrono::choose; + using std::chrono::time_zone; + + // [time.zone.zonedtraits], class template zoned_traits + using std::chrono::zoned_traits; + + // [time.zone.zonedtime], class template zoned_time + using std::chrono::zoned_time; + + using std::chrono::zoned_seconds; + + // [time.zone.leap], leap second support + using std::chrono::leap_second; + + // [time.zone.link], class time_zone_link + using std::chrono::time_zone_link; + +# if 0 + // [time.format], formatting + using std::chrono::local_time_format; +# endif +# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION +#endif // _LIBCPP_ENABLE_EXPERIMENTAL + + } // namespace chrono + +#if _LIBCPP_HAS_LOCALIZATION + using std::formatter; +#endif + + namespace chrono { + // using std::chrono::parse; + + // calendrical constants + using std::chrono::last; + + using std::chrono::Friday; + using std::chrono::Monday; + using std::chrono::Saturday; + using std::chrono::Sunday; + using std::chrono::Thursday; + using std::chrono::Tuesday; + using std::chrono::Wednesday; + + using std::chrono::April; + using std::chrono::August; + using std::chrono::December; + using std::chrono::February; + using std::chrono::January; + using std::chrono::July; + using std::chrono::June; + using std::chrono::March; + using std::chrono::May; + using std::chrono::November; + using std::chrono::October; + using std::chrono::September; + + } // namespace chrono + +} // namespace std +export namespace std::inline literals::inline chrono_literals { + // [time.duration.literals], suffixes for duration literals + using std::literals::chrono_literals::operator""h; + using std::literals::chrono_literals::operator""min; + using std::literals::chrono_literals::operator""s; + using std::literals::chrono_literals::operator""ms; + using std::literals::chrono_literals::operator""us; + using std::literals::chrono_literals::operator""ns; + + // [using std::literals::chrono_literals::.cal.day.nonmembers], non-member functions + using std::literals::chrono_literals::operator""d; + + // [using std::literals::chrono_literals::.cal.year.nonmembers], non-member functions + using std::literals::chrono_literals::operator""y; +} // namespace std::inline literals::inline chrono_literals diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cinttypes.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cinttypes.inc new file mode 100644 index 0000000000000..b2b98c973e982 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cinttypes.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::imaxdiv_t _LIBCPP_USING_IF_EXISTS; + + using std::imaxabs _LIBCPP_USING_IF_EXISTS; + using std::imaxdiv _LIBCPP_USING_IF_EXISTS; + using std::strtoimax _LIBCPP_USING_IF_EXISTS; + using std::strtoumax _LIBCPP_USING_IF_EXISTS; + using std::wcstoimax _LIBCPP_USING_IF_EXISTS; + using std::wcstoumax _LIBCPP_USING_IF_EXISTS; + + // abs is conditionally here, but always present in cmath.cppm. To avoid + // conflicing declarations omit the using here. + + // div is conditionally here, but always present in cstdlib.cppm. To avoid + // conflicing declarations omit the using here. +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/climits.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/climits.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/climits.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/clocale.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/clocale.inc new file mode 100644 index 0000000000000..c336a97a9f122 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/clocale.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::lconv _LIBCPP_USING_IF_EXISTS; + + using std::localeconv _LIBCPP_USING_IF_EXISTS; + using std::setlocale _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cmath.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cmath.inc new file mode 100644 index 0000000000000..fe8ac773c9d1c --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cmath.inc @@ -0,0 +1,376 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + using std::double_t _LIBCPP_USING_IF_EXISTS; + using std::float_t _LIBCPP_USING_IF_EXISTS; + + using std::acos _LIBCPP_USING_IF_EXISTS; + using std::acosf _LIBCPP_USING_IF_EXISTS; + using std::acosl _LIBCPP_USING_IF_EXISTS; + + using std::asin _LIBCPP_USING_IF_EXISTS; + using std::asinf _LIBCPP_USING_IF_EXISTS; + using std::asinl _LIBCPP_USING_IF_EXISTS; + + using std::atan _LIBCPP_USING_IF_EXISTS; + using std::atanf _LIBCPP_USING_IF_EXISTS; + using std::atanl _LIBCPP_USING_IF_EXISTS; + + using std::atan2 _LIBCPP_USING_IF_EXISTS; + using std::atan2f _LIBCPP_USING_IF_EXISTS; + using std::atan2l _LIBCPP_USING_IF_EXISTS; + + using std::cos _LIBCPP_USING_IF_EXISTS; + using std::cosf _LIBCPP_USING_IF_EXISTS; + using std::cosl _LIBCPP_USING_IF_EXISTS; + + using std::sin _LIBCPP_USING_IF_EXISTS; + using std::sinf _LIBCPP_USING_IF_EXISTS; + using std::sinl _LIBCPP_USING_IF_EXISTS; + + using std::tan _LIBCPP_USING_IF_EXISTS; + using std::tanf _LIBCPP_USING_IF_EXISTS; + using std::tanl _LIBCPP_USING_IF_EXISTS; + + using std::acosh _LIBCPP_USING_IF_EXISTS; + using std::acoshf _LIBCPP_USING_IF_EXISTS; + using std::acoshl _LIBCPP_USING_IF_EXISTS; + + using std::asinh _LIBCPP_USING_IF_EXISTS; + using std::asinhf _LIBCPP_USING_IF_EXISTS; + using std::asinhl _LIBCPP_USING_IF_EXISTS; + + using std::atanh _LIBCPP_USING_IF_EXISTS; + using std::atanhf _LIBCPP_USING_IF_EXISTS; + using std::atanhl _LIBCPP_USING_IF_EXISTS; + + using std::cosh _LIBCPP_USING_IF_EXISTS; + using std::coshf _LIBCPP_USING_IF_EXISTS; + using std::coshl _LIBCPP_USING_IF_EXISTS; + + using std::sinh _LIBCPP_USING_IF_EXISTS; + using std::sinhf _LIBCPP_USING_IF_EXISTS; + using std::sinhl _LIBCPP_USING_IF_EXISTS; + + using std::tanh _LIBCPP_USING_IF_EXISTS; + using std::tanhf _LIBCPP_USING_IF_EXISTS; + using std::tanhl _LIBCPP_USING_IF_EXISTS; + + using std::exp _LIBCPP_USING_IF_EXISTS; + using std::expf _LIBCPP_USING_IF_EXISTS; + using std::expl _LIBCPP_USING_IF_EXISTS; + + using std::exp2 _LIBCPP_USING_IF_EXISTS; + using std::exp2f _LIBCPP_USING_IF_EXISTS; + using std::exp2l _LIBCPP_USING_IF_EXISTS; + + using std::expm1 _LIBCPP_USING_IF_EXISTS; + using std::expm1f _LIBCPP_USING_IF_EXISTS; + using std::expm1l _LIBCPP_USING_IF_EXISTS; + + using std::frexp _LIBCPP_USING_IF_EXISTS; + using std::frexpf _LIBCPP_USING_IF_EXISTS; + using std::frexpl _LIBCPP_USING_IF_EXISTS; + + using std::ilogb _LIBCPP_USING_IF_EXISTS; + using std::ilogbf _LIBCPP_USING_IF_EXISTS; + using std::ilogbl _LIBCPP_USING_IF_EXISTS; + + using std::ldexp _LIBCPP_USING_IF_EXISTS; + using std::ldexpf _LIBCPP_USING_IF_EXISTS; + using std::ldexpl _LIBCPP_USING_IF_EXISTS; + + using std::log _LIBCPP_USING_IF_EXISTS; + using std::logf _LIBCPP_USING_IF_EXISTS; + using std::logl _LIBCPP_USING_IF_EXISTS; + + using std::log10 _LIBCPP_USING_IF_EXISTS; + using std::log10f _LIBCPP_USING_IF_EXISTS; + using std::log10l _LIBCPP_USING_IF_EXISTS; + + using std::log1p _LIBCPP_USING_IF_EXISTS; + using std::log1pf _LIBCPP_USING_IF_EXISTS; + using std::log1pl _LIBCPP_USING_IF_EXISTS; + + using std::log2 _LIBCPP_USING_IF_EXISTS; + using std::log2f _LIBCPP_USING_IF_EXISTS; + using std::log2l _LIBCPP_USING_IF_EXISTS; + + using std::logb _LIBCPP_USING_IF_EXISTS; + using std::logbf _LIBCPP_USING_IF_EXISTS; + using std::logbl _LIBCPP_USING_IF_EXISTS; + + using std::modf _LIBCPP_USING_IF_EXISTS; + using std::modff _LIBCPP_USING_IF_EXISTS; + using std::modfl _LIBCPP_USING_IF_EXISTS; + + using std::scalbn _LIBCPP_USING_IF_EXISTS; + using std::scalbnf _LIBCPP_USING_IF_EXISTS; + using std::scalbnl _LIBCPP_USING_IF_EXISTS; + + using std::scalbln _LIBCPP_USING_IF_EXISTS; + using std::scalblnf _LIBCPP_USING_IF_EXISTS; + using std::scalblnl _LIBCPP_USING_IF_EXISTS; + + using std::cbrt _LIBCPP_USING_IF_EXISTS; + using std::cbrtf _LIBCPP_USING_IF_EXISTS; + using std::cbrtl _LIBCPP_USING_IF_EXISTS; + + // [c.math.abs], absolute values + using std::abs _LIBCPP_USING_IF_EXISTS; + + using std::fabs _LIBCPP_USING_IF_EXISTS; + using std::fabsf _LIBCPP_USING_IF_EXISTS; + using std::fabsl _LIBCPP_USING_IF_EXISTS; + + using std::hypot _LIBCPP_USING_IF_EXISTS; + using std::hypotf _LIBCPP_USING_IF_EXISTS; + using std::hypotl _LIBCPP_USING_IF_EXISTS; + + // [c.math.hypot3], three-dimensional hypotenuse + + using std::pow _LIBCPP_USING_IF_EXISTS; + using std::powf _LIBCPP_USING_IF_EXISTS; + using std::powl _LIBCPP_USING_IF_EXISTS; + + using std::sqrt _LIBCPP_USING_IF_EXISTS; + using std::sqrtf _LIBCPP_USING_IF_EXISTS; + using std::sqrtl _LIBCPP_USING_IF_EXISTS; + + using std::erf _LIBCPP_USING_IF_EXISTS; + using std::erff _LIBCPP_USING_IF_EXISTS; + using std::erfl _LIBCPP_USING_IF_EXISTS; + + using std::erfc _LIBCPP_USING_IF_EXISTS; + using std::erfcf _LIBCPP_USING_IF_EXISTS; + using std::erfcl _LIBCPP_USING_IF_EXISTS; + + using std::lgamma _LIBCPP_USING_IF_EXISTS; + using std::lgammaf _LIBCPP_USING_IF_EXISTS; + using std::lgammal _LIBCPP_USING_IF_EXISTS; + + using std::tgamma _LIBCPP_USING_IF_EXISTS; + using std::tgammaf _LIBCPP_USING_IF_EXISTS; + using std::tgammal _LIBCPP_USING_IF_EXISTS; + + using std::ceil _LIBCPP_USING_IF_EXISTS; + using std::ceilf _LIBCPP_USING_IF_EXISTS; + using std::ceill _LIBCPP_USING_IF_EXISTS; + + using std::floor _LIBCPP_USING_IF_EXISTS; + using std::floorf _LIBCPP_USING_IF_EXISTS; + using std::floorl _LIBCPP_USING_IF_EXISTS; + + using std::nearbyint _LIBCPP_USING_IF_EXISTS; + using std::nearbyintf _LIBCPP_USING_IF_EXISTS; + using std::nearbyintl _LIBCPP_USING_IF_EXISTS; + + using std::rint _LIBCPP_USING_IF_EXISTS; + using std::rintf _LIBCPP_USING_IF_EXISTS; + using std::rintl _LIBCPP_USING_IF_EXISTS; + + using std::lrint _LIBCPP_USING_IF_EXISTS; + using std::lrintf _LIBCPP_USING_IF_EXISTS; + using std::lrintl _LIBCPP_USING_IF_EXISTS; + + using std::llrint _LIBCPP_USING_IF_EXISTS; + using std::llrintf _LIBCPP_USING_IF_EXISTS; + using std::llrintl _LIBCPP_USING_IF_EXISTS; + + using std::round _LIBCPP_USING_IF_EXISTS; + using std::roundf _LIBCPP_USING_IF_EXISTS; + using std::roundl _LIBCPP_USING_IF_EXISTS; + + using std::lround _LIBCPP_USING_IF_EXISTS; + using std::lroundf _LIBCPP_USING_IF_EXISTS; + using std::lroundl _LIBCPP_USING_IF_EXISTS; + + using std::llround _LIBCPP_USING_IF_EXISTS; + using std::llroundf _LIBCPP_USING_IF_EXISTS; + using std::llroundl _LIBCPP_USING_IF_EXISTS; + + using std::trunc _LIBCPP_USING_IF_EXISTS; + using std::truncf _LIBCPP_USING_IF_EXISTS; + using std::truncl _LIBCPP_USING_IF_EXISTS; + + using std::fmod _LIBCPP_USING_IF_EXISTS; + using std::fmodf _LIBCPP_USING_IF_EXISTS; + using std::fmodl _LIBCPP_USING_IF_EXISTS; + + using std::remainder _LIBCPP_USING_IF_EXISTS; + using std::remainderf _LIBCPP_USING_IF_EXISTS; + using std::remainderl _LIBCPP_USING_IF_EXISTS; + + using std::remquo _LIBCPP_USING_IF_EXISTS; + using std::remquof _LIBCPP_USING_IF_EXISTS; + using std::remquol _LIBCPP_USING_IF_EXISTS; + + using std::copysign _LIBCPP_USING_IF_EXISTS; + using std::copysignf _LIBCPP_USING_IF_EXISTS; + using std::copysignl _LIBCPP_USING_IF_EXISTS; + + using std::nan _LIBCPP_USING_IF_EXISTS; + using std::nanf _LIBCPP_USING_IF_EXISTS; + using std::nanl _LIBCPP_USING_IF_EXISTS; + + using std::nextafter _LIBCPP_USING_IF_EXISTS; + using std::nextafterf _LIBCPP_USING_IF_EXISTS; + using std::nextafterl _LIBCPP_USING_IF_EXISTS; + + using std::nexttoward _LIBCPP_USING_IF_EXISTS; + using std::nexttowardf _LIBCPP_USING_IF_EXISTS; + using std::nexttowardl _LIBCPP_USING_IF_EXISTS; + + using std::fdim _LIBCPP_USING_IF_EXISTS; + using std::fdimf _LIBCPP_USING_IF_EXISTS; + using std::fdiml _LIBCPP_USING_IF_EXISTS; + + using std::fmax _LIBCPP_USING_IF_EXISTS; + using std::fmaxf _LIBCPP_USING_IF_EXISTS; + using std::fmaxl _LIBCPP_USING_IF_EXISTS; + + using std::fmin _LIBCPP_USING_IF_EXISTS; + using std::fminf _LIBCPP_USING_IF_EXISTS; + using std::fminl _LIBCPP_USING_IF_EXISTS; + + using std::fma _LIBCPP_USING_IF_EXISTS; + using std::fmaf _LIBCPP_USING_IF_EXISTS; + using std::fmal _LIBCPP_USING_IF_EXISTS; + + // [c.math.lerp], linear interpolation + using std::lerp _LIBCPP_USING_IF_EXISTS; + + // [c.math.fpclass], classification / comparison functions + using std::fpclassify _LIBCPP_USING_IF_EXISTS; + using std::isfinite _LIBCPP_USING_IF_EXISTS; + using std::isgreater _LIBCPP_USING_IF_EXISTS; + using std::isgreaterequal _LIBCPP_USING_IF_EXISTS; + using std::isinf _LIBCPP_USING_IF_EXISTS; + using std::isless _LIBCPP_USING_IF_EXISTS; + using std::islessequal _LIBCPP_USING_IF_EXISTS; + using std::islessgreater _LIBCPP_USING_IF_EXISTS; + using std::isnan _LIBCPP_USING_IF_EXISTS; + using std::isnormal _LIBCPP_USING_IF_EXISTS; + using std::isunordered _LIBCPP_USING_IF_EXISTS; + using std::signbit _LIBCPP_USING_IF_EXISTS; + + // [sf.cmath], mathematical special functions +#if 0 + // [sf.cmath.assoc.laguerre], associated Laguerre polynomials + using std::assoc_laguerre; + using std::assoc_laguerref; + using std::assoc_laguerrel; + + // [sf.cmath.assoc.legendre], associated Legendre functions + using std::assoc_legendre; + using std::assoc_legendref; + using std::assoc_legendrel; + + // [sf.cmath.beta], beta function + using std::beta; + using std::betaf; + using std::betal; + + // [sf.cmath.comp.ellint.1], complete elliptic integral of the first kind + using std::comp_ellint_1; + using std::comp_ellint_1f; + using std::comp_ellint_1l; + + // [sf.cmath.comp.ellint.2], complete elliptic integral of the second kind + using std::comp_ellint_2; + using std::comp_ellint_2f; + using std::comp_ellint_2l; + + // [sf.cmath.comp.ellint.3], complete elliptic integral of the third kind + using std::comp_ellint_3; + using std::comp_ellint_3f; + using std::comp_ellint_3l; + + // [sf.cmath.cyl.bessel.i], regular modified cylindrical Bessel functions + using std::cyl_bessel_i; + using std::cyl_bessel_if; + using std::cyl_bessel_il; + + // [sf.cmath.cyl.bessel.j], cylindrical Bessel functions of the first kind + using std::cyl_bessel_j; + using std::cyl_bessel_jf; + using std::cyl_bessel_jl; + + // [sf.cmath.cyl.bessel.k], irregular modified cylindrical Bessel functions + using std::cyl_bessel_k; + using std::cyl_bessel_kf; + using std::cyl_bessel_kl; + + // [sf.cmath.cyl.neumann], cylindrical Neumann functions + // cylindrical Bessel functions of the second kind + using std::cyl_neumann; + using std::cyl_neumannf; + using std::cyl_neumannl; + + // [sf.cmath.ellint.1], incomplete elliptic integral of the first kind + using std::ellint_1; + using std::ellint_1f; + using std::ellint_1l; + + // [sf.cmath.ellint.2], incomplete elliptic integral of the second kind + using std::ellint_2; + using std::ellint_2f; + using std::ellint_2l; + + // [sf.cmath.ellint.3], incomplete elliptic integral of the third kind + using std::ellint_3; + using std::ellint_3f; + using std::ellint_3l; + + // [sf.cmath.expint], exponential integral + using std::expint; + using std::expintf; + using std::expintl; +#endif + + // [sf.cmath.hermite], Hermite polynomials + using std::hermite; + using std::hermitef; + using std::hermitel; + +#if 0 + // [sf.cmath.laguerre], Laguerre polynomials + using std::laguerre; + using std::laguerref; + using std::laguerrel; + + // [sf.cmath.legendre], Legendre polynomials + using std::legendre; + using std::legendref; + using std::legendrel; + + // [sf.cmath.riemann.zeta], Riemann zeta function + using std::riemann_zeta; + using std::riemann_zetaf; + using std::riemann_zetal; + + // [sf.cmath.sph.bessel], spherical Bessel functions of the first kind + using std::sph_bessel; + using std::sph_besself; + using std::sph_bessell; + + // [sf.cmath.sph.legendre], spherical associated Legendre functions + using std::sph_legendre; + using std::sph_legendref; + using std::sph_legendrel; + + // [sf.cmath.sph.neumann], spherical Neumann functions; + // spherical Bessel functions of the second kind + using std::sph_neumann; + using std::sph_neumannf; + using std::sph_neumannl; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/codecvt.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/codecvt.inc new file mode 100644 index 0000000000000..07accd513442d --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/codecvt.inc @@ -0,0 +1,20 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION +# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT) + using std::codecvt_mode; + + using std::codecvt_utf16; + using std::codecvt_utf8; + using std::codecvt_utf8_utf16; +# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT) +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/compare.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/compare.inc new file mode 100644 index 0000000000000..9d002d301efc3 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/compare.inc @@ -0,0 +1,51 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [cmp.categories], comparison category types + using std::partial_ordering; + using std::strong_ordering; + using std::weak_ordering; + + // named comparison functions + using std::is_eq; + using std::is_gt; + using std::is_gteq; + using std::is_lt; + using std::is_lteq; + using std::is_neq; + + // [cmp.common], common comparison category type + using std::common_comparison_category; + using std::common_comparison_category_t; + + // [cmp.concept], concept three_way_comparable + using std::three_way_comparable; + using std::three_way_comparable_with; + + // [cmp.result], result of three-way comparison + using std::compare_three_way_result; + + using std::compare_three_way_result_t; + + // [comparisons.three.way], class compare_three_way + using std::compare_three_way; + + // [cmp.alg], comparison algorithms + inline namespace __cpo { + using std::__cpo::compare_partial_order_fallback; + using std::__cpo::compare_strong_order_fallback; + using std::__cpo::compare_weak_order_fallback; + using std::__cpo::partial_order; + using std::__cpo::strong_order; + using std::__cpo::weak_order; + } // namespace __cpo + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/complex.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/complex.inc new file mode 100644 index 0000000000000..1ad5f78d51fc5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/complex.inc @@ -0,0 +1,78 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [complex], class template complex + using std::complex; + + // [complex.ops], operators + using std::operator+; + using std::operator-; + using std::operator*; + using std::operator/; + + using std::operator==; +#if _LIBCPP_HAS_LOCALIZATION + using std::operator>>; + using std::operator<<; +#endif // _LIBCPP_HAS_LOCALIZATION + + // [complex.value.ops], values + using std::imag; + using std::real; + + using std::abs; + using std::arg; + using std::norm; + + using std::conj; + using std::polar; + using std::proj; + + // [complex.transcendentals], transcendentals + using std::acos; + using std::asin; + using std::atan; + + using std::acosh; + using std::asinh; + using std::atanh; + + using std::cos; + using std::cosh; + using std::exp; + using std::log; + using std::log10; + + using std::pow; + + using std::sin; + using std::sinh; + using std::sqrt; + using std::tan; + using std::tanh; + +#if _LIBCPP_STD_VER >= 26 + // [complex.tuple], tuple interface + using std::get; + using std::tuple_element; + using std::tuple_size; +#endif + + // [complex.literals], complex literals + inline namespace literals { + inline namespace complex_literals { + using std::operator""il; + using std::operator""i; + using std::operator""if; + } // namespace complex_literals + } // namespace literals + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/concepts.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/concepts.inc new file mode 100644 index 0000000000000..29f4e2788e9ab --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/concepts.inc @@ -0,0 +1,96 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [concepts.lang], language-related concepts + // [concept.same], concept same_as + using std::same_as; + + // [concept.derived], concept derived_from + using std::derived_from; + + // [concept.convertible], concept convertible_to + using std::convertible_to; + + // [concept.commonref], concept common_reference_with + using std::common_reference_with; + + // [concept.common], concept common_with + using std::common_with; + + // [concepts.arithmetic], arithmetic concepts + using std::floating_point; + using std::integral; + using std::signed_integral; + using std::unsigned_integral; + + // [concept.assignable], concept assignable_from + using std::assignable_from; + + // [concept.swappable], concept swappable + namespace ranges { + inline namespace __cpo { + using std::ranges::__cpo::swap; + } + } // namespace ranges + + using std::swappable; + using std::swappable_with; + + // [concept.destructible], concept destructible + using std::destructible; + + // [concept.constructible], concept constructible_from + using std::constructible_from; + + // [concept.default.init], concept default_initializable + using std::default_initializable; + + // [concept.moveconstructible], concept move_constructible + using std::move_constructible; + + // [concept.copyconstructible], concept copy_constructible + using std::copy_constructible; + + // [concepts.compare], comparison concepts + // [concept.equalitycomparable], concept equality_comparable + using std::equality_comparable; + using std::equality_comparable_with; + + // [concept.totallyordered], concept totally_ordered + using std::totally_ordered; + using std::totally_ordered_with; + + // [concepts.object], object concepts + using std::copyable; + using std::movable; + using std::regular; + using std::semiregular; + + // [concepts.callable], callable concepts + // [concept.invocable], concept invocable + using std::invocable; + + // [concept.regularinvocable], concept regular_invocable + using std::regular_invocable; + + // [concept.predicate], concept predicate + using std::predicate; + + // [concept.relation], concept relation + using std::relation; + + // [concept.equiv], concept equivalence_relation + using std::equivalence_relation; + + // [concept.strictweakorder], concept strict_weak_order + using std::strict_weak_order; + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/condition_variable.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/condition_variable.inc new file mode 100644 index 0000000000000..c3197d6891bd3 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/condition_variable.inc @@ -0,0 +1,22 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.condition.condvar], class condition_variable + using std::condition_variable; + // [thread.condition.condvarany], class condition_variable_any + using std::condition_variable_any; + + // [thread.condition.nonmember], non-member functions + using std::notify_all_at_thread_exit; + + using std::cv_status; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/coroutine.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/coroutine.inc new file mode 100644 index 0000000000000..5d992f29a1e2e --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/coroutine.inc @@ -0,0 +1,33 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [coroutine.traits], coroutine traits + using std::coroutine_traits; + + // [coroutine.handle], coroutine handle + using std::coroutine_handle; + + // [coroutine.handle.compare], comparison operators + using std::operator==; + using std::operator<=>; + + // [coroutine.handle.hash], hash support + using std::hash; + + // [coroutine.noop], no-op coroutines + using std::noop_coroutine; + using std::noop_coroutine_handle; + using std::noop_coroutine_promise; + + // [coroutine.trivial.awaitables], trivial awaitables + using std::suspend_always; + using std::suspend_never; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/csetjmp.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/csetjmp.inc new file mode 100644 index 0000000000000..8aa2e23292915 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/csetjmp.inc @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::jmp_buf _LIBCPP_USING_IF_EXISTS; + using std::longjmp _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/csignal.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/csignal.inc new file mode 100644 index 0000000000000..05f3986866c7b --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/csignal.inc @@ -0,0 +1,18 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::sig_atomic_t _LIBCPP_USING_IF_EXISTS; + + // [support.signal], signal handlers + using std::signal _LIBCPP_USING_IF_EXISTS; + + using std::raise _LIBCPP_USING_IF_EXISTS; + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdarg.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdarg.inc new file mode 100644 index 0000000000000..5947bc2452b71 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdarg.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::va_list _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstddef.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstddef.inc new file mode 100644 index 0000000000000..6443de8923823 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstddef.inc @@ -0,0 +1,31 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::max_align_t _LIBCPP_USING_IF_EXISTS; + using std::nullptr_t; + using std::ptrdiff_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + + using std::byte; + + // [support.types.byteops], byte type operations + using std::operator<<=; + using std::operator<<; + using std::operator>>=; + using std::operator>>; + using std::operator|=; + using std::operator|; + using std::operator&=; + using std::operator&; + using std::operator^=; + using std::operator^; + using std::operator~; + using std::to_integer; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdint.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdint.inc new file mode 100644 index 0000000000000..f23b52a94526e --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdint.inc @@ -0,0 +1,50 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // signed + using std::int8_t _LIBCPP_USING_IF_EXISTS; + using std::int16_t _LIBCPP_USING_IF_EXISTS; + using std::int32_t _LIBCPP_USING_IF_EXISTS; + using std::int64_t _LIBCPP_USING_IF_EXISTS; + + using std::int_fast16_t _LIBCPP_USING_IF_EXISTS; + using std::int_fast32_t _LIBCPP_USING_IF_EXISTS; + using std::int_fast64_t _LIBCPP_USING_IF_EXISTS; + using std::int_fast8_t _LIBCPP_USING_IF_EXISTS; + + using std::int_least16_t _LIBCPP_USING_IF_EXISTS; + using std::int_least32_t _LIBCPP_USING_IF_EXISTS; + using std::int_least64_t _LIBCPP_USING_IF_EXISTS; + using std::int_least8_t _LIBCPP_USING_IF_EXISTS; + + using std::intmax_t _LIBCPP_USING_IF_EXISTS; + + using std::intptr_t _LIBCPP_USING_IF_EXISTS; + + // unsigned + using std::uint8_t _LIBCPP_USING_IF_EXISTS; + using std::uint16_t _LIBCPP_USING_IF_EXISTS; + using std::uint32_t _LIBCPP_USING_IF_EXISTS; + using std::uint64_t _LIBCPP_USING_IF_EXISTS; + + using std::uint_fast16_t _LIBCPP_USING_IF_EXISTS; + using std::uint_fast32_t _LIBCPP_USING_IF_EXISTS; + using std::uint_fast64_t _LIBCPP_USING_IF_EXISTS; + using std::uint_fast8_t _LIBCPP_USING_IF_EXISTS; + + using std::uint_least16_t _LIBCPP_USING_IF_EXISTS; + using std::uint_least32_t _LIBCPP_USING_IF_EXISTS; + using std::uint_least64_t _LIBCPP_USING_IF_EXISTS; + using std::uint_least8_t _LIBCPP_USING_IF_EXISTS; + + using std::uintmax_t _LIBCPP_USING_IF_EXISTS; + + using std::uintptr_t _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdio.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdio.inc new file mode 100644 index 0000000000000..62fa2f566a5f6 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdio.inc @@ -0,0 +1,60 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::FILE _LIBCPP_USING_IF_EXISTS; + using std::fpos_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + + using std::clearerr _LIBCPP_USING_IF_EXISTS; + using std::fclose _LIBCPP_USING_IF_EXISTS; + using std::feof _LIBCPP_USING_IF_EXISTS; + using std::ferror _LIBCPP_USING_IF_EXISTS; + using std::fflush _LIBCPP_USING_IF_EXISTS; + using std::fgetc _LIBCPP_USING_IF_EXISTS; + using std::fgetpos _LIBCPP_USING_IF_EXISTS; + using std::fgets _LIBCPP_USING_IF_EXISTS; + using std::fopen _LIBCPP_USING_IF_EXISTS; + using std::fprintf _LIBCPP_USING_IF_EXISTS; + using std::fputc _LIBCPP_USING_IF_EXISTS; + using std::fputs _LIBCPP_USING_IF_EXISTS; + using std::fread _LIBCPP_USING_IF_EXISTS; + using std::freopen _LIBCPP_USING_IF_EXISTS; + using std::fscanf _LIBCPP_USING_IF_EXISTS; + using std::fseek _LIBCPP_USING_IF_EXISTS; + using std::fsetpos _LIBCPP_USING_IF_EXISTS; + using std::ftell _LIBCPP_USING_IF_EXISTS; + using std::fwrite _LIBCPP_USING_IF_EXISTS; + using std::getc _LIBCPP_USING_IF_EXISTS; + using std::getchar _LIBCPP_USING_IF_EXISTS; + using std::perror _LIBCPP_USING_IF_EXISTS; + using std::printf _LIBCPP_USING_IF_EXISTS; + using std::putc _LIBCPP_USING_IF_EXISTS; + using std::putchar _LIBCPP_USING_IF_EXISTS; + using std::puts _LIBCPP_USING_IF_EXISTS; + using std::remove _LIBCPP_USING_IF_EXISTS; + using std::rename _LIBCPP_USING_IF_EXISTS; + using std::rewind _LIBCPP_USING_IF_EXISTS; + using std::scanf _LIBCPP_USING_IF_EXISTS; + using std::setbuf _LIBCPP_USING_IF_EXISTS; + using std::setvbuf _LIBCPP_USING_IF_EXISTS; + using std::snprintf _LIBCPP_USING_IF_EXISTS; + using std::sprintf _LIBCPP_USING_IF_EXISTS; + using std::sscanf _LIBCPP_USING_IF_EXISTS; + using std::tmpfile _LIBCPP_USING_IF_EXISTS; + using std::tmpnam _LIBCPP_USING_IF_EXISTS; + using std::ungetc _LIBCPP_USING_IF_EXISTS; + using std::vfprintf _LIBCPP_USING_IF_EXISTS; + using std::vfscanf _LIBCPP_USING_IF_EXISTS; + using std::vprintf _LIBCPP_USING_IF_EXISTS; + using std::vscanf _LIBCPP_USING_IF_EXISTS; + using std::vsnprintf _LIBCPP_USING_IF_EXISTS; + using std::vsprintf _LIBCPP_USING_IF_EXISTS; + using std::vsscanf _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdlib.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdlib.inc new file mode 100644 index 0000000000000..bfa88760ac0cb --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstdlib.inc @@ -0,0 +1,71 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::div_t _LIBCPP_USING_IF_EXISTS; + using std::ldiv_t _LIBCPP_USING_IF_EXISTS; + using std::lldiv_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + + // [support.start.term], start and termination + using std::_Exit _LIBCPP_USING_IF_EXISTS; + using std::abort _LIBCPP_USING_IF_EXISTS; + using std::at_quick_exit _LIBCPP_USING_IF_EXISTS; + using std::atexit _LIBCPP_USING_IF_EXISTS; + using std::exit _LIBCPP_USING_IF_EXISTS; + using std::quick_exit _LIBCPP_USING_IF_EXISTS; + + using std::getenv _LIBCPP_USING_IF_EXISTS; + using std::system _LIBCPP_USING_IF_EXISTS; + + // [c.malloc], C library memory allocation + using std::aligned_alloc _LIBCPP_USING_IF_EXISTS; + using std::calloc _LIBCPP_USING_IF_EXISTS; + using std::free _LIBCPP_USING_IF_EXISTS; + using std::malloc _LIBCPP_USING_IF_EXISTS; + using std::realloc _LIBCPP_USING_IF_EXISTS; + + using std::atof _LIBCPP_USING_IF_EXISTS; + using std::atoi _LIBCPP_USING_IF_EXISTS; + using std::atol _LIBCPP_USING_IF_EXISTS; + using std::atoll _LIBCPP_USING_IF_EXISTS; + using std::strtod _LIBCPP_USING_IF_EXISTS; + using std::strtof _LIBCPP_USING_IF_EXISTS; + using std::strtol _LIBCPP_USING_IF_EXISTS; + using std::strtold _LIBCPP_USING_IF_EXISTS; + using std::strtoll _LIBCPP_USING_IF_EXISTS; + using std::strtoul _LIBCPP_USING_IF_EXISTS; + using std::strtoull _LIBCPP_USING_IF_EXISTS; + + // [c.mb.wcs], multibyte / wide string and character conversion functions + using std::mblen _LIBCPP_USING_IF_EXISTS; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::mbstowcs _LIBCPP_USING_IF_EXISTS; + using std::mbtowc _LIBCPP_USING_IF_EXISTS; + using std::wcstombs _LIBCPP_USING_IF_EXISTS; + using std::wctomb _LIBCPP_USING_IF_EXISTS; +#endif + // [alg.c.library], C standard library algorithms + using std::bsearch _LIBCPP_USING_IF_EXISTS; + using std::qsort _LIBCPP_USING_IF_EXISTS; + + // [c.math.rand], low-quality random number generation + using std::rand _LIBCPP_USING_IF_EXISTS; + using std::srand _LIBCPP_USING_IF_EXISTS; + + // [c.math.abs], absolute values + using std::abs _LIBCPP_USING_IF_EXISTS; + + using std::labs _LIBCPP_USING_IF_EXISTS; + using std::llabs _LIBCPP_USING_IF_EXISTS; + + using std::div _LIBCPP_USING_IF_EXISTS; + using std::ldiv _LIBCPP_USING_IF_EXISTS; + using std::lldiv _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstring.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstring.inc new file mode 100644 index 0000000000000..9ad33b982b32a --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cstring.inc @@ -0,0 +1,35 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::size_t _LIBCPP_USING_IF_EXISTS; + + using std::memchr _LIBCPP_USING_IF_EXISTS; + using std::memcmp _LIBCPP_USING_IF_EXISTS; + using std::memcpy _LIBCPP_USING_IF_EXISTS; + using std::memmove _LIBCPP_USING_IF_EXISTS; + using std::memset _LIBCPP_USING_IF_EXISTS; + using std::strcat _LIBCPP_USING_IF_EXISTS; + using std::strchr _LIBCPP_USING_IF_EXISTS; + using std::strcmp _LIBCPP_USING_IF_EXISTS; + using std::strcoll _LIBCPP_USING_IF_EXISTS; + using std::strcpy _LIBCPP_USING_IF_EXISTS; + using std::strcspn _LIBCPP_USING_IF_EXISTS; + using std::strerror _LIBCPP_USING_IF_EXISTS; + using std::strlen _LIBCPP_USING_IF_EXISTS; + using std::strncat _LIBCPP_USING_IF_EXISTS; + using std::strncmp _LIBCPP_USING_IF_EXISTS; + using std::strncpy _LIBCPP_USING_IF_EXISTS; + using std::strpbrk _LIBCPP_USING_IF_EXISTS; + using std::strrchr _LIBCPP_USING_IF_EXISTS; + using std::strspn _LIBCPP_USING_IF_EXISTS; + using std::strstr _LIBCPP_USING_IF_EXISTS; + using std::strtok _LIBCPP_USING_IF_EXISTS; + using std::strxfrm _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ctime.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ctime.inc new file mode 100644 index 0000000000000..5bfa61917e5f2 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ctime.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::clock_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + using std::time_t _LIBCPP_USING_IF_EXISTS; + + using std::timespec _LIBCPP_USING_IF_EXISTS; + using std::tm _LIBCPP_USING_IF_EXISTS; + + using std::asctime _LIBCPP_USING_IF_EXISTS; + using std::clock _LIBCPP_USING_IF_EXISTS; + using std::ctime _LIBCPP_USING_IF_EXISTS; + using std::difftime _LIBCPP_USING_IF_EXISTS; + using std::gmtime _LIBCPP_USING_IF_EXISTS; + using std::localtime _LIBCPP_USING_IF_EXISTS; + using std::mktime _LIBCPP_USING_IF_EXISTS; + using std::strftime _LIBCPP_USING_IF_EXISTS; + using std::time _LIBCPP_USING_IF_EXISTS; + using std::timespec_get _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cuchar.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cuchar.inc new file mode 100644 index 0000000000000..4a0b21c17b7e1 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cuchar.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // Note the Standard does not mark these symbols optional, but libc++'s header + // does. So this seems strictly not to be conforming. + + // mbstate_t is conditionally here, but always present in cwchar.cppm. To avoid + // conflicing declarations omit the using here. + + // size_t is conditionally here, but always present in cstddef.cppm. To avoid + // conflicing declarations omit the using here. + +#if _LIBCPP_HAS_C8RTOMB_MBRTOC8 + using std::mbrtoc8 _LIBCPP_USING_IF_EXISTS; + using std::c8rtomb _LIBCPP_USING_IF_EXISTS; +#endif + using std::mbrtoc16 _LIBCPP_USING_IF_EXISTS; + using std::c16rtomb _LIBCPP_USING_IF_EXISTS; + using std::mbrtoc32 _LIBCPP_USING_IF_EXISTS; + using std::c32rtomb _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cwchar.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cwchar.inc new file mode 100644 index 0000000000000..6fda1cf5cdc75 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cwchar.inc @@ -0,0 +1,80 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::mbstate_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + using std::wint_t _LIBCPP_USING_IF_EXISTS; + + using std::tm _LIBCPP_USING_IF_EXISTS; + + using std::btowc _LIBCPP_USING_IF_EXISTS; + using std::fgetwc _LIBCPP_USING_IF_EXISTS; + using std::fgetws _LIBCPP_USING_IF_EXISTS; + using std::fputwc _LIBCPP_USING_IF_EXISTS; + using std::fputws _LIBCPP_USING_IF_EXISTS; + using std::fwide _LIBCPP_USING_IF_EXISTS; + using std::fwprintf _LIBCPP_USING_IF_EXISTS; + using std::fwscanf _LIBCPP_USING_IF_EXISTS; + using std::getwc _LIBCPP_USING_IF_EXISTS; + using std::getwchar _LIBCPP_USING_IF_EXISTS; + using std::putwc _LIBCPP_USING_IF_EXISTS; + using std::putwchar _LIBCPP_USING_IF_EXISTS; + using std::swprintf _LIBCPP_USING_IF_EXISTS; + using std::swscanf _LIBCPP_USING_IF_EXISTS; + using std::ungetwc _LIBCPP_USING_IF_EXISTS; + using std::vfwprintf _LIBCPP_USING_IF_EXISTS; + using std::vfwscanf _LIBCPP_USING_IF_EXISTS; + using std::vswprintf _LIBCPP_USING_IF_EXISTS; + using std::vswscanf _LIBCPP_USING_IF_EXISTS; + using std::vwprintf _LIBCPP_USING_IF_EXISTS; + using std::vwscanf _LIBCPP_USING_IF_EXISTS; + using std::wcscat _LIBCPP_USING_IF_EXISTS; + using std::wcschr _LIBCPP_USING_IF_EXISTS; + using std::wcscmp _LIBCPP_USING_IF_EXISTS; + using std::wcscoll _LIBCPP_USING_IF_EXISTS; + using std::wcscpy _LIBCPP_USING_IF_EXISTS; + using std::wcscspn _LIBCPP_USING_IF_EXISTS; + using std::wcsftime _LIBCPP_USING_IF_EXISTS; + using std::wcslen _LIBCPP_USING_IF_EXISTS; + using std::wcsncat _LIBCPP_USING_IF_EXISTS; + using std::wcsncmp _LIBCPP_USING_IF_EXISTS; + using std::wcsncpy _LIBCPP_USING_IF_EXISTS; + using std::wcspbrk _LIBCPP_USING_IF_EXISTS; + using std::wcsrchr _LIBCPP_USING_IF_EXISTS; + using std::wcsspn _LIBCPP_USING_IF_EXISTS; + using std::wcsstr _LIBCPP_USING_IF_EXISTS; + using std::wcstod _LIBCPP_USING_IF_EXISTS; + using std::wcstof _LIBCPP_USING_IF_EXISTS; + using std::wcstok _LIBCPP_USING_IF_EXISTS; + using std::wcstol _LIBCPP_USING_IF_EXISTS; + using std::wcstold _LIBCPP_USING_IF_EXISTS; + using std::wcstoll _LIBCPP_USING_IF_EXISTS; + using std::wcstoul _LIBCPP_USING_IF_EXISTS; + using std::wcstoull _LIBCPP_USING_IF_EXISTS; + using std::wcsxfrm _LIBCPP_USING_IF_EXISTS; + using std::wctob _LIBCPP_USING_IF_EXISTS; + using std::wmemchr _LIBCPP_USING_IF_EXISTS; + using std::wmemcmp _LIBCPP_USING_IF_EXISTS; + using std::wmemcpy _LIBCPP_USING_IF_EXISTS; + using std::wmemmove _LIBCPP_USING_IF_EXISTS; + using std::wmemset _LIBCPP_USING_IF_EXISTS; + using std::wprintf _LIBCPP_USING_IF_EXISTS; + using std::wscanf _LIBCPP_USING_IF_EXISTS; + + // [c.mb.wcs], multibyte / wide string and character conversion functions + using std::mbrlen _LIBCPP_USING_IF_EXISTS; + using std::mbrtowc _LIBCPP_USING_IF_EXISTS; + using std::mbsinit _LIBCPP_USING_IF_EXISTS; + using std::mbsrtowcs _LIBCPP_USING_IF_EXISTS; + using std::wcrtomb _LIBCPP_USING_IF_EXISTS; + using std::wcsrtombs _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_WIDE_CHARACTERS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cwctype.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cwctype.inc new file mode 100644 index 0000000000000..5d755d56e0103 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/cwctype.inc @@ -0,0 +1,35 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wctrans_t _LIBCPP_USING_IF_EXISTS; + using std::wctype_t _LIBCPP_USING_IF_EXISTS; + using std::wint_t _LIBCPP_USING_IF_EXISTS; + + using std::iswalnum _LIBCPP_USING_IF_EXISTS; + using std::iswalpha _LIBCPP_USING_IF_EXISTS; + using std::iswblank _LIBCPP_USING_IF_EXISTS; + using std::iswcntrl _LIBCPP_USING_IF_EXISTS; + using std::iswctype _LIBCPP_USING_IF_EXISTS; + using std::iswdigit _LIBCPP_USING_IF_EXISTS; + using std::iswgraph _LIBCPP_USING_IF_EXISTS; + using std::iswlower _LIBCPP_USING_IF_EXISTS; + using std::iswprint _LIBCPP_USING_IF_EXISTS; + using std::iswpunct _LIBCPP_USING_IF_EXISTS; + using std::iswspace _LIBCPP_USING_IF_EXISTS; + using std::iswupper _LIBCPP_USING_IF_EXISTS; + using std::iswxdigit _LIBCPP_USING_IF_EXISTS; + using std::towctrans _LIBCPP_USING_IF_EXISTS; + using std::towlower _LIBCPP_USING_IF_EXISTS; + using std::towupper _LIBCPP_USING_IF_EXISTS; + using std::wctrans _LIBCPP_USING_IF_EXISTS; + using std::wctype _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_WIDE_CHARACTERS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/deque.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/deque.inc new file mode 100644 index 0000000000000..5abf88816a98a --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/deque.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [deque], class template deque + using std::deque; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [deque.erasure], erasure + using std::erase; + using std::erase_if; + + namespace pmr { + using std::pmr::deque; + } +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/exception.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/exception.inc new file mode 100644 index 0000000000000..02b0f80190e5b --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/exception.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::bad_exception; + using std::current_exception; + using std::exception; + using std::exception_ptr; + using std::get_terminate; + using std::make_exception_ptr; + using std::nested_exception; + using std::rethrow_exception; + using std::rethrow_if_nested; + using std::set_terminate; + using std::terminate; + using std::terminate_handler; + using std::throw_with_nested; +#ifdef _LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION + using std::uncaught_exception; +#endif + using std::uncaught_exceptions; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/execution.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/execution.inc new file mode 100644 index 0000000000000..86c1cd7622b9b --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/execution.inc @@ -0,0 +1,36 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifdef _LIBCPP_ENABLE_EXPERIMENTAL +export namespace std { + // [execpol.type], execution policy type trait + using std::is_execution_policy; + using std::is_execution_policy_v; +} // namespace std + +export namespace std::execution { + // [execpol.seq], sequenced execution policy + using std::execution::sequenced_policy; + + // [execpol.par], parallel execution policy + using std::execution::parallel_policy; + + // [execpol.parunseq], parallel and unsequenced execution policy + using std::execution::parallel_unsequenced_policy; + + // [execpol.unseq], unsequenced execution policy + using std::execution::unsequenced_policy; + + // [execpol.objects], execution policy objects + using std::execution::par; + using std::execution::par_unseq; + using std::execution::seq; + using std::execution::unseq; +} // namespace std::execution +#endif // _LIBCPP_ENABLE_EXPERIMENTAL diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/expected.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/expected.inc new file mode 100644 index 0000000000000..c21683cb90d63 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/expected.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [expected.unexpected], class template unexpected + using std::unexpected; + + // [expected.bad], class template bad_expected_access + using std::bad_expected_access; + + // in-place construction of unexpected values + using std::unexpect; + using std::unexpect_t; + + // [expected.expected], class template expected + using std::expected; +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/filesystem.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/filesystem.inc new file mode 100644 index 0000000000000..0437a32802501 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/filesystem.inc @@ -0,0 +1,121 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std::filesystem { + // [fs.class.path], paths + using std::filesystem::path; + + // [fs.path.nonmember], path non-member functions + using std::filesystem::hash_value; + using std::filesystem::swap; + + // [fs.class.filesystem.error], filesystem errors + using std::filesystem::filesystem_error; + +#if _LIBCPP_HAS_FILESYSTEM + // [fs.class.directory.entry], directory entries + using std::filesystem::directory_entry; + + // [fs.class.directory.iterator], directory iterators + using std::filesystem::directory_iterator; + + // [fs.dir.itr.nonmembers], range access for directory iterators + using std::filesystem::begin; + using std::filesystem::end; + + // [fs.class.rec.dir.itr], recursive directory iterators + using std::filesystem::recursive_directory_iterator; +#endif // _LIBCPP_HAS_FILESYSTEM + + // [fs.rec.dir.itr.nonmembers], range access for recursive directory iterators + + // [fs.class.file.status], file status + using std::filesystem::file_status; + using std::filesystem::space_info; + + // [fs.enum], enumerations + using std::filesystem::copy_options; + using std::filesystem::directory_options; + using std::filesystem::file_type; + using std::filesystem::perm_options; + using std::filesystem::perms; + + using std::filesystem::file_time_type; + + // several of these enums are a bitmask type. + // [bitmask.types] specified operators + using std::filesystem::operator&; + using std::filesystem::operator&=; + using std::filesystem::operator^; + using std::filesystem::operator^=; + using std::filesystem::operator|; + using std::filesystem::operator|=; + using std::filesystem::operator~; + +#if _LIBCPP_HAS_FILESYSTEM + // [fs.op.funcs], filesystem operations + using std::filesystem::absolute; + using std::filesystem::canonical; + using std::filesystem::copy; + using std::filesystem::copy_file; + using std::filesystem::copy_symlink; + using std::filesystem::create_directories; + using std::filesystem::create_directory; + using std::filesystem::create_directory_symlink; + using std::filesystem::create_hard_link; + using std::filesystem::create_symlink; + using std::filesystem::current_path; + using std::filesystem::equivalent; + using std::filesystem::exists; + using std::filesystem::file_size; + using std::filesystem::hard_link_count; + + using std::filesystem::is_block_file; + using std::filesystem::is_character_file; + using std::filesystem::is_directory; + using std::filesystem::is_empty; + using std::filesystem::is_fifo; + using std::filesystem::is_other; + using std::filesystem::is_regular_file; + using std::filesystem::is_socket; + using std::filesystem::is_symlink; + + using std::filesystem::last_write_time; + using std::filesystem::permissions; + using std::filesystem::proximate; + using std::filesystem::read_symlink; + using std::filesystem::relative; + using std::filesystem::remove; + + using std::filesystem::remove_all; + using std::filesystem::rename; + using std::filesystem::resize_file; + using std::filesystem::space; + using std::filesystem::status; + using std::filesystem::status_known; + using std::filesystem::symlink_status; + using std::filesystem::temp_directory_path; + using std::filesystem::weakly_canonical; +#endif // _LIBCPP_HAS_FILESYSTEM + + // [depr.fs.path.factory] + using std::filesystem::u8path; +} // namespace std::filesystem + +// [fs.path.hash], hash support +export namespace std { + using std::hash; +} + +export namespace std::ranges { +#if _LIBCPP_HAS_FILESYSTEM + using std::ranges::enable_borrowed_range; + using std::ranges::enable_view; +#endif // _LIBCPP_HAS_FILESYSTEM +} // namespace std::ranges diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/flat_map.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/flat_map.inc new file mode 100644 index 0000000000000..e9521749dc4a8 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/flat_map.inc @@ -0,0 +1,31 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [flat.map], class template flat_map + using std::flat_map; + + using std::sorted_unique; + using std::sorted_unique_t; + + using std::uses_allocator; + + // [flat.map.erasure], erasure for flat_map + using std::erase_if; + + // [flat.multimap], class template flat_multimap + using std::flat_multimap; + + using std::sorted_equivalent; + using std::sorted_equivalent_t; + + // [flat.multimap.erasure], erasure for flat_multimap +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/flat_set.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/flat_set.inc new file mode 100644 index 0000000000000..51f39b75458b9 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/flat_set.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [flat.set], class template flat_­set + using std::flat_set; + + using std::sorted_unique; + using std::sorted_unique_t; + + using std::uses_allocator; + + // [flat.set.erasure], erasure for flat_­set + using std::erase_if; + + // [flat.multiset], class template flat_­multiset + using std::flat_multiset; + + using std::sorted_equivalent; + using std::sorted_equivalent_t; +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/format.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/format.inc new file mode 100644 index 0000000000000..fb0f971aeb0e9 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/format.inc @@ -0,0 +1,84 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [format.context], class template basic_format_context + using std::basic_format_context; + using std::format_context; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wformat_context; +#endif + + // [format.args], class template basic_format_args + using std::basic_format_args; + using std::format_args; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wformat_args; +#endif + + // [format.fmt.string], class template basic_format_string + using std::basic_format_string; + using std::format_string; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wformat_string; +#endif +#if _LIBCPP_STD_VER >= 26 + using std::runtime_format; +#endif // _LIBCPP_STD_VER >= 26 + + // [format.functions], formatting functions + using std::format; + using std::format_to; + using std::vformat; + using std::vformat_to; + + using std::format_to_n; + using std::format_to_n_result; + using std::formatted_size; + + // [format.formatter], formatter + using std::formatter; + +#if _LIBCPP_STD_VER >= 23 + using std::enable_nonlocking_formatter_optimization; + + // [format.formattable], concept formattable + using std::formattable; +#endif + + // [format.parse.ctx], class template basic_format_parse_context + using std::basic_format_parse_context; + using std::format_parse_context; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wformat_parse_context; +#endif + +#if _LIBCPP_STD_VER >= 23 + // [format.range], formatting of ranges + // [format.range.fmtkind], variable template format_kind + using std::format_kind; + using std::range_format; + + // [format.range.formatter], class template range_formatter + using std::range_formatter; +#endif // _LIBCPP_STD_VER >= 23 + + // [format.arg], class template basic_format_arg + using std::basic_format_arg; + using std::visit_format_arg; + + // [format.arg.store], class template format-arg-store + using std::make_format_args; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::make_wformat_args; +#endif + + // [format.error], class format_error + using std::format_error; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/forward_list.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/forward_list.inc new file mode 100644 index 0000000000000..c9585b5523b36 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/forward_list.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [forward.list], class template forward_list + using std::forward_list; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [forward.list.erasure], erasure + using std::erase; + using std::erase_if; + + namespace pmr { + using std::pmr::forward_list; + } +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/fstream.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/fstream.inc new file mode 100644 index 0000000000000..1773c5509e9a7 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/fstream.inc @@ -0,0 +1,44 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_filebuf; + +# if _LIBCPP_HAS_FILESYSTEM + using std::swap; +# endif + + using std::filebuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wfilebuf; +# endif + + using std::basic_ifstream; + + using std::ifstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wifstream; +# endif + + using std::basic_ofstream; + + using std::ofstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wofstream; +# endif + + using std::basic_fstream; + + using std::fstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wfstream; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/functional.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/functional.inc new file mode 100644 index 0000000000000..9ef8f584611fc --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/functional.inc @@ -0,0 +1,124 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [func.invoke], invoke + using std::invoke; +#if _LIBCPP_STD_VER >= 23 + using std::invoke_r; +#endif + +#if _LIBCPP_STD_VER >= 20 + using std::basic_common_reference; +#endif + + // [refwrap], reference_wrapper + using std::reference_wrapper; + + using std::cref; + using std::ref; + + // [arithmetic.operations], arithmetic operations + using std::divides; + using std::minus; + using std::modulus; + using std::multiplies; + using std::negate; + using std::plus; + // [comparisons], comparisons + using std::equal_to; + using std::greater; + using std::greater_equal; + using std::less; + using std::less_equal; + using std::not_equal_to; + + // [comparisons.three.way], class compare_three_way + using std::compare_three_way; + + // [logical.operations], logical operations + using std::logical_and; + using std::logical_not; + using std::logical_or; + + // [bitwise.operations], bitwise operations + using std::bit_and; + using std::bit_not; + using std::bit_or; + using std::bit_xor; + + // [func.identity], identity + using std::identity; + + // [func.not.fn], function template not_fn + using std::not_fn; + + // [func.bind.partial], function templates bind_front and bind_back + using std::bind_front; +#if _LIBCPP_STD_VER >= 23 + using std::bind_back; +#endif + + // [func.bind], bind + using std::is_bind_expression; + using std::is_bind_expression_v; + using std::is_placeholder; + using std::is_placeholder_v; + + using std::bind; + + namespace placeholders { + // M is the implementation-defined number of placeholders + using std::placeholders::_1; + using std::placeholders::_10; + using std::placeholders::_2; + using std::placeholders::_3; + using std::placeholders::_4; + using std::placeholders::_5; + using std::placeholders::_6; + using std::placeholders::_7; + using std::placeholders::_8; + using std::placeholders::_9; + } // namespace placeholders + + // [func.memfn], member function adaptors + using std::mem_fn; + + // [func.wrap], polymorphic function wrappers + using std::bad_function_call; + + using std::function; + + using std::swap; + + using std::operator==; + + // [func.wrap.move], move only wrapper + // using std::move_only_function; + + // [func.search], searchers + using std::default_searcher; + + using std::boyer_moore_searcher; + + using std::boyer_moore_horspool_searcher; + + // [unord.hash], class template hash + using std::hash; + + namespace ranges { + // [range.cmp], concept-constrained comparisons + using std::ranges::equal_to; + using std::ranges::greater; + using std::ranges::greater_equal; + using std::ranges::less; + using std::ranges::less_equal; + using std::ranges::not_equal_to; + } // namespace ranges +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/future.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/future.inc new file mode 100644 index 0000000000000..1abf9b3ef612f --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/future.inc @@ -0,0 +1,55 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + using std::future_errc; + using std::future_status; + using std::launch; + + // launch is a bitmask type. + // [bitmask.types] specified operators + using std::operator&; + using std::operator&=; + using std::operator^; + using std::operator^=; + using std::operator|; + using std::operator|=; + using std::operator~; + + // [futures.errors], error handling + using std::is_error_code_enum; + using std::make_error_code; + using std::make_error_condition; + + using std::future_category; + + // [futures.future.error], class future_error + using std::future_error; + + // [futures.promise], class template promise + using std::promise; + + using std::swap; + + using std::uses_allocator; + + // [futures.unique.future], class template future + using std::future; + + // [futures.shared.future], class template shared_future + using std::shared_future; + + // [futures.task], class template packaged_task + using std::packaged_task; + + // [futures.async], function template async + using std::async; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/generator.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/generator.inc new file mode 100644 index 0000000000000..43fb0daf5c659 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/generator.inc @@ -0,0 +1,14 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 + using std::generator; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/hazard_pointer.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/hazard_pointer.inc new file mode 100644 index 0000000000000..e56f4d0bf4363 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/hazard_pointer.inc @@ -0,0 +1,23 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 +# if _LIBCPP_STD_VER >= 23 + // 4.1.3, class template hazard_pointer_obj_base + using std::hazard_pointer_obj_base; + // 4.1.4, class hazard_pointer + using std::hazard_pointer; + // 4.1.5, Construct non-empty hazard_pointer + using std::make_hazard_pointer; + // 4.1.6, Hazard pointer swap + using std::swap; +# endif // _LIBCPP_STD_VER >= 23 +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/initializer_list.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/initializer_list.inc new file mode 100644 index 0000000000000..1dbeb220ca3c5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/initializer_list.inc @@ -0,0 +1,16 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::initializer_list; + + // [support.initlist.range], initializer list range access + using std::begin; + using std::end; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iomanip.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iomanip.inc new file mode 100644 index 0000000000000..f525f81cf117d --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iomanip.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::get_money; + using std::get_time; + using std::put_money; + using std::put_time; + using std::resetiosflags; + using std::setbase; + using std::setfill; + using std::setiosflags; + using std::setprecision; + using std::setw; + + using std::quoted; +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ios.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ios.inc new file mode 100644 index 0000000000000..d9e1e97fad55a --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ios.inc @@ -0,0 +1,76 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::fpos; + // based on [tab:fpos.operations] + using std::operator!=; // Note not affected by P1614, seems like a bug. + using std::operator-; + using std::operator==; + + using std::streamoff; + using std::streamsize; + + using std::basic_ios; + using std::ios_base; + + // [std.ios.manip], manipulators + using std::boolalpha; + using std::noboolalpha; + + using std::noshowbase; + using std::showbase; + + using std::noshowpoint; + using std::showpoint; + + using std::noshowpos; + using std::showpos; + + using std::noskipws; + using std::skipws; + + using std::nouppercase; + using std::uppercase; + + using std::nounitbuf; + using std::unitbuf; + + // [adjustfield.manip], adjustfield + using std::internal; + using std::left; + using std::right; + + // [basefield.manip], basefield + using std::dec; + using std::hex; + using std::oct; + + // [floatfield.manip], floatfield + using std::defaultfloat; + using std::fixed; + using std::hexfloat; + using std::scientific; + + // [error.reporting], error reporting + using std::io_errc; + + using std::iostream_category; + using std::is_error_code_enum; + using std::make_error_code; + using std::make_error_condition; + + // [iosfwd.syn] + using std::ios; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wios; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iosfwd.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iosfwd.inc new file mode 100644 index 0000000000000..61ed3af6e86ae --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iosfwd.inc @@ -0,0 +1,40 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::streampos; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstreampos; +#endif + using std::u16streampos; + using std::u32streampos; +#if _LIBCPP_HAS_CHAR8_T + using std::u8streampos; +#endif + +#if _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM + using std::basic_osyncstream; + using std::basic_syncbuf; +#endif + + using std::istreambuf_iterator; + using std::ostreambuf_iterator; + +#if _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM + using std::osyncstream; + using std::syncbuf; + +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wosyncstream; + using std::wsyncbuf; +# endif +#endif // _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM + + using std::fpos; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iostream.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iostream.inc new file mode 100644 index 0000000000000..76ff94923dea4 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iostream.inc @@ -0,0 +1,24 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::cerr; + using std::cin; + using std::clog; + using std::cout; + +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcerr; + using std::wcin; + using std::wclog; + using std::wcout; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/istream.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/istream.inc new file mode 100644 index 0000000000000..19fcd5db3de70 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/istream.inc @@ -0,0 +1,30 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_istream; + + using std::istream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wistream; +# endif + + using std::basic_iostream; + + using std::iostream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wiostream; +# endif + + using std::ws; + + using std::operator>>; +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iterator.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iterator.inc new file mode 100644 index 0000000000000..10c63d74e6e05 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/iterator.inc @@ -0,0 +1,244 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [iterator.assoc.types], associated types + // [incrementable.traits], incrementable traits + using std::incrementable_traits; + using std::iter_difference_t; + + using std::indirectly_readable_traits; + using std::iter_value_t; + + // [iterator.traits], iterator traits + using std::iterator_traits; + + using std::iter_reference_t; + + namespace ranges { + // [iterator.cust], customization point objects + inline namespace __cpo { + // [iterator.cust.move], ranges::iter_move + using std::ranges::__cpo::iter_move; + + // [iterator.cust.swap], ranges::iter_swap + using std::ranges::__cpo::iter_swap; + } // namespace __cpo + } // namespace ranges + + using std::iter_rvalue_reference_t; + + // [iterator.concepts], iterator concepts + // [iterator.concept.readable], concept indirectly_readable + using std::indirectly_readable; + + using std::iter_common_reference_t; + + // [iterator.concept.writable], concept indirectly_writable + using std::indirectly_writable; + + // [iterator.concept.winc], concept weakly_incrementable + using std::weakly_incrementable; + + // [iterator.concept.inc], concept incrementable + using std::incrementable; + + // [iterator.concept.iterator], concept input_or_output_iterator + using std::input_or_output_iterator; + + // [iterator.concept.sentinel], concept sentinel_for + using std::sentinel_for; + + // [iterator.concept.sizedsentinel], concept sized_sentinel_for + using std::disable_sized_sentinel_for; + + using std::sized_sentinel_for; + + // [iterator.concept.input], concept input_iterator + using std::input_iterator; + + // [iterator.concept.output], concept output_iterator + using std::output_iterator; + + // [iterator.concept.forward], concept forward_iterator + using std::forward_iterator; + + // [iterator.concept.bidir], concept bidirectional_iterator + using std::bidirectional_iterator; + + // [iterator.concept.random.access], concept random_access_iterator + using std::random_access_iterator; + + // [iterator.concept.contiguous], concept contiguous_iterator + using std::contiguous_iterator; + + // [indirectcallable], indirect callable requirements + // [indirectcallable.indirectinvocable], indirect callables + using std::indirectly_unary_invocable; + + using std::indirectly_regular_unary_invocable; + + using std::indirect_unary_predicate; + + using std::indirect_binary_predicate; + + using std::indirect_equivalence_relation; + + using std::indirect_strict_weak_order; + + using std::indirect_result_t; + + // [projected], projected + using std::projected; + + // [alg.req], common algorithm requirements + // [alg.req.ind.move], concept indirectly_movable + using std::indirectly_movable; + + using std::indirectly_movable_storable; + + // [alg.req.ind.copy], concept indirectly_copyable + using std::indirectly_copyable; + + using std::indirectly_copyable_storable; + + // [alg.req.ind.swap], concept indirectly_swappable + using std::indirectly_swappable; + + // [alg.req.ind.cmp], concept indirectly_comparable + using std::indirectly_comparable; + + // [alg.req.permutable], concept permutable + using std::permutable; + + // [alg.req.mergeable], concept mergeable + using std::mergeable; + + // [alg.req.sortable], concept sortable + using std::sortable; + + // [iterator.primitives], primitives + // [std.iterator.tags], iterator tags + using std::bidirectional_iterator_tag; + using std::contiguous_iterator_tag; + using std::forward_iterator_tag; + using std::input_iterator_tag; + using std::output_iterator_tag; + using std::random_access_iterator_tag; + + // [iterator.operations], iterator operations + using std::advance; + using std::distance; + using std::next; + using std::prev; + + // [range.iter.ops], range iterator operations + namespace ranges { + // [range.iter.op.advance], ranges​::​advance + using std::ranges::advance; + + // [range.iter.op.distance], ranges​::​distance + using std::ranges::distance; + + // [range.iter.op.next], ranges​::​next + using std::ranges::next; + + // [range.iter.op.prev], ranges​::​prev + using std::ranges::prev; + } // namespace ranges + + // [predef.iterators], predefined iterators and sentinels + // [reverse.iterators], reverse iterators + using std::reverse_iterator; + + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + using std::operator-; + using std::operator+; + + using std::make_reverse_iterator; + + // using std::disable_sized_sentinel_for; + + // [insert.iterators], insert iterators + using std::back_insert_iterator; + using std::back_inserter; + + using std::front_insert_iterator; + using std::front_inserter; + + using std::insert_iterator; + using std::inserter; + + // [const.iterators], constant iterators and sentinels + // [const.iterators.alias], alias templates + // using std::const_iterator; + // using std::const_sentinel; + // using std::iter_const_reference_t; + + // [const.iterators.iterator], class template basic_const_iterator + // using std::basic_const_iterator; + + // using std::common_type; + + // using std::make_const_iterator; + + // [move.iterators], move iterators and sentinels + using std::move_iterator; + + using std::make_move_iterator; + + using std::move_sentinel; + + using std::common_iterator; + + // [default.sentinel], default sentinel + using std::default_sentinel; + using std::default_sentinel_t; + + // [iterators.counted], counted iterators + using std::counted_iterator; + + // [unreachable.sentinel], unreachable sentinel + using std::unreachable_sentinel; + using std::unreachable_sentinel_t; + + // [stream.iterators], stream iterators + using std::istream_iterator; + + using std::ostream_iterator; + + using std::istreambuf_iterator; + using std::ostreambuf_iterator; + + // [iterator.range], range access + using std::begin; + using std::cbegin; + using std::cend; + using std::crbegin; + using std::crend; + using std::end; + using std::rbegin; + using std::rend; + + using std::empty; + using std::size; + using std::ssize; + + using std::data; + + // [depr.iterator] + using std::iterator; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/latch.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/latch.inc new file mode 100644 index 0000000000000..c64be15808e25 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/latch.inc @@ -0,0 +1,14 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + using std::latch; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/limits.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/limits.inc new file mode 100644 index 0000000000000..9aae993baa6f7 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/limits.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [fp.style], floating-point type properties + using std::float_denorm_style; + using std::float_round_style; + + // [numeric.limits], class template numeric_­limits + using std::numeric_limits; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/list.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/list.inc new file mode 100644 index 0000000000000..f38094c9b8a7c --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/list.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [list], class template list + using std::list; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [list.erasure], erasure + using std::erase; + using std::erase_if; + + namespace pmr { + using std::pmr::list; + } +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/locale.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/locale.inc new file mode 100644 index 0000000000000..cdc7441ece52e --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/locale.inc @@ -0,0 +1,81 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + // [locale], locale + using std::has_facet; + using std::locale; + using std::use_facet; + + // [locale.convenience], convenience interfaces + using std::isalnum; + using std::isalpha; + using std::isblank; + using std::iscntrl; + using std::isdigit; + using std::isgraph; + using std::islower; + using std::isprint; + using std::ispunct; + using std::isspace; + using std::isupper; + using std::isxdigit; + using std::tolower; + using std::toupper; + + // [category.ctype], ctype + using std::codecvt; + using std::codecvt_base; + using std::codecvt_byname; + using std::ctype; + using std::ctype_base; + using std::ctype_byname; + + // [category.numeric], numeric + using std::num_get; + using std::num_put; + using std::numpunct; + using std::numpunct_byname; + + // [category.collate], collation + using std::collate; + using std::collate_byname; + + // [category.time], date and time + using std::time_base; + using std::time_get; + using std::time_get_byname; + using std::time_put; + using std::time_put_byname; + + // [category.monetary], money + using std::money_base; + using std::money_get; + using std::money_put; + using std::moneypunct; + using std::moneypunct_byname; + + // [category.messages], message retrieval + using std::messages; + using std::messages_base; + using std::messages_byname; + +# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT) + + // [depr.conversions.buffer] + using std::wbuffer_convert; + + // [depr.conversions.string] + using std::wstring_convert; + +# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT) + +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/map.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/map.inc new file mode 100644 index 0000000000000..ed154e3e8c6fd --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/map.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [map], class template map + using std::map; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [map.erasure], erasure for map + using std::erase_if; + + // [multimap], class template multimap + using std::multimap; + + namespace pmr { + using std::pmr::map; + using std::pmr::multimap; + } // namespace pmr +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/mdspan.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/mdspan.inc new file mode 100644 index 0000000000000..c8cc78badb7d5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/mdspan.inc @@ -0,0 +1,39 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [mdspan.extents], class template extents + using std::extents; + + // [mdspan.extents.dextents], alias template dextents + using std::dextents; + +# if _LIBCPP_STD_VER >= 26 + // [mdspan.extents.dims] + using std::dims; +# endif // _LIBCPP_STD_VER >= 26 + + // [mdspan.layout], layout mapping + using std::layout_left; + using std::layout_right; + using std::layout_stride; + + // [mdspan.accessor.default], class template default_accessor + using std::default_accessor; + +# if _LIBCPP_STD_VER >= 26 + // [mdspan.accessor.aligned], class template aligned_accessor + using std::aligned_accessor; +# endif // _LIBCPP_STD_VER >= 26 + + // [mdspan.mdspan], class template mdspan + using std::mdspan; +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/memory.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/memory.inc new file mode 100644 index 0000000000000..c25e9e3443e9c --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/memory.inc @@ -0,0 +1,215 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [pointer.traits], pointer traits + using std::pointer_traits; + + // [pointer.conversion], pointer conversion + using std::to_address; + + // [ptr.align], pointer alignment + using std::align; + using std::assume_aligned; +#if _LIBCPP_STD_VER >= 26 + using std::is_sufficiently_aligned; +#endif + + // [obj.lifetime], explicit lifetime management + // using std::start_lifetime_as; + // using std::start_lifetime_as_array; + + // [allocator.tag], allocator argument tag + using std::allocator_arg; + using std::allocator_arg_t; + + // [allocator.uses], uses_allocator + using std::uses_allocator; + + // [allocator.uses.trait], uses_allocator + using std::uses_allocator_v; + + // [allocator.uses.construction], uses-allocator construction + using std::uses_allocator_construction_args; + + using std::make_obj_using_allocator; + using std::uninitialized_construct_using_allocator; + + // [allocator.traits], allocator traits + using std::allocator_traits; + +#if _LIBCPP_STD_VER >= 23 + using std::allocation_result; +#endif + + // [default.allocator], the default allocator + using std::allocator; + using std::operator==; + + // [specialized.addressof], addressof + using std::addressof; + + // [specialized.algorithms], specialized algorithms + // [special.mem.concepts], special memory concepts + + using std::uninitialized_default_construct; + using std::uninitialized_default_construct_n; + + namespace ranges { + using std::ranges::uninitialized_default_construct; + using std::ranges::uninitialized_default_construct_n; + } // namespace ranges + + using std::uninitialized_value_construct; + using std::uninitialized_value_construct_n; + + namespace ranges { + using std::ranges::uninitialized_value_construct; + using std::ranges::uninitialized_value_construct_n; + } // namespace ranges + + using std::uninitialized_copy; + using std::uninitialized_copy_n; + + namespace ranges { + using std::ranges::uninitialized_copy; + using std::ranges::uninitialized_copy_result; + + using std::ranges::uninitialized_copy_n; + using std::ranges::uninitialized_copy_n_result; + } // namespace ranges + + using std::uninitialized_move; + using std::uninitialized_move_n; + + namespace ranges { + using std::ranges::uninitialized_move; + using std::ranges::uninitialized_move_result; + + using std::ranges::uninitialized_move_n; + using std::ranges::uninitialized_move_n_result; + } // namespace ranges + + using std::uninitialized_fill; + using std::uninitialized_fill_n; + + namespace ranges { + using std::ranges::uninitialized_fill; + using std::ranges::uninitialized_fill_n; + } // namespace ranges + + // [specialized.construct], construct_at + using std::construct_at; + + namespace ranges { + using std::ranges::construct_at; + } + // [specialized.destroy], destroy + using std::destroy; + using std::destroy_at; + using std::destroy_n; + + namespace ranges { + using std::ranges::destroy; + using std::ranges::destroy_at; + using std::ranges::destroy_n; + } // namespace ranges + + // [unique.ptr], class template unique_ptr + using std::default_delete; + using std::unique_ptr; + + using std::make_unique; + using std::make_unique_for_overwrite; + + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + using std::operator<<; + + // [util.smartptr.weak.bad], class bad_weak_ptr + using std::bad_weak_ptr; + + // [util.smartptr.shared], class template shared_ptr + using std::shared_ptr; + + // [util.smartptr.shared.create], shared_ptr creation + using std::allocate_shared; + using std::allocate_shared_for_overwrite; + using std::make_shared; + using std::make_shared_for_overwrite; + + // [util.smartptr.shared.spec], shared_ptr specialized algorithms + using std::swap; + + // [util.smartptr.shared.cast], shared_ptr casts + using std::const_pointer_cast; + using std::dynamic_pointer_cast; + using std::reinterpret_pointer_cast; + using std::static_pointer_cast; + +#if _LIBCPP_HAS_RTTI + using std::get_deleter; +#endif // _LIBCPP_HAS_RTTI + + // [util.smartptr.shared.io], shared_ptr I/O + + // [util.smartptr.weak], class template weak_ptr + using std::weak_ptr; + + // [util.smartptr.weak.spec], weak_ptr specialized algorithms + + // [util.smartptr.ownerless], class template owner_less + using std::owner_less; + + // [util.smartptr.enab], class template enable_shared_from_this + using std::enable_shared_from_this; + + // [util.smartptr.hash], hash support + using std::hash; + + // [util.smartptr.atomic], atomic smart pointers + // using std::atomic; + +#if _LIBCPP_STD_VER >= 23 + // [out.ptr.t], class template out_ptr_t + using std::out_ptr_t; + + // [out.ptr], function template out_ptr + using std::out_ptr; + + // [inout.ptr.t], class template inout_ptr_t + using std::inout_ptr_t; + + // [inout.ptr], function template inout_ptr + using std::inout_ptr; +#endif // _LIBCPP_STD_VER >= 23 + +#if _LIBCPP_HAS_THREADS + // [depr.util.smartptr.shared.atomic] + using std::atomic_is_lock_free; + + using std::atomic_load; + using std::atomic_load_explicit; + + using std::atomic_store; + using std::atomic_store_explicit; + + using std::atomic_exchange; + using std::atomic_exchange_explicit; + + using std::atomic_compare_exchange_strong; + using std::atomic_compare_exchange_strong_explicit; + using std::atomic_compare_exchange_weak; + using std::atomic_compare_exchange_weak_explicit; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/memory_resource.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/memory_resource.inc new file mode 100644 index 0000000000000..740179baea273 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/memory_resource.inc @@ -0,0 +1,30 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std::pmr { + // [mem.res.class], class memory_resource + using std::pmr::memory_resource; + + using std::pmr::operator==; + + // [mem.poly.allocator.class], class template polymorphic_allocator + using std::pmr::polymorphic_allocator; + + // [mem.res.global], global memory resources + using std::pmr::get_default_resource; + using std::pmr::new_delete_resource; + using std::pmr::null_memory_resource; + using std::pmr::set_default_resource; + + // [mem.res.pool], pool resource classes + using std::pmr::monotonic_buffer_resource; + using std::pmr::pool_options; + using std::pmr::synchronized_pool_resource; + using std::pmr::unsynchronized_pool_resource; +} // namespace std::pmr diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/mutex.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/mutex.inc new file mode 100644 index 0000000000000..7a12506424a2d --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/mutex.inc @@ -0,0 +1,44 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.mutex.class], class mutex + using std::mutex; + // [thread.mutex.recursive], class recursive_mutex + using std::recursive_mutex; + // [thread.timedmutex.class] class timed_mutex + using std::timed_mutex; + // [thread.timedmutex.recursive], class recursive_timed_mutex + using std::recursive_timed_mutex; + + using std::adopt_lock_t; + using std::defer_lock_t; + using std::try_to_lock_t; + + using std::adopt_lock; + using std::defer_lock; + using std::try_to_lock; + + // [thread.lock], locks + using std::lock_guard; + using std::scoped_lock; + using std::unique_lock; + + using std::swap; + + // [thread.lock.algorithm], generic locking algorithms + using std::lock; + using std::try_lock; +#endif // _LIBCPP_HAS_THREADS + + using std::once_flag; + + using std::call_once; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/new.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/new.inc new file mode 100644 index 0000000000000..76d0a29ed98f6 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/new.inc @@ -0,0 +1,44 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [alloc.errors], storage allocation errors + using std::bad_alloc; + using std::bad_array_new_length; + + using std::destroying_delete; + using std::destroying_delete_t; + + // global operator new control + using std::align_val_t; + + using std::nothrow; + using std::nothrow_t; + + using std::get_new_handler; + using std::new_handler; + using std::set_new_handler; + + // [ptr.launder], pointer optimization barrier + using std::launder; +#if _LIBCPP_STD_VER >= 17 +# if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE) + // [hardware.interference], hardware interference size + using std::hardware_constructive_interference_size; + using std::hardware_destructive_interference_size; +# endif +#endif // _LIBCPP_STD_VER >= 17 +} // namespace std + +export { + using ::operator new; + using ::operator delete; + using ::operator new[]; + using ::operator delete[]; +} // export diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/numbers.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/numbers.inc new file mode 100644 index 0000000000000..2f55f442b18dc --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/numbers.inc @@ -0,0 +1,38 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std::numbers { + using std::numbers::e_v; + using std::numbers::egamma_v; + using std::numbers::inv_pi_v; + using std::numbers::inv_sqrt3_v; + using std::numbers::inv_sqrtpi_v; + using std::numbers::ln10_v; + using std::numbers::ln2_v; + using std::numbers::log10e_v; + using std::numbers::log2e_v; + using std::numbers::phi_v; + using std::numbers::pi_v; + using std::numbers::sqrt2_v; + using std::numbers::sqrt3_v; + + using std::numbers::e; + using std::numbers::egamma; + using std::numbers::inv_pi; + using std::numbers::inv_sqrt3; + using std::numbers::inv_sqrtpi; + using std::numbers::ln10; + using std::numbers::ln2; + using std::numbers::log10e; + using std::numbers::log2e; + using std::numbers::phi; + using std::numbers::pi; + using std::numbers::sqrt2; + using std::numbers::sqrt3; +} // namespace std::numbers diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/numeric.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/numeric.inc new file mode 100644 index 0000000000000..5a549552081d2 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/numeric.inc @@ -0,0 +1,71 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [accumulate], accumulate + using std::accumulate; + + // [reduce], reduce + using std::reduce; + + // [inner.product], inner product + using std::inner_product; + + // [transform.reduce], transform reduce + using std::transform_reduce; + + // [partial.sum], partial sum + using std::partial_sum; + + // [exclusive.scan], exclusive scan + using std::exclusive_scan; + + // [inclusive.scan], inclusive scan + using std::inclusive_scan; + + // [transform.exclusive.scan], transform exclusive scan + using std::transform_exclusive_scan; + + // [transform.inclusive.scan], transform inclusive scan + using std::transform_inclusive_scan; + + // [adjacent.difference], adjacent difference + using std::adjacent_difference; + + // [numeric.iota], iota + using std::iota; + + namespace ranges { + +#if _LIBCPP_STD_VER >= 23 + using std::ranges::iota; + using std::ranges::iota_result; +#endif // _LIBCPP_STD_VER >= 23 + + } // namespace ranges + + // [numeric.ops.gcd], greatest common divisor + using std::gcd; + + // [numeric.ops.lcm], least common multiple + using std::lcm; + + // [numeric.ops.midpoint], midpoint + using std::midpoint; + +#if _LIBCPP_STD_VER >= 26 + // [numeric.sat], saturation arithmetic + using std::add_sat; + using std::div_sat; + using std::mul_sat; + using std::saturate_cast; + using std::sub_sat; +#endif + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/optional.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/optional.inc new file mode 100644 index 0000000000000..0f812bc0e24a4 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/optional.inc @@ -0,0 +1,37 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [optional.optional], class template optional + using std::optional; + + // [optional.nullopt], no-value state indicator + using std::nullopt; + using std::nullopt_t; + + // [optional.bad.access], class bad_optional_access + using std::bad_optional_access; + + // [optional.relops], relational operators + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + // [optional.specalg], specialized algorithms + using std::swap; + + using std::make_optional; + + // [optional.hash], hash support + using std::hash; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ostream.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ostream.inc new file mode 100644 index 0000000000000..e124e6618eec2 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ostream.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_ostream; + + using std::ostream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wostream; +# endif + + using std::endl; + using std::ends; + using std::flush; + +# if 0 + using std::emit_on_flush; + using std::flush_emit; + using std::noemit_on_flush; +# endif + using std::operator<<; + +# if _LIBCPP_STD_VER >= 23 + // [ostream.formatted.print], print functions + using std::print; + using std::println; + + using std::vprint_nonunicode; +# if _LIBCPP_HAS_UNICODE + using std::vprint_unicode; +# endif // _LIBCPP_HAS_UNICODE +# endif // _LIBCPP_STD_VER >= 23 + +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/print.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/print.inc new file mode 100644 index 0000000000000..5354025ca8bd8 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/print.inc @@ -0,0 +1,21 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [print.fun], print functions + using std::print; + using std::println; + + using std::vprint_nonunicode; +# if _LIBCPP_HAS_UNICODE + using std::vprint_unicode; +# endif // _LIBCPP_HAS_UNICODE +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/queue.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/queue.inc new file mode 100644 index 0000000000000..d2fb18709c709 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/queue.inc @@ -0,0 +1,27 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [queue], class template queue + using std::queue; + + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + using std::swap; + using std::uses_allocator; + + // [priority.queue], class template priority_queue + using std::priority_queue; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/random.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/random.inc new file mode 100644 index 0000000000000..0ab6945247c97 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/random.inc @@ -0,0 +1,115 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [rand.req.urng], uniform random bit generator requirements + using std::uniform_random_bit_generator; + + // [rand.eng.lcong], class template linear_congruential_engine + using std::linear_congruential_engine; + + // [rand.eng.mers], class template mersenne_twister_engine + using std::mersenne_twister_engine; + + // [rand.eng.sub], class template subtract_with_carry_engine + using std::subtract_with_carry_engine; + + // [rand.adapt.disc], class template discard_block_engine + using std::discard_block_engine; + + // [rand.adapt.ibits], class template independent_bits_engine + using std::independent_bits_engine; + + // [rand.adapt.shuf], class template shuffle_order_engine + using std::shuffle_order_engine; + + // [rand.predef], engines and engine adaptors with predefined parameters + using std::knuth_b; + using std::minstd_rand; + using std::minstd_rand0; + using std::mt19937; + using std::mt19937_64; + using std::ranlux24; + using std::ranlux24_base; + using std::ranlux48; + using std::ranlux48_base; + + using std::default_random_engine; + +#if _LIBCPP_HAS_RANDOM_DEVICE + // [rand.device], class random_device + using std::random_device; +#endif + + // [rand.util.seedseq], class seed_seq + using std::seed_seq; + + // [rand.util.canonical], function template generate_canonical + using std::generate_canonical; + + // [rand.dist.uni.int], class template uniform_int_distribution + using std::uniform_int_distribution; + + // [rand.dist.uni.real], class template uniform_real_distribution + using std::uniform_real_distribution; + + // [rand.dist.bern.bernoulli], class bernoulli_distribution + using std::bernoulli_distribution; + + // [rand.dist.bern.bin], class template binomial_distribution + using std::binomial_distribution; + + // [rand.dist.bern.geo], class template geometric_distribution + using std::geometric_distribution; + + // [rand.dist.bern.negbin], class template negative_binomial_distribution + using std::negative_binomial_distribution; + + // [rand.dist.pois.poisson], class template poisson_distribution + using std::poisson_distribution; + + // [rand.dist.pois.exp], class template exponential_distribution + using std::exponential_distribution; + + // [rand.dist.pois.gamma], class template gamma_distribution + using std::gamma_distribution; + + // [rand.dist.pois.weibull], class template weibull_distribution + using std::weibull_distribution; + + // [rand.dist.pois.extreme], class template extreme_value_distribution + using std::extreme_value_distribution; + + // [rand.dist.norm.normal], class template normal_distribution + using std::normal_distribution; + + // [rand.dist.norm.lognormal], class template lognormal_distribution + using std::lognormal_distribution; + + // [rand.dist.norm.chisq], class template chi_squared_distribution + using std::chi_squared_distribution; + + // [rand.dist.norm.cauchy], class template cauchy_distribution + using std::cauchy_distribution; + + // [rand.dist.norm.f], class template fisher_f_distribution + using std::fisher_f_distribution; + + // [rand.dist.norm.t], class template student_t_distribution + using std::student_t_distribution; + + // [rand.dist.samp.discrete], class template discrete_distribution + using std::discrete_distribution; + + // [rand.dist.samp.pconst], class template piecewise_constant_distribution + using std::piecewise_constant_distribution; + + // [rand.dist.samp.plinear], class template piecewise_linear_distribution + using std::piecewise_linear_distribution; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ranges.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ranges.inc new file mode 100644 index 0000000000000..adabeeb22d551 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ranges.inc @@ -0,0 +1,365 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + namespace ranges { + inline namespace __cpo { + // [range.access], range access + using std::ranges::__cpo::begin; + using std::ranges::__cpo::cbegin; + using std::ranges::__cpo::cend; + using std::ranges::__cpo::crbegin; + using std::ranges::__cpo::crend; + using std::ranges::__cpo::end; + using std::ranges::__cpo::rbegin; + using std::ranges::__cpo::rend; + + using std::ranges::__cpo::cdata; + using std::ranges::__cpo::data; + using std::ranges::__cpo::empty; + using std::ranges::__cpo::size; + using std::ranges::__cpo::ssize; + } // namespace __cpo + + // [range.range], ranges + using std::ranges::range; + + using std::ranges::enable_borrowed_range; + + using std::ranges::borrowed_range; + + // using std::ranges::const_iterator_t; + // using std::ranges::const_sentinel_t; + using std::ranges::iterator_t; + // using std::ranges::range_const_reference_t; + using std::ranges::range_common_reference_t; + using std::ranges::range_difference_t; + using std::ranges::range_reference_t; + using std::ranges::range_rvalue_reference_t; + using std::ranges::range_size_t; + using std::ranges::range_value_t; + using std::ranges::sentinel_t; + + // [range.sized], sized ranges + using std::ranges::disable_sized_range; + using std::ranges::sized_range; + + // [range.view], views + using std::ranges::enable_view; + using std::ranges::view; + using std::ranges::view_base; + + // [range.refinements], other range refinements + using std::ranges::bidirectional_range; + using std::ranges::common_range; + // using std::ranges::constant_range; + using std::ranges::contiguous_range; + using std::ranges::forward_range; + using std::ranges::input_range; + using std::ranges::output_range; + using std::ranges::random_access_range; + using std::ranges::viewable_range; + + // [view.interface], class template view_­interface + using std::ranges::view_interface; + + // [range.subrange], sub-ranges + using std::ranges::subrange; + using std::ranges::subrange_kind; + + using std::ranges::get; + } // namespace ranges + + using std::ranges::get; + + namespace ranges { + + // [range.dangling], dangling iterator handling + using std::ranges::dangling; + + // [range.elementsof], class template elements_­of + // using std::ranges::elements_of; + + using std::ranges::borrowed_iterator_t; + + using std::ranges::borrowed_subrange_t; + +#if _LIBCPP_STD_VER >= 23 + // [range.utility.conv], range conversions + using std::ranges::to; +#endif + + // [range.empty], empty view + using std::ranges::empty_view; + + namespace views { + using std::ranges::views::empty; + } + + // [range.single], single view + using std::ranges::single_view; + + namespace views { + using std::ranges::views::single; + } // namespace views + + // [range.iota], iota view + using std::ranges::iota_view; + + namespace views { + using std::ranges::views::iota; + } // namespace views + +#if _LIBCPP_STD_VER >= 23 + // [range.repeat], repeat view + using std::ranges::repeat_view; + + namespace views { + using std::ranges::views::repeat; + } // namespace views +#endif // _LIBCPP_STD_VER >= 23 + +#if _LIBCPP_HAS_LOCALIZATION + // [range.istream], istream view + using std::ranges::basic_istream_view; + using std::ranges::istream_view; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::ranges::wistream_view; +# endif + + namespace views { + using std::ranges::views::istream; + } +#endif // _LIBCPP_HAS_LOCALIZATION + + // Note: This declaration not in the synopsis or explicitly in the wording. + // However it is needed for the range adaptors. + // [range.adaptor.object]/3 + // The template parameter D for range_adaptor_closure may be an + // incomplete type. If an expression of type cv D is used as an operand + // to the | operator, D shall be complete and model + // derived_from>. The behavior of an expression + // involving an object of type cv D as an operand to the | operator is + // undefined if overload resolution selects a program-defined operator| + // function. + // This is used internally in C++20 mode. + using std::ranges::operator|; +#if _LIBCPP_STD_VER >= 23 + // [range.adaptor.object], range adaptor objects + using std::ranges::range_adaptor_closure; +#endif + + // [range.all], all view + namespace views { + using std::ranges::views::all; + using std::ranges::views::all_t; + } // namespace views + + // [range.ref.view], ref view + using std::ranges::ref_view; + + // [range.owning.view], owning view + using std::ranges::owning_view; + +#if _LIBCPP_STD_VER >= 23 + // [range.as.rvalue], as rvalue view + using std::ranges::as_rvalue_view; + + namespace views { + using std::ranges::views::as_rvalue; + } // namespace views +#endif // _LIBCPP_STD_VER >= 23 + + // [range.filter], filter view + using std::ranges::filter_view; + + namespace views { + using std::ranges::views::filter; + } // namespace views + + // [range.transform], transform view + using std::ranges::transform_view; + + namespace views { + using std::ranges::views::transform; + } // namespace views + + // [range.take], take view + using std::ranges::take_view; + + namespace views { + using std::ranges::views::take; + } // namespace views + + // [range.take.while], take while view + using std::ranges::take_while_view; + + namespace views { + using std::ranges::views::take_while; + } // namespace views + + // [range.drop], drop view + using std::ranges::drop_view; + + namespace views { + using std::ranges::views::drop; + } // namespace views + + // [range.drop.while], drop while view + using std::ranges::drop_while_view; + + namespace views { + using std::ranges::views::drop_while; + } // namespace views + + using std::ranges::join_view; + + namespace views { + using std::ranges::views::join; + } // namespace views + +#if _LIBCPP_STD_VER >= 23 + // [range.join.with] + using std::ranges::join_with_view; + + namespace views { + using std::ranges::views::join_with; + } // namespace views +#endif // _LIBCPP_STD_VER >= 23 + + using std::ranges::lazy_split_view; + + // [range.split], split view + using std::ranges::split_view; + + namespace views { + using std::ranges::views::lazy_split; + using std::ranges::views::split; + } // namespace views + + // [range.counted], counted view + namespace views { + using std::ranges::views::counted; + } // namespace views + + // [range.common], common view + using std::ranges::common_view; + + namespace views { + using std::ranges::views::common; + } // namespace views + + // [range.reverse], reverse view + using std::ranges::reverse_view; + + namespace views { + using std::ranges::views::reverse; + } // namespace views + + // [range.as.const], as const view +#if 0 + using std::ranges::as_const_view; + + namespace views { + using std::ranges::views::as_const; + } // namespace views +#endif + // [range.elements], elements view + using std::ranges::elements_view; + + using std::ranges::keys_view; + using std::ranges::values_view; + + namespace views { + using std::ranges::views::elements; + using std::ranges::views::keys; + using std::ranges::views::values; + } // namespace views + +#if _LIBCPP_STD_VER >= 23 + // [range.zip], zip view + using std::ranges::zip_view; + + namespace views { + using std::ranges::views::zip; + } // namespace views +#endif // _LIBCPP_STD_VER >= 23 + +#if 0 + // [range.zip.transform], zip transform view + using std::ranges::zip_transform_view; + + namespace views { + using std::ranges::views::zip_transform; + } + + using std::ranges::adjacent_view; + + namespace views { + using std::ranges::views::adjacent; + using std::ranges::views::pairwise; + } // namespace views + + using std::ranges::adjacent_transform_view; + + namespace views { + using std::ranges::views::adjacent_transform; + using std::ranges::views::pairwise_transform; + } // namespace views + + using std::ranges::chunk_view; + + using std::ranges::chunk_view; + + namespace views { + using std::ranges::views::chunk; + } + + using std::ranges::slide_view; + + namespace views { + using std::ranges::views::slide; + } +#endif + +#if _LIBCPP_STD_VER >= 23 + // [range.chunk.by], chunk by view + using std::ranges::chunk_by_view; + + namespace views { + using std::ranges::views::chunk_by; + } +#endif // _LIBCPP_STD_VER >= 23 + +#if 0 + // [range.stride], stride view + using std::ranges::stride_view; + + namespace views { + using std::ranges::views::stride; + } + + using std::ranges::cartesian_product_view; + + namespace views { + using std::ranges::views::cartesian_product; + } +#endif + } // namespace ranges + + namespace views = ranges::views; + + using std::tuple_element; + using std::tuple_size; + +#if _LIBCPP_STD_VER >= 23 + using std::from_range; + using std::from_range_t; +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ratio.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ratio.inc new file mode 100644 index 0000000000000..4e1d4c61e7072 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/ratio.inc @@ -0,0 +1,58 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [ratio.ratio], class template ratio + using std::ratio; + + // [ratio.arithmetic], ratio arithmetic + using std::ratio_add; + using std::ratio_divide; + using std::ratio_multiply; + using std::ratio_subtract; + + // [ratio.comparison], ratio comparison + using std::ratio_equal; + using std::ratio_greater; + using std::ratio_greater_equal; + using std::ratio_less; + using std::ratio_less_equal; + using std::ratio_not_equal; + + using std::ratio_equal_v; + using std::ratio_greater_equal_v; + using std::ratio_greater_v; + using std::ratio_less_equal_v; + using std::ratio_less_v; + using std::ratio_not_equal_v; + + // [ratio.si], convenience SI typedefs + using std::atto; + using std::centi; + using std::deca; + using std::deci; + using std::exa; + using std::femto; + using std::giga; + using std::hecto; + using std::kilo; + using std::mega; + using std::micro; + using std::milli; + using std::nano; + using std::peta; + using std::pico; + using std::tera; + + // These are not supported by libc++, due to the range of intmax_t + // using std::yocto; + // using std::yotta; + // using std::zepto; + // using std::zetta +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/rcu.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/rcu.inc new file mode 100644 index 0000000000000..abf5afad30c13 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/rcu.inc @@ -0,0 +1,22 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 +# if _LIBCPP_STD_VER >= 23 + // 2.2.3, class template rcu_obj_base using std::rcu_obj_base; + // 2.2.4, class rcu_domain + using std::rcu_domain; + using std::rcu_default_domain(); + using std::rcu_barrier; + using std::rcu_retire; + using std::rcu_synchronize; +# endif // _LIBCPP_STD_VER >= 23 +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/regex.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/regex.inc new file mode 100644 index 0000000000000..9d0c58075b582 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/regex.inc @@ -0,0 +1,117 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + // [re.const], regex constants + namespace regex_constants { + using std::regex_constants::error_type; + using std::regex_constants::match_flag_type; + using std::regex_constants::syntax_option_type; + + // regex_constants is a bitmask type. + // [bitmask.types] specified operators + using std::regex_constants::operator&; + using std::regex_constants::operator&=; + using std::regex_constants::operator^; + using std::regex_constants::operator^=; + using std::regex_constants::operator|; + using std::regex_constants::operator|=; + using std::regex_constants::operator~; + + } // namespace regex_constants + + // [re.badexp], class regex_error + using std::regex_error; + + // [re.traits], class template regex_traits + using std::regex_traits; + + // [re.regex], class template basic_regex + using std::basic_regex; + + using std::regex; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wregex; +# endif + + // [re.regex.swap], basic_regex swap + using std::swap; + + // [re.submatch], class template sub_match + using std::sub_match; + + using std::csub_match; + using std::ssub_match; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcsub_match; + using std::wssub_match; +# endif + + // [re.submatch.op], sub_match non-member operators + using std::operator==; + using std::operator<=>; + + using std::operator<<; + + // [re.results], class template match_results + using std::match_results; + + using std::cmatch; + using std::smatch; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcmatch; + using std::wsmatch; +# endif + + // match_results comparisons + + // [re.results.swap], match_results swap + + // [re.alg.match], function template regex_match + using std::regex_match; + + // [re.alg.search], function template regex_search + using std::regex_search; + + // [re.alg.replace], function template regex_replace + using std::regex_replace; + + // [re.regiter], class template regex_iterator + using std::regex_iterator; + + using std::cregex_iterator; + using std::sregex_iterator; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcregex_iterator; + using std::wsregex_iterator; +# endif + + // [re.tokiter], class template regex_token_iterator + using std::regex_token_iterator; + + using std::cregex_token_iterator; + using std::sregex_token_iterator; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcregex_token_iterator; + using std::wsregex_token_iterator; +# endif + + namespace pmr { + using std::pmr::match_results; + + using std::pmr::cmatch; + using std::pmr::smatch; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::pmr::wcmatch; + using std::pmr::wsmatch; +# endif + } // namespace pmr +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/scoped_allocator.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/scoped_allocator.inc new file mode 100644 index 0000000000000..91c9694db28f9 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/scoped_allocator.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // class template scoped_allocator_adaptor + using std::scoped_allocator_adaptor; + + // [scoped.adaptor.operators], scoped allocator operators + using std::operator==; + +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/semaphore.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/semaphore.inc new file mode 100644 index 0000000000000..7b47554fb6e35 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/semaphore.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.sema.cnt], class template counting_semaphore + using std::counting_semaphore; + + using std::binary_semaphore; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/set.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/set.inc new file mode 100644 index 0000000000000..a8db792b4b381 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/set.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [set], class template set + using std::set; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [set.erasure], erasure for set + using std::erase_if; + + // [multiset], class template multiset + using std::multiset; + + namespace pmr { + using std::pmr::multiset; + using std::pmr::set; + } // namespace pmr +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/shared_mutex.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/shared_mutex.inc new file mode 100644 index 0000000000000..95102fc1ffee3 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/shared_mutex.inc @@ -0,0 +1,20 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.sharedmutex.class], class shared_­mutex + using std::shared_mutex; + // [thread.sharedtimedmutex.class], class shared_­timed_­mutex + using std::shared_timed_mutex; + // [thread.lock.shared], class template shared_­lock + using std::shared_lock; + using std::swap; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/source_location.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/source_location.inc new file mode 100644 index 0000000000000..750ab164a38de --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/source_location.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::source_location; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/span.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/span.inc new file mode 100644 index 0000000000000..184591c6b170d --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/span.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // constants + using std::dynamic_extent; + + // [views.span], class template span + using std::span; + + namespace ranges { + using std::ranges::enable_borrowed_range; + using std::ranges::enable_view; + } // namespace ranges + + // [span.objectrep], views of object representation + using std::as_bytes; + + using std::as_writable_bytes; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/spanstream.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/spanstream.inc new file mode 100644 index 0000000000000..e5b096e993307 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/spanstream.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 + using std::basic_spanbuf; + + using std::swap; + + using std::spanbuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wspanbuf; +# endif + + using std::basic_ispanstream; + + using std::ispanstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wispanstream; +# endif + + using std::basic_ospanstream; + + using std::ospanstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wospanstream; +# endif + + using std::basic_spanstream; + + using std::spanstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wspanstream; +# endif +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/sstream.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/sstream.inc new file mode 100644 index 0000000000000..99ec3b34e5af0 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/sstream.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_stringbuf; + + using std::swap; + + using std::stringbuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstringbuf; +# endif + + using std::basic_istringstream; + + using std::istringstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wistringstream; +# endif + + using std::basic_ostringstream; + + using std::ostringstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wostringstream; +# endif + + using std::basic_stringstream; + + using std::stringstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstringstream; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stack.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stack.inc new file mode 100644 index 0000000000000..3f736ff0e8410 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stack.inc @@ -0,0 +1,24 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [stack], class template stack + using std::stack; + + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + using std::swap; + using std::uses_allocator; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stacktrace.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stacktrace.inc new file mode 100644 index 0000000000000..c1184087c0df4 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stacktrace.inc @@ -0,0 +1,35 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 + // [stacktrace.entry], class stacktrace_­entry + using std::stacktrace_entry; + + // [stacktrace.basic], class template basic_­stacktrace + using std::basic_stacktrace; + + // basic_­stacktrace typedef-names + using std::stacktrace; + + // [stacktrace.basic.nonmem], non-member functions + using std::swap; + + using std::to_string; + + using std::operator<<; + + namespace pmr { + using std::pmr::stacktrace; + } + + // [stacktrace.basic.hash], hash support + using std::hash; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stdexcept.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stdexcept.inc new file mode 100644 index 0000000000000..15d37bafdba95 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stdexcept.inc @@ -0,0 +1,20 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::domain_error; + using std::invalid_argument; + using std::length_error; + using std::logic_error; + using std::out_of_range; + using std::overflow_error; + using std::range_error; + using std::runtime_error; + using std::underflow_error; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stdfloat.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stdfloat.inc new file mode 100644 index 0000000000000..7e7201a854154 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stdfloat.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if defined(__STDCPP_FLOAT16_T__) + using std::float16_t; +#endif +#if defined(__STDCPP_FLOAT32_T__) + using std::float32_t; +#endif +#if defined(__STDCPP_FLOAT64_T__) + using std::float64_t; +#endif +#if defined(__STDCPP_FLOAT128_T__) + using std::float128_t; +#endif +#if defined(__STDCPP_BFLOAT16_T__) + using std::bfloat16_t; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stop_token.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stop_token.inc new file mode 100644 index 0000000000000..b5c7eb215fb63 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/stop_token.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [stoptoken], class stop_­token + using std::stop_token; + + // [stopsource], class stop_­source + using std::stop_source; + + // no-shared-stop-state indicator + using std::nostopstate; + using std::nostopstate_t; + + // [stopcallback], class template stop_­callback + using std::stop_callback; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/streambuf.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/streambuf.inc new file mode 100644 index 0000000000000..fac076765ea22 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/streambuf.inc @@ -0,0 +1,18 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_streambuf; + using std::streambuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstreambuf; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/string.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/string.inc new file mode 100644 index 0000000000000..8e14be8dcbe41 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/string.inc @@ -0,0 +1,80 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [char.traits], character traits + using std::char_traits; + + // [basic.string], basic_string + using std::basic_string; + + using std::operator+; + using std::operator==; + using std::operator<=>; + + // [string.special], swap + using std::swap; + + // [string.io], inserters and extractors + using std::operator>>; + using std::operator<<; + using std::getline; + + // [string.erasure], erasure + using std::erase; + using std::erase_if; + + // basic_string typedef-names + using std::string; + using std::u16string; + using std::u32string; +#if _LIBCPP_HAS_CHAR8_T + using std::u8string; +#endif +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstring; +#endif + + // [string.conversions], numeric conversions + using std::stod; + using std::stof; + using std::stoi; + using std::stol; + using std::stold; + using std::stoll; + using std::stoul; + using std::stoull; + using std::to_string; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::to_wstring; +#endif + + namespace pmr { + using std::pmr::basic_string; + using std::pmr::string; + using std::pmr::u16string; + using std::pmr::u32string; +#if _LIBCPP_HAS_CHAR8_T + using std::pmr::u8string; +#endif +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::pmr::wstring; +#endif + } // namespace pmr + + // [basic.string.hash], hash support + using std::hash; + + inline namespace literals { + inline namespace string_literals { + // [basic.string.literals], suffix for basic_string literals + using std::literals::string_literals::operator""s; + } // namespace string_literals + } // namespace literals +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/string_view.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/string_view.inc new file mode 100644 index 0000000000000..4de1c8b58c2e5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/string_view.inc @@ -0,0 +1,46 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [string.view.template], class template basic_string_view + using std::basic_string_view; + + namespace ranges { + using std::ranges::enable_borrowed_range; + using std::ranges::enable_view; + } // namespace ranges + + // [string.view.comparison], non-member comparison functions + using std::operator==; + using std::operator<=>; + + // [string.view.io], inserters and extractors + using std::operator<<; + + // basic_string_view typedef-names + using std::string_view; + using std::u16string_view; + using std::u32string_view; +#if _LIBCPP_HAS_CHAR8_T + using std::u8string_view; +#endif +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstring_view; +#endif + + // [string.view.hash], hash support + using std::hash; + + inline namespace literals { + inline namespace string_view_literals { + // [string.view.literals], suffix for basic_string_view literals + using std::literals::string_view_literals::operator""sv; + } // namespace string_view_literals + } // namespace literals +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/strstream.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/strstream.inc new file mode 100644 index 0000000000000..5b9d45ad9e8fc --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/strstream.inc @@ -0,0 +1,19 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION +# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_STRSTREAM) + using std::istrstream; + using std::ostrstream; + using std::strstream; + using std::strstreambuf; +# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_STRSTREAM) +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/syncstream.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/syncstream.inc new file mode 100644 index 0000000000000..0c3c640433444 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/syncstream.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION && _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM + using std::basic_syncbuf; + + // [syncstream.syncbuf.special], specialized algorithms + using std::swap; + + using std::syncbuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wsyncbuf; +# endif + using std::basic_osyncstream; + + using std::osyncstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wosyncstream; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION && _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/system_error.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/system_error.inc new file mode 100644 index 0000000000000..cf553a5ee4a18 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/system_error.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::error_category; + using std::generic_category; + using std::system_category; + + using std::error_code; + using std::error_condition; + using std::system_error; + + using std::is_error_code_enum; + using std::is_error_condition_enum; + + using std::errc; + + // [syserr.errcode.nonmembers], non-member functions + using std::make_error_code; + + using std::operator<<; + + // [syserr.errcondition.nonmembers], non-member functions + using std::make_error_condition; + + // [syserr.compare], comparison operator functions + using std::operator==; + using std::operator<=>; + + // [syserr.hash], hash support + using std::hash; + + // [syserr], system error support + using std::is_error_code_enum_v; + using std::is_error_condition_enum_v; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/text_encoding.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/text_encoding.inc new file mode 100644 index 0000000000000..6d5e3f1d68c60 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/text_encoding.inc @@ -0,0 +1,19 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 +# if _LIBCPP_STD_VER >= 23 + using std::text_encoding; + + // hash support + using std::hash; +# endif // _LIBCPP_STD_VER >= 23 +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/thread.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/thread.inc new file mode 100644 index 0000000000000..694539e1a0c5e --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/thread.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.thread.class], class thread + using std::thread; + + using std::swap; + + // [thread.jthread.class], class jthread + using std::jthread; + + // [thread.thread.this], namespace this_thread + namespace this_thread { + using std::this_thread::get_id; + + using std::this_thread::sleep_for; + using std::this_thread::sleep_until; + using std::this_thread::yield; + } // namespace this_thread + + // [thread.thread.id] + using std::operator==; + using std::operator<=>; +# if _LIBCPP_HAS_LOCALIZATION + using std::operator<<; +# endif // _LIBCPP_HAS_LOCALIZATION + +# if _LIBCPP_STD_VER >= 23 + using std::formatter; +# endif + + using std::hash; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/tuple.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/tuple.inc new file mode 100644 index 0000000000000..706e2266c174b --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/tuple.inc @@ -0,0 +1,55 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [tuple.tuple], class template tuple + using std::tuple; + + // [tuple.like], concept tuple-like + +#if _LIBCPP_STD_VER >= 23 + // [tuple.common.ref], common_reference related specializations + using std::basic_common_reference; + using std::common_type; +#endif + + // [tuple.creation], tuple creation functions + using std::ignore; + + using std::forward_as_tuple; + using std::make_tuple; + using std::tie; + using std::tuple_cat; + + // [tuple.apply], calling a function with a tuple of arguments + using std::apply; + + using std::make_from_tuple; + + // [tuple.helper], tuple helper classes + using std::tuple_element; + using std::tuple_size; + + // [tuple.elem], element access + using std::get; + using std::tuple_element_t; + + // [tuple.rel], relational operators + using std::operator==; + using std::operator<=>; + + // [tuple.traits], allocator-related traits + using std::uses_allocator; + + // [tuple.special], specialized algorithms + using std::swap; + + // [tuple.helper], tuple helper classes + using std::tuple_size_v; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/type_traits.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/type_traits.inc new file mode 100644 index 0000000000000..6823c86ed153b --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/type_traits.inc @@ -0,0 +1,341 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [meta.help], helper class + using std::integral_constant; + + using std::bool_constant; + using std::false_type; + using std::true_type; + + // [meta.unary.cat], primary type categories + using std::is_array; + using std::is_class; + using std::is_enum; + using std::is_floating_point; + using std::is_function; + using std::is_integral; + using std::is_lvalue_reference; + using std::is_member_function_pointer; + using std::is_member_object_pointer; + using std::is_null_pointer; + using std::is_pointer; + using std::is_rvalue_reference; + using std::is_union; + using std::is_void; + + // [meta.unary.comp], composite type categories + using std::is_arithmetic; + using std::is_compound; + using std::is_fundamental; + using std::is_member_pointer; + using std::is_object; + using std::is_reference; + using std::is_scalar; + + // [meta.unary.prop], type properties + using std::is_abstract; + using std::is_aggregate; + using std::is_const; + using std::is_empty; + using std::is_final; + using std::is_polymorphic; + using std::is_standard_layout; + using std::is_trivial; + using std::is_trivially_copyable; + using std::is_volatile; + + using std::is_bounded_array; +#if _LIBCPP_STD_VER >= 23 + using std::is_scoped_enum; +#endif + using std::is_signed; + using std::is_unbounded_array; + using std::is_unsigned; + + using std::is_constructible; + using std::is_copy_constructible; + using std::is_default_constructible; + using std::is_move_constructible; + + using std::is_assignable; + using std::is_copy_assignable; + using std::is_move_assignable; + + using std::is_swappable; + using std::is_swappable_with; + + using std::is_destructible; + + using std::is_trivially_constructible; + using std::is_trivially_copy_constructible; + using std::is_trivially_default_constructible; + using std::is_trivially_move_constructible; + + using std::is_trivially_assignable; + using std::is_trivially_copy_assignable; + using std::is_trivially_destructible; + using std::is_trivially_move_assignable; + + using std::is_nothrow_constructible; + using std::is_nothrow_copy_constructible; + using std::is_nothrow_default_constructible; + using std::is_nothrow_move_constructible; + + using std::is_nothrow_assignable; + using std::is_nothrow_copy_assignable; + using std::is_nothrow_move_assignable; + + using std::is_nothrow_swappable; + using std::is_nothrow_swappable_with; + + using std::is_nothrow_destructible; + +#if _LIBCPP_STD_VER >= 23 && __has_builtin(__builtin_is_implicit_lifetime) + using std::is_implicit_lifetime; +#endif + + using std::has_virtual_destructor; + + using std::has_unique_object_representations; + +#if _LIBCPP_STD_VER >= 23 +# if __has_builtin(__reference_constructs_from_temporary) + using std::reference_constructs_from_temporary; +# endif +# if __has_builtin(__reference_converts_from_temporary) + using std::reference_converts_from_temporary; +# endif +#endif + + // [meta.unary.prop.query], type property queries + using std::alignment_of; + using std::extent; + using std::rank; + + // [meta.rel], type relations + using std::is_base_of; +#if _LIBCPP_STD_VER >= 26 && __has_builtin(__builtin_is_virtual_base_of) + using std::is_virtual_base_of; +#endif + using std::is_convertible; + // using std::is_layout_compatible; + using std::is_nothrow_convertible; + // using std::is_pointer_interconvertible_base_of; + using std::is_same; + + using std::is_invocable; + using std::is_invocable_r; + + using std::is_nothrow_invocable; + using std::is_nothrow_invocable_r; + + // [meta.trans.cv], const-volatile modifications + using std::add_const; + using std::add_cv; + using std::add_volatile; + using std::remove_const; + using std::remove_cv; + using std::remove_volatile; + + using std::add_const_t; + using std::add_cv_t; + using std::add_volatile_t; + using std::remove_const_t; + using std::remove_cv_t; + using std::remove_volatile_t; + + // [meta.trans.ref], reference modifications + using std::add_lvalue_reference; + using std::add_rvalue_reference; + using std::remove_reference; + + using std::add_lvalue_reference_t; + using std::add_rvalue_reference_t; + using std::remove_reference_t; + + // [meta.trans.sign], sign modifications + using std::make_signed; + using std::make_unsigned; + + using std::make_signed_t; + using std::make_unsigned_t; + + // [meta.trans.arr], array modifications + using std::remove_all_extents; + using std::remove_extent; + + using std::remove_all_extents_t; + using std::remove_extent_t; + + // [meta.trans.ptr], pointer modifications + using std::add_pointer; + using std::remove_pointer; + + using std::add_pointer_t; + using std::remove_pointer_t; + + // [meta.trans.other], other transformations + using std::basic_common_reference; + using std::common_reference; + using std::common_type; + using std::conditional; + using std::decay; + using std::enable_if; + using std::invoke_result; + using std::remove_cvref; + using std::type_identity; + using std::underlying_type; + using std::unwrap_ref_decay; + using std::unwrap_reference; + + using std::common_reference_t; + using std::common_type_t; + using std::conditional_t; + using std::decay_t; + using std::enable_if_t; + using std::invoke_result_t; + using std::remove_cvref_t; + using std::type_identity_t; + using std::underlying_type_t; + using std::unwrap_ref_decay_t; + using std::unwrap_reference_t; + using std::void_t; + + // [meta.logical], logical operator traits + using std::conjunction; + using std::disjunction; + using std::negation; + + // [meta.unary.cat], primary type categories + using std::is_array_v; + using std::is_class_v; + using std::is_enum_v; + using std::is_floating_point_v; + using std::is_function_v; + using std::is_integral_v; + using std::is_lvalue_reference_v; + using std::is_member_function_pointer_v; + using std::is_member_object_pointer_v; + using std::is_null_pointer_v; + using std::is_pointer_v; + using std::is_rvalue_reference_v; + using std::is_union_v; + using std::is_void_v; + + // [meta.unary.comp], composite type categories + using std::is_arithmetic_v; + using std::is_compound_v; + using std::is_fundamental_v; + using std::is_member_pointer_v; + using std::is_object_v; + using std::is_reference_v; + using std::is_scalar_v; + + // [meta.unary.prop], type properties + using std::has_unique_object_representations_v; + using std::has_virtual_destructor_v; + using std::is_abstract_v; + using std::is_aggregate_v; + using std::is_assignable_v; + using std::is_bounded_array_v; + using std::is_const_v; + using std::is_constructible_v; + using std::is_copy_assignable_v; + using std::is_copy_constructible_v; + using std::is_default_constructible_v; + using std::is_destructible_v; + using std::is_empty_v; + using std::is_final_v; +#if _LIBCPP_STD_VER >= 23 && __has_builtin(__builtin_is_implicit_lifetime) + using std::is_implicit_lifetime_v; +#endif + using std::is_move_assignable_v; + using std::is_move_constructible_v; + using std::is_nothrow_assignable_v; + using std::is_nothrow_constructible_v; + using std::is_nothrow_copy_assignable_v; + using std::is_nothrow_copy_constructible_v; + using std::is_nothrow_default_constructible_v; + using std::is_nothrow_destructible_v; + using std::is_nothrow_move_assignable_v; + using std::is_nothrow_move_constructible_v; + using std::is_nothrow_swappable_v; + using std::is_nothrow_swappable_with_v; + using std::is_polymorphic_v; +#if _LIBCPP_STD_VER >= 23 + using std::is_scoped_enum_v; +#endif + using std::is_signed_v; + using std::is_standard_layout_v; + using std::is_swappable_v; + using std::is_swappable_with_v; + using std::is_trivial_v; + using std::is_trivially_assignable_v; + using std::is_trivially_constructible_v; + using std::is_trivially_copy_assignable_v; + using std::is_trivially_copy_constructible_v; + using std::is_trivially_copyable_v; + using std::is_trivially_default_constructible_v; + using std::is_trivially_destructible_v; + using std::is_trivially_move_assignable_v; + using std::is_trivially_move_constructible_v; + using std::is_unbounded_array_v; + using std::is_unsigned_v; + using std::is_volatile_v; +#if _LIBCPP_STD_VER >= 23 +# if __has_builtin(__reference_constructs_from_temporary) + using std::reference_constructs_from_temporary_v; +# endif +# if __has_builtin(__reference_converts_from_temporary) + using std::reference_converts_from_temporary_v; +# endif +#endif + + // [meta.unary.prop.query], type property queries + using std::alignment_of_v; + using std::extent_v; + using std::rank_v; + + // [meta.rel], type relations + using std::is_base_of_v; +#if _LIBCPP_STD_VER >= 26 && __has_builtin(__builtin_is_virtual_base_of) + using std::is_virtual_base_of_v; +#endif + using std::is_convertible_v; + using std::is_invocable_r_v; + using std::is_invocable_v; + // using std::is_layout_compatible_v; + using std::is_nothrow_convertible_v; + using std::is_nothrow_invocable_r_v; + using std::is_nothrow_invocable_v; + // using std::is_pointer_interconvertible_base_of_v; + using std::is_same_v; + + // [meta.logical], logical operator traits + using std::conjunction_v; + using std::disjunction_v; + using std::negation_v; + + // [meta.member], member relationships + // using std::is_corresponding_member; + // using std::is_pointer_interconvertible_with_class; + + // [meta.const.eval], constant evaluation context + using std::is_constant_evaluated; + + // [depr.meta.types] + using std::aligned_storage; + using std::aligned_storage_t; + using std::aligned_union; + using std::aligned_union_t; + using std::is_pod; + using std::is_pod_v; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/typeindex.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/typeindex.inc new file mode 100644 index 0000000000000..0fdcd8fb440f1 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/typeindex.inc @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::hash; + using std::type_index; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/typeinfo.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/typeinfo.inc new file mode 100644 index 0000000000000..ee1273baf4896 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/typeinfo.inc @@ -0,0 +1,14 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::bad_cast; + using std::bad_typeid; + using std::type_info; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/unordered_map.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/unordered_map.inc new file mode 100644 index 0000000000000..eff62f30540a7 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/unordered_map.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [unord.map], class template unordered_­map + using std::unordered_map; + + // [unord.multimap], class template unordered_­multimap + using std::unordered_multimap; + + using std::operator==; + + using std::swap; + + // [unord.map.erasure], erasure for unordered_­map + using std::erase_if; + + namespace pmr { + using std::pmr::unordered_map; + using std::pmr::unordered_multimap; + } // namespace pmr +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/unordered_set.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/unordered_set.inc new file mode 100644 index 0000000000000..c214e3420434b --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/unordered_set.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [unord.set], class template unordered_­set + using std::unordered_set; + + // [unord.multiset], class template unordered_­multiset + using std::unordered_multiset; + + using std::operator==; + + using std::swap; + + // [unord.set.erasure], erasure for unordered_­set + using std::erase_if; + + namespace pmr { + using std::pmr::unordered_multiset; + using std::pmr::unordered_set; + } // namespace pmr +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/utility.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/utility.inc new file mode 100644 index 0000000000000..77c21b87640dd --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/utility.inc @@ -0,0 +1,99 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [utility.swap], swap + using std::swap; + + // [utility.exchange], exchange + using std::exchange; + + // [forward], forward/move + using std::forward; +#if _LIBCPP_STD_VER >= 23 + using std::forward_like; +#endif + using std::move; + using std::move_if_noexcept; + + // [utility.as.const], as_const + using std::as_const; + + // [declval], declval + using std::declval; + + // [utility.intcmp], integer comparison functions + using std::cmp_equal; + using std::cmp_not_equal; + + using std::cmp_greater; + using std::cmp_greater_equal; + using std::cmp_less; + using std::cmp_less_equal; + + using std::in_range; + +#if _LIBCPP_STD_VER >= 23 + // [utility.underlying], to_underlying + using std::to_underlying; + + // [utility.unreachable], unreachable + using std::unreachable; +#endif // _LIBCPP_STD_VER >= 23 + + // [intseq], compile-time integer sequences + using std::index_sequence; + using std::integer_sequence; + + using std::make_index_sequence; + using std::make_integer_sequence; + + using std::index_sequence_for; + + // [pairs], class template pair + using std::pair; + +#if _LIBCPP_STD_VER >= 23 + using std::basic_common_reference; + using std::common_type; +#endif + // [pairs.spec], pair specialized algorithms + using std::operator==; + using std::operator<=>; + + using std::make_pair; + + // [pair.astuple], tuple-like access to pair + using std::tuple_element; + using std::tuple_size; + + using std::get; + + // [pair.piecewise], pair piecewise construction + using std::piecewise_construct; + using std::piecewise_construct_t; + + // in-place construction + using std::in_place; + using std::in_place_t; + + using std::in_place_type; + using std::in_place_type_t; + + using std::in_place_index; + using std::in_place_index_t; + + // [depr.relops] + namespace rel_ops { + using rel_ops::operator!=; + using rel_ops::operator>; + using rel_ops::operator<=; + using rel_ops::operator>=; + } // namespace rel_ops +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/valarray.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/valarray.inc new file mode 100644 index 0000000000000..1cdf7f14060fb --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/valarray.inc @@ -0,0 +1,68 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::gslice; + using std::gslice_array; + using std::indirect_array; + using std::mask_array; + using std::slice; + using std::slice_array; + using std::valarray; + + using std::swap; + + using std::operator*; + using std::operator/; + using std::operator%; + using std::operator+; + using std::operator-; + + using std::operator^; + using std::operator&; + using std::operator|; + + using std::operator<<; + using std::operator>>; + + using std::operator&&; + using std::operator||; + + using std::operator==; + using std::operator!=; + + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + + using std::abs; + using std::acos; + using std::asin; + using std::atan; + + using std::atan2; + + using std::cos; + using std::cosh; + using std::exp; + using std::log; + using std::log10; + + using std::pow; + + using std::sin; + using std::sinh; + using std::sqrt; + using std::tan; + using std::tanh; + + using std::begin; + using std::end; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/variant.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/variant.inc new file mode 100644 index 0000000000000..6fcecddbedaf5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/variant.inc @@ -0,0 +1,49 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [variant.variant], class template variant + using std::variant; + + // [variant.helper], variant helper classes + using std::variant_alternative; + using std::variant_npos; + using std::variant_size; + using std::variant_size_v; + + // [variant.get], value access + using std::get; + using std::get_if; + using std::holds_alternative; + using std::variant_alternative_t; + + // [variant.relops], relational operators + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + // [variant.visit], visitation + using std::visit; + + // [variant.monostate], class monostate + using std::monostate; + + // [variant.specalg], specialized algorithms + using std::swap; + + // [variant.bad.access], class bad_variant_access + using std::bad_variant_access; + + // [variant.hash], hash support + using std::hash; +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/vector.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/vector.inc new file mode 100644 index 0000000000000..7168ec2bb7035 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/vector.inc @@ -0,0 +1,34 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [vector], class template vector + using std::vector; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [vector.erasure], erasure + using std::erase; + using std::erase_if; + + namespace pmr { + using std::pmr::vector; + } + + // hash support + using std::hash; + +#if _LIBCPP_STD_VER >= 23 + // [vector.bool.fmt], formatter specialization for vector + using std::formatter; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/prefix/share/libc++/v1/std/version.inc b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/version.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/prefix/share/libc++/v1/std/version.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/libcxx/modules/std.compat.cppm.in b/system/lib/libcxx/modules/std.compat.cppm.in new file mode 100644 index 0000000000000..dd7385bf33a42 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat.cppm.in @@ -0,0 +1,87 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// WARNING, this entire header is generated by +// utils/generate_libcxx_cppm_in.py +// DO NOT MODIFY! + +module; + +#include <__config> + +// The headers of Table 24: C++ library headers [tab:headers.cpp] +// and the headers of Table 25: C++ headers for C library facilities [tab:headers.cpp.c] +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// *** Headers not yet available *** +// +// This validation is mainly to catch when a new header is added but adding the +// corresponding .inc file is forgotten. However, the check based on __has_include +// alone doesn't work on Windows because the Windows SDK is on the include path, +// and that means the MSVC STL headers can be found as well, tricking __has_include +// into thinking that libc++ provides the header. +// +#ifndef _WIN32 +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +#endif // _WIN32 + +export module std.compat; +export import std; + + +@LIBCXX_MODULE_STD_COMPAT_INCLUDE_SOURCES@ \ No newline at end of file diff --git a/system/lib/libcxx/modules/std.compat/cassert.inc b/system/lib/libcxx/modules/std.compat/cassert.inc new file mode 100644 index 0000000000000..ac0533d14e9a9 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cassert.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // This module exports nothing. +} // export diff --git a/system/lib/libcxx/modules/std.compat/cctype.inc b/system/lib/libcxx/modules/std.compat/cctype.inc new file mode 100644 index 0000000000000..5cde12ddb38d7 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cctype.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::isalnum _LIBCPP_USING_IF_EXISTS; + using ::isalpha _LIBCPP_USING_IF_EXISTS; + using ::isblank _LIBCPP_USING_IF_EXISTS; + using ::iscntrl _LIBCPP_USING_IF_EXISTS; + using ::isdigit _LIBCPP_USING_IF_EXISTS; + using ::isgraph _LIBCPP_USING_IF_EXISTS; + using ::islower _LIBCPP_USING_IF_EXISTS; + using ::isprint _LIBCPP_USING_IF_EXISTS; + using ::ispunct _LIBCPP_USING_IF_EXISTS; + using ::isspace _LIBCPP_USING_IF_EXISTS; + using ::isupper _LIBCPP_USING_IF_EXISTS; + using ::isxdigit _LIBCPP_USING_IF_EXISTS; + using ::tolower _LIBCPP_USING_IF_EXISTS; + using ::toupper _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/std.compat/cerrno.inc b/system/lib/libcxx/modules/std.compat/cerrno.inc new file mode 100644 index 0000000000000..ac0533d14e9a9 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cerrno.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // This module exports nothing. +} // export diff --git a/system/lib/libcxx/modules/std.compat/cfenv.inc b/system/lib/libcxx/modules/std.compat/cfenv.inc new file mode 100644 index 0000000000000..5a373f6469712 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cfenv.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // types + using ::fenv_t _LIBCPP_USING_IF_EXISTS; + using ::fexcept_t _LIBCPP_USING_IF_EXISTS; + + // functions + using ::feclearexcept _LIBCPP_USING_IF_EXISTS; + using ::fegetexceptflag _LIBCPP_USING_IF_EXISTS; + using ::feraiseexcept _LIBCPP_USING_IF_EXISTS; + using ::fesetexceptflag _LIBCPP_USING_IF_EXISTS; + using ::fetestexcept _LIBCPP_USING_IF_EXISTS; + + using ::fegetround _LIBCPP_USING_IF_EXISTS; + using ::fesetround _LIBCPP_USING_IF_EXISTS; + + using ::fegetenv _LIBCPP_USING_IF_EXISTS; + using ::feholdexcept _LIBCPP_USING_IF_EXISTS; + using ::fesetenv _LIBCPP_USING_IF_EXISTS; + using ::feupdateenv _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/std.compat/cfloat.inc b/system/lib/libcxx/modules/std.compat/cfloat.inc new file mode 100644 index 0000000000000..ac0533d14e9a9 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cfloat.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // This module exports nothing. +} // export diff --git a/system/lib/libcxx/modules/std.compat/cinttypes.inc b/system/lib/libcxx/modules/std.compat/cinttypes.inc new file mode 100644 index 0000000000000..4789ec3310200 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cinttypes.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::imaxdiv_t _LIBCPP_USING_IF_EXISTS; + + using ::imaxabs _LIBCPP_USING_IF_EXISTS; + using ::imaxdiv _LIBCPP_USING_IF_EXISTS; + using ::strtoimax _LIBCPP_USING_IF_EXISTS; + using ::strtoumax _LIBCPP_USING_IF_EXISTS; + using ::wcstoimax _LIBCPP_USING_IF_EXISTS; + using ::wcstoumax _LIBCPP_USING_IF_EXISTS; + + // abs is conditionally here, but always present in cmath.cppm. To avoid + // conflicing declarations omit the using here. + + // div is conditionally here, but always present in cstdlib.cppm. To avoid + // conflicing declarations omit the using here. +} // export diff --git a/system/lib/libcxx/modules/std.compat/climits.inc b/system/lib/libcxx/modules/std.compat/climits.inc new file mode 100644 index 0000000000000..ac0533d14e9a9 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/climits.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // This module exports nothing. +} // export diff --git a/system/lib/libcxx/modules/std.compat/clocale.inc b/system/lib/libcxx/modules/std.compat/clocale.inc new file mode 100644 index 0000000000000..bc1c0c4d1adc9 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/clocale.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { +#if _LIBCPP_HAS_LOCALIZATION + using ::lconv _LIBCPP_USING_IF_EXISTS; + + using ::localeconv _LIBCPP_USING_IF_EXISTS; + using ::setlocale _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_LOCALIZATION +} // export diff --git a/system/lib/libcxx/modules/std.compat/cmath.inc b/system/lib/libcxx/modules/std.compat/cmath.inc new file mode 100644 index 0000000000000..6c86d0df57406 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cmath.inc @@ -0,0 +1,268 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::double_t _LIBCPP_USING_IF_EXISTS; + using ::float_t _LIBCPP_USING_IF_EXISTS; + + using ::acos _LIBCPP_USING_IF_EXISTS; + using ::acosf _LIBCPP_USING_IF_EXISTS; + using ::acosl _LIBCPP_USING_IF_EXISTS; + + using ::asin _LIBCPP_USING_IF_EXISTS; + using ::asinf _LIBCPP_USING_IF_EXISTS; + using ::asinl _LIBCPP_USING_IF_EXISTS; + + using ::atan _LIBCPP_USING_IF_EXISTS; + using ::atanf _LIBCPP_USING_IF_EXISTS; + using ::atanl _LIBCPP_USING_IF_EXISTS; + + using ::atan2 _LIBCPP_USING_IF_EXISTS; + using ::atan2f _LIBCPP_USING_IF_EXISTS; + using ::atan2l _LIBCPP_USING_IF_EXISTS; + + using ::cos _LIBCPP_USING_IF_EXISTS; + using ::cosf _LIBCPP_USING_IF_EXISTS; + using ::cosl _LIBCPP_USING_IF_EXISTS; + + using ::sin _LIBCPP_USING_IF_EXISTS; + using ::sinf _LIBCPP_USING_IF_EXISTS; + using ::sinl _LIBCPP_USING_IF_EXISTS; + + using ::tan _LIBCPP_USING_IF_EXISTS; + using ::tanf _LIBCPP_USING_IF_EXISTS; + using ::tanl _LIBCPP_USING_IF_EXISTS; + + using ::acosh _LIBCPP_USING_IF_EXISTS; + using ::acoshf _LIBCPP_USING_IF_EXISTS; + using ::acoshl _LIBCPP_USING_IF_EXISTS; + + using ::asinh _LIBCPP_USING_IF_EXISTS; + using ::asinhf _LIBCPP_USING_IF_EXISTS; + using ::asinhl _LIBCPP_USING_IF_EXISTS; + + using ::atanh _LIBCPP_USING_IF_EXISTS; + using ::atanhf _LIBCPP_USING_IF_EXISTS; + using ::atanhl _LIBCPP_USING_IF_EXISTS; + + using ::cosh _LIBCPP_USING_IF_EXISTS; + using ::coshf _LIBCPP_USING_IF_EXISTS; + using ::coshl _LIBCPP_USING_IF_EXISTS; + + using ::sinh _LIBCPP_USING_IF_EXISTS; + using ::sinhf _LIBCPP_USING_IF_EXISTS; + using ::sinhl _LIBCPP_USING_IF_EXISTS; + + using ::tanh _LIBCPP_USING_IF_EXISTS; + using ::tanhf _LIBCPP_USING_IF_EXISTS; + using ::tanhl _LIBCPP_USING_IF_EXISTS; + + using ::exp _LIBCPP_USING_IF_EXISTS; + using ::expf _LIBCPP_USING_IF_EXISTS; + using ::expl _LIBCPP_USING_IF_EXISTS; + + using ::exp2 _LIBCPP_USING_IF_EXISTS; + using ::exp2f _LIBCPP_USING_IF_EXISTS; + using ::exp2l _LIBCPP_USING_IF_EXISTS; + + using ::expm1 _LIBCPP_USING_IF_EXISTS; + using ::expm1f _LIBCPP_USING_IF_EXISTS; + using ::expm1l _LIBCPP_USING_IF_EXISTS; + + using ::frexp _LIBCPP_USING_IF_EXISTS; + using ::frexpf _LIBCPP_USING_IF_EXISTS; + using ::frexpl _LIBCPP_USING_IF_EXISTS; + + using ::ilogb _LIBCPP_USING_IF_EXISTS; + using ::ilogbf _LIBCPP_USING_IF_EXISTS; + using ::ilogbl _LIBCPP_USING_IF_EXISTS; + + using ::ldexp _LIBCPP_USING_IF_EXISTS; + using ::ldexpf _LIBCPP_USING_IF_EXISTS; + using ::ldexpl _LIBCPP_USING_IF_EXISTS; + + using ::log _LIBCPP_USING_IF_EXISTS; + using ::logf _LIBCPP_USING_IF_EXISTS; + using ::logl _LIBCPP_USING_IF_EXISTS; + + using ::log10 _LIBCPP_USING_IF_EXISTS; + using ::log10f _LIBCPP_USING_IF_EXISTS; + using ::log10l _LIBCPP_USING_IF_EXISTS; + + using ::log1p _LIBCPP_USING_IF_EXISTS; + using ::log1pf _LIBCPP_USING_IF_EXISTS; + using ::log1pl _LIBCPP_USING_IF_EXISTS; + + using ::log2 _LIBCPP_USING_IF_EXISTS; + using ::log2f _LIBCPP_USING_IF_EXISTS; + using ::log2l _LIBCPP_USING_IF_EXISTS; + + using ::logb _LIBCPP_USING_IF_EXISTS; + using ::logbf _LIBCPP_USING_IF_EXISTS; + using ::logbl _LIBCPP_USING_IF_EXISTS; + + using ::modf _LIBCPP_USING_IF_EXISTS; + using ::modff _LIBCPP_USING_IF_EXISTS; + using ::modfl _LIBCPP_USING_IF_EXISTS; + + using ::scalbn _LIBCPP_USING_IF_EXISTS; + using ::scalbnf _LIBCPP_USING_IF_EXISTS; + using ::scalbnl _LIBCPP_USING_IF_EXISTS; + + using ::scalbln _LIBCPP_USING_IF_EXISTS; + using ::scalblnf _LIBCPP_USING_IF_EXISTS; + using ::scalblnl _LIBCPP_USING_IF_EXISTS; + + using ::cbrt _LIBCPP_USING_IF_EXISTS; + using ::cbrtf _LIBCPP_USING_IF_EXISTS; + using ::cbrtl _LIBCPP_USING_IF_EXISTS; + + // [c.math.abs], absolute values + using ::abs _LIBCPP_USING_IF_EXISTS; + + using ::fabs _LIBCPP_USING_IF_EXISTS; + using ::fabsf _LIBCPP_USING_IF_EXISTS; + using ::fabsl _LIBCPP_USING_IF_EXISTS; + + using ::hypot _LIBCPP_USING_IF_EXISTS; + using ::hypotf _LIBCPP_USING_IF_EXISTS; + using ::hypotl _LIBCPP_USING_IF_EXISTS; + + // [c.math.hypot3], three-dimensional hypotenuse + + using ::pow _LIBCPP_USING_IF_EXISTS; + using ::powf _LIBCPP_USING_IF_EXISTS; + using ::powl _LIBCPP_USING_IF_EXISTS; + + using ::sqrt _LIBCPP_USING_IF_EXISTS; + using ::sqrtf _LIBCPP_USING_IF_EXISTS; + using ::sqrtl _LIBCPP_USING_IF_EXISTS; + + using ::erf _LIBCPP_USING_IF_EXISTS; + using ::erff _LIBCPP_USING_IF_EXISTS; + using ::erfl _LIBCPP_USING_IF_EXISTS; + + using ::erfc _LIBCPP_USING_IF_EXISTS; + using ::erfcf _LIBCPP_USING_IF_EXISTS; + using ::erfcl _LIBCPP_USING_IF_EXISTS; + + using ::lgamma _LIBCPP_USING_IF_EXISTS; + using ::lgammaf _LIBCPP_USING_IF_EXISTS; + using ::lgammal _LIBCPP_USING_IF_EXISTS; + + using ::tgamma _LIBCPP_USING_IF_EXISTS; + using ::tgammaf _LIBCPP_USING_IF_EXISTS; + using ::tgammal _LIBCPP_USING_IF_EXISTS; + + using ::ceil _LIBCPP_USING_IF_EXISTS; + using ::ceilf _LIBCPP_USING_IF_EXISTS; + using ::ceill _LIBCPP_USING_IF_EXISTS; + + using ::floor _LIBCPP_USING_IF_EXISTS; + using ::floorf _LIBCPP_USING_IF_EXISTS; + using ::floorl _LIBCPP_USING_IF_EXISTS; + + using ::nearbyint _LIBCPP_USING_IF_EXISTS; + using ::nearbyintf _LIBCPP_USING_IF_EXISTS; + using ::nearbyintl _LIBCPP_USING_IF_EXISTS; + + using ::rint _LIBCPP_USING_IF_EXISTS; + using ::rintf _LIBCPP_USING_IF_EXISTS; + using ::rintl _LIBCPP_USING_IF_EXISTS; + + using ::lrint _LIBCPP_USING_IF_EXISTS; + using ::lrintf _LIBCPP_USING_IF_EXISTS; + using ::lrintl _LIBCPP_USING_IF_EXISTS; + + using ::llrint _LIBCPP_USING_IF_EXISTS; + using ::llrintf _LIBCPP_USING_IF_EXISTS; + using ::llrintl _LIBCPP_USING_IF_EXISTS; + + using ::round _LIBCPP_USING_IF_EXISTS; + using ::roundf _LIBCPP_USING_IF_EXISTS; + using ::roundl _LIBCPP_USING_IF_EXISTS; + + using ::lround _LIBCPP_USING_IF_EXISTS; + using ::lroundf _LIBCPP_USING_IF_EXISTS; + using ::lroundl _LIBCPP_USING_IF_EXISTS; + + using ::llround _LIBCPP_USING_IF_EXISTS; + using ::llroundf _LIBCPP_USING_IF_EXISTS; + using ::llroundl _LIBCPP_USING_IF_EXISTS; + + using ::trunc _LIBCPP_USING_IF_EXISTS; + using ::truncf _LIBCPP_USING_IF_EXISTS; + using ::truncl _LIBCPP_USING_IF_EXISTS; + + using ::fmod _LIBCPP_USING_IF_EXISTS; + using ::fmodf _LIBCPP_USING_IF_EXISTS; + using ::fmodl _LIBCPP_USING_IF_EXISTS; + + using ::remainder _LIBCPP_USING_IF_EXISTS; + using ::remainderf _LIBCPP_USING_IF_EXISTS; + using ::remainderl _LIBCPP_USING_IF_EXISTS; + + using ::remquo _LIBCPP_USING_IF_EXISTS; + using ::remquof _LIBCPP_USING_IF_EXISTS; + using ::remquol _LIBCPP_USING_IF_EXISTS; + + using ::copysign _LIBCPP_USING_IF_EXISTS; + using ::copysignf _LIBCPP_USING_IF_EXISTS; + using ::copysignl _LIBCPP_USING_IF_EXISTS; + + using ::nan _LIBCPP_USING_IF_EXISTS; + using ::nanf _LIBCPP_USING_IF_EXISTS; + using ::nanl _LIBCPP_USING_IF_EXISTS; + + using ::nextafter _LIBCPP_USING_IF_EXISTS; + using ::nextafterf _LIBCPP_USING_IF_EXISTS; + using ::nextafterl _LIBCPP_USING_IF_EXISTS; + + using ::nexttoward _LIBCPP_USING_IF_EXISTS; + using ::nexttowardf _LIBCPP_USING_IF_EXISTS; + using ::nexttowardl _LIBCPP_USING_IF_EXISTS; + + using ::fdim _LIBCPP_USING_IF_EXISTS; + using ::fdimf _LIBCPP_USING_IF_EXISTS; + using ::fdiml _LIBCPP_USING_IF_EXISTS; + + using ::fmax _LIBCPP_USING_IF_EXISTS; + using ::fmaxf _LIBCPP_USING_IF_EXISTS; + using ::fmaxl _LIBCPP_USING_IF_EXISTS; + + using ::fmin _LIBCPP_USING_IF_EXISTS; + using ::fminf _LIBCPP_USING_IF_EXISTS; + using ::fminl _LIBCPP_USING_IF_EXISTS; + + using ::fma _LIBCPP_USING_IF_EXISTS; + using ::fmaf _LIBCPP_USING_IF_EXISTS; + using ::fmal _LIBCPP_USING_IF_EXISTS; + + // [c.math.lerp], linear interpolation + // [support.c.headers.other]/1 + // ... placed within the global namespace scope, except for the functions + // described in [sf.cmath], the std::lerp function overloads ([c.math.lerp]) + // ... + + // [c.math.fpclass], classification / comparison functions + using ::fpclassify _LIBCPP_USING_IF_EXISTS; + using ::isfinite _LIBCPP_USING_IF_EXISTS; + using ::isgreater _LIBCPP_USING_IF_EXISTS; + using ::isgreaterequal _LIBCPP_USING_IF_EXISTS; + using ::isinf _LIBCPP_USING_IF_EXISTS; + using ::isless _LIBCPP_USING_IF_EXISTS; + using ::islessequal _LIBCPP_USING_IF_EXISTS; + using ::islessgreater _LIBCPP_USING_IF_EXISTS; + using ::isnan _LIBCPP_USING_IF_EXISTS; + using ::isnormal _LIBCPP_USING_IF_EXISTS; + using ::isunordered _LIBCPP_USING_IF_EXISTS; + using ::signbit _LIBCPP_USING_IF_EXISTS; + + // [sf.cmath], mathematical special functions +} // export diff --git a/system/lib/libcxx/modules/std.compat/csetjmp.inc b/system/lib/libcxx/modules/std.compat/csetjmp.inc new file mode 100644 index 0000000000000..53e1421a2fbdd --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/csetjmp.inc @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::jmp_buf _LIBCPP_USING_IF_EXISTS; + using ::longjmp _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/std.compat/csignal.inc b/system/lib/libcxx/modules/std.compat/csignal.inc new file mode 100644 index 0000000000000..bf72459df1653 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/csignal.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::sig_atomic_t _LIBCPP_USING_IF_EXISTS; + + // [support.signal], signal handlers + using ::signal _LIBCPP_USING_IF_EXISTS; + + using ::raise _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/std.compat/cstdarg.inc b/system/lib/libcxx/modules/std.compat/cstdarg.inc new file mode 100644 index 0000000000000..79b5df4ec99ce --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cstdarg.inc @@ -0,0 +1,10 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { using ::va_list _LIBCPP_USING_IF_EXISTS; } // export diff --git a/system/lib/libcxx/modules/std.compat/cstddef.inc b/system/lib/libcxx/modules/std.compat/cstddef.inc new file mode 100644 index 0000000000000..8704a31e01f32 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cstddef.inc @@ -0,0 +1,22 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::max_align_t _LIBCPP_USING_IF_EXISTS; + using ::nullptr_t; + using ::ptrdiff_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + + // [support.c.headers]/1 + // ... placed within the global namespace scope, except for ... the + // declaration of std::byte ([cstddef.syn]), and the functions and + // function templates described in [support.types.byteops]. ... + + // [support.types.byteops], byte type operations +} // export diff --git a/system/lib/libcxx/modules/std.compat/cstdint.inc b/system/lib/libcxx/modules/std.compat/cstdint.inc new file mode 100644 index 0000000000000..a8dd6898cb266 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cstdint.inc @@ -0,0 +1,50 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // signed + using ::int8_t _LIBCPP_USING_IF_EXISTS; + using ::int16_t _LIBCPP_USING_IF_EXISTS; + using ::int32_t _LIBCPP_USING_IF_EXISTS; + using ::int64_t _LIBCPP_USING_IF_EXISTS; + + using ::int_fast16_t _LIBCPP_USING_IF_EXISTS; + using ::int_fast32_t _LIBCPP_USING_IF_EXISTS; + using ::int_fast64_t _LIBCPP_USING_IF_EXISTS; + using ::int_fast8_t _LIBCPP_USING_IF_EXISTS; + + using ::int_least16_t _LIBCPP_USING_IF_EXISTS; + using ::int_least32_t _LIBCPP_USING_IF_EXISTS; + using ::int_least64_t _LIBCPP_USING_IF_EXISTS; + using ::int_least8_t _LIBCPP_USING_IF_EXISTS; + + using ::intmax_t _LIBCPP_USING_IF_EXISTS; + + using ::intptr_t _LIBCPP_USING_IF_EXISTS; + + // unsigned + using ::uint8_t _LIBCPP_USING_IF_EXISTS; + using ::uint16_t _LIBCPP_USING_IF_EXISTS; + using ::uint32_t _LIBCPP_USING_IF_EXISTS; + using ::uint64_t _LIBCPP_USING_IF_EXISTS; + + using ::uint_fast16_t _LIBCPP_USING_IF_EXISTS; + using ::uint_fast32_t _LIBCPP_USING_IF_EXISTS; + using ::uint_fast64_t _LIBCPP_USING_IF_EXISTS; + using ::uint_fast8_t _LIBCPP_USING_IF_EXISTS; + + using ::uint_least16_t _LIBCPP_USING_IF_EXISTS; + using ::uint_least32_t _LIBCPP_USING_IF_EXISTS; + using ::uint_least64_t _LIBCPP_USING_IF_EXISTS; + using ::uint_least8_t _LIBCPP_USING_IF_EXISTS; + + using ::uintmax_t _LIBCPP_USING_IF_EXISTS; + + using ::uintptr_t _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/std.compat/cstdio.inc b/system/lib/libcxx/modules/std.compat/cstdio.inc new file mode 100644 index 0000000000000..33dd2cbfb0d7c --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cstdio.inc @@ -0,0 +1,61 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::FILE _LIBCPP_USING_IF_EXISTS; + using ::fpos_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + + using ::clearerr _LIBCPP_USING_IF_EXISTS; + using ::fclose _LIBCPP_USING_IF_EXISTS; + using ::feof _LIBCPP_USING_IF_EXISTS; + using ::ferror _LIBCPP_USING_IF_EXISTS; + using ::fflush _LIBCPP_USING_IF_EXISTS; + using ::fgetc _LIBCPP_USING_IF_EXISTS; + using ::fgetpos _LIBCPP_USING_IF_EXISTS; + using ::fgets _LIBCPP_USING_IF_EXISTS; + using ::fopen _LIBCPP_USING_IF_EXISTS; + using ::fprintf _LIBCPP_USING_IF_EXISTS; + using ::fputc _LIBCPP_USING_IF_EXISTS; + using ::fputs _LIBCPP_USING_IF_EXISTS; + using ::fread _LIBCPP_USING_IF_EXISTS; + using ::freopen _LIBCPP_USING_IF_EXISTS; + using ::fscanf _LIBCPP_USING_IF_EXISTS; + using ::fseek _LIBCPP_USING_IF_EXISTS; + using ::fsetpos _LIBCPP_USING_IF_EXISTS; + using ::ftell _LIBCPP_USING_IF_EXISTS; + using ::fwrite _LIBCPP_USING_IF_EXISTS; + using ::getc _LIBCPP_USING_IF_EXISTS; + using ::getchar _LIBCPP_USING_IF_EXISTS; + using ::perror _LIBCPP_USING_IF_EXISTS; + using ::printf _LIBCPP_USING_IF_EXISTS; + using ::putc _LIBCPP_USING_IF_EXISTS; + using ::putchar _LIBCPP_USING_IF_EXISTS; + using ::puts _LIBCPP_USING_IF_EXISTS; + using ::remove _LIBCPP_USING_IF_EXISTS; + using ::rename _LIBCPP_USING_IF_EXISTS; + using ::rewind _LIBCPP_USING_IF_EXISTS; + using ::scanf _LIBCPP_USING_IF_EXISTS; + using ::setbuf _LIBCPP_USING_IF_EXISTS; + using ::setvbuf _LIBCPP_USING_IF_EXISTS; + using ::snprintf _LIBCPP_USING_IF_EXISTS; + using ::sprintf _LIBCPP_USING_IF_EXISTS; + using ::sscanf _LIBCPP_USING_IF_EXISTS; + using ::tmpfile _LIBCPP_USING_IF_EXISTS; + using ::tmpnam _LIBCPP_USING_IF_EXISTS; + using ::ungetc _LIBCPP_USING_IF_EXISTS; + using ::vfprintf _LIBCPP_USING_IF_EXISTS; + using ::vfscanf _LIBCPP_USING_IF_EXISTS; + using ::vprintf _LIBCPP_USING_IF_EXISTS; + using ::vscanf _LIBCPP_USING_IF_EXISTS; + using ::vsnprintf _LIBCPP_USING_IF_EXISTS; + using ::vsprintf _LIBCPP_USING_IF_EXISTS; + using ::vsscanf _LIBCPP_USING_IF_EXISTS; + +} // export diff --git a/system/lib/libcxx/modules/std.compat/cstdlib.inc b/system/lib/libcxx/modules/std.compat/cstdlib.inc new file mode 100644 index 0000000000000..84583d9efa59b --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cstdlib.inc @@ -0,0 +1,72 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::div_t _LIBCPP_USING_IF_EXISTS; + using ::ldiv_t _LIBCPP_USING_IF_EXISTS; + using ::lldiv_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + + // [support.start.term], start and termination + using ::_Exit _LIBCPP_USING_IF_EXISTS; + using ::abort _LIBCPP_USING_IF_EXISTS; + using ::at_quick_exit _LIBCPP_USING_IF_EXISTS; + using ::atexit _LIBCPP_USING_IF_EXISTS; + using ::exit _LIBCPP_USING_IF_EXISTS; + using ::quick_exit _LIBCPP_USING_IF_EXISTS; + + using ::getenv _LIBCPP_USING_IF_EXISTS; + using ::system _LIBCPP_USING_IF_EXISTS; + + // [c.malloc], C library memory allocation + using ::aligned_alloc _LIBCPP_USING_IF_EXISTS; + using ::calloc _LIBCPP_USING_IF_EXISTS; + using ::free _LIBCPP_USING_IF_EXISTS; + using ::malloc _LIBCPP_USING_IF_EXISTS; + using ::realloc _LIBCPP_USING_IF_EXISTS; + + using ::atof _LIBCPP_USING_IF_EXISTS; + using ::atoi _LIBCPP_USING_IF_EXISTS; + using ::atol _LIBCPP_USING_IF_EXISTS; + using ::atoll _LIBCPP_USING_IF_EXISTS; + using ::strtod _LIBCPP_USING_IF_EXISTS; + using ::strtof _LIBCPP_USING_IF_EXISTS; + using ::strtol _LIBCPP_USING_IF_EXISTS; + using ::strtold _LIBCPP_USING_IF_EXISTS; + using ::strtoll _LIBCPP_USING_IF_EXISTS; + using ::strtoul _LIBCPP_USING_IF_EXISTS; + using ::strtoull _LIBCPP_USING_IF_EXISTS; + + // [c.mb.wcs], multibyte / wide string and character conversion functions + using ::mblen _LIBCPP_USING_IF_EXISTS; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using ::mbstowcs _LIBCPP_USING_IF_EXISTS; + using ::mbtowc _LIBCPP_USING_IF_EXISTS; + using ::wcstombs _LIBCPP_USING_IF_EXISTS; + using ::wctomb _LIBCPP_USING_IF_EXISTS; +#endif + // [alg.c.library], C standard library algorithms + using ::bsearch _LIBCPP_USING_IF_EXISTS; + using ::qsort _LIBCPP_USING_IF_EXISTS; + + // [c.math.rand], low-quality random number generation + using ::rand _LIBCPP_USING_IF_EXISTS; + using ::srand _LIBCPP_USING_IF_EXISTS; + + // [c.math.abs], absolute values + using ::abs _LIBCPP_USING_IF_EXISTS; + + using ::labs _LIBCPP_USING_IF_EXISTS; + using ::llabs _LIBCPP_USING_IF_EXISTS; + + using ::div _LIBCPP_USING_IF_EXISTS; + using ::ldiv _LIBCPP_USING_IF_EXISTS; + using ::lldiv _LIBCPP_USING_IF_EXISTS; + +} // export diff --git a/system/lib/libcxx/modules/std.compat/cstring.inc b/system/lib/libcxx/modules/std.compat/cstring.inc new file mode 100644 index 0000000000000..5029a7674bb21 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cstring.inc @@ -0,0 +1,36 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::size_t _LIBCPP_USING_IF_EXISTS; + + using ::memchr _LIBCPP_USING_IF_EXISTS; + using ::memcmp _LIBCPP_USING_IF_EXISTS; + using ::memcpy _LIBCPP_USING_IF_EXISTS; + using ::memmove _LIBCPP_USING_IF_EXISTS; + using ::memset _LIBCPP_USING_IF_EXISTS; + using ::strcat _LIBCPP_USING_IF_EXISTS; + using ::strchr _LIBCPP_USING_IF_EXISTS; + using ::strcmp _LIBCPP_USING_IF_EXISTS; + using ::strcoll _LIBCPP_USING_IF_EXISTS; + using ::strcpy _LIBCPP_USING_IF_EXISTS; + using ::strcspn _LIBCPP_USING_IF_EXISTS; + using ::strerror _LIBCPP_USING_IF_EXISTS; + using ::strlen _LIBCPP_USING_IF_EXISTS; + using ::strncat _LIBCPP_USING_IF_EXISTS; + using ::strncmp _LIBCPP_USING_IF_EXISTS; + using ::strncpy _LIBCPP_USING_IF_EXISTS; + using ::strpbrk _LIBCPP_USING_IF_EXISTS; + using ::strrchr _LIBCPP_USING_IF_EXISTS; + using ::strspn _LIBCPP_USING_IF_EXISTS; + using ::strstr _LIBCPP_USING_IF_EXISTS; + using ::strtok _LIBCPP_USING_IF_EXISTS; + using ::strxfrm _LIBCPP_USING_IF_EXISTS; + +} // export diff --git a/system/lib/libcxx/modules/std.compat/ctime.inc b/system/lib/libcxx/modules/std.compat/ctime.inc new file mode 100644 index 0000000000000..eba8234a08969 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/ctime.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + using ::clock_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + using ::time_t _LIBCPP_USING_IF_EXISTS; + + using ::timespec _LIBCPP_USING_IF_EXISTS; + using ::tm _LIBCPP_USING_IF_EXISTS; + + using ::asctime _LIBCPP_USING_IF_EXISTS; + using ::clock _LIBCPP_USING_IF_EXISTS; + using ::ctime _LIBCPP_USING_IF_EXISTS; + using ::difftime _LIBCPP_USING_IF_EXISTS; + using ::gmtime _LIBCPP_USING_IF_EXISTS; + using ::localtime _LIBCPP_USING_IF_EXISTS; + using ::mktime _LIBCPP_USING_IF_EXISTS; + using ::strftime _LIBCPP_USING_IF_EXISTS; + using ::time _LIBCPP_USING_IF_EXISTS; + using ::timespec_get _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/std.compat/cuchar.inc b/system/lib/libcxx/modules/std.compat/cuchar.inc new file mode 100644 index 0000000000000..119a8511252bf --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cuchar.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { + // Note the Standard does not mark these symbols optional, but libc++'s header + // does. So this seems strictly not to be conforming. + + // mbstate_t is conditionally here, but always present in cwchar.cppm. To avoid + // conflicing declarations omit the using here. + + // size_t is conditionally here, but always present in cstddef.cppm. To avoid + // conflicing declarations omit the using here. + +#if _LIBCPP_HAS_C8RTOMB_MBRTOC8 + using ::mbrtoc8 _LIBCPP_USING_IF_EXISTS; + using ::c8rtomb _LIBCPP_USING_IF_EXISTS; +#endif + using ::mbrtoc16 _LIBCPP_USING_IF_EXISTS; + using ::c16rtomb _LIBCPP_USING_IF_EXISTS; + using ::mbrtoc32 _LIBCPP_USING_IF_EXISTS; + using ::c32rtomb _LIBCPP_USING_IF_EXISTS; +} // export diff --git a/system/lib/libcxx/modules/std.compat/cwchar.inc b/system/lib/libcxx/modules/std.compat/cwchar.inc new file mode 100644 index 0000000000000..38df15653e4a1 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cwchar.inc @@ -0,0 +1,80 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { +#if _LIBCPP_HAS_WIDE_CHARACTERS + using ::mbstate_t _LIBCPP_USING_IF_EXISTS; + using ::size_t _LIBCPP_USING_IF_EXISTS; + using ::wint_t _LIBCPP_USING_IF_EXISTS; + + using ::tm _LIBCPP_USING_IF_EXISTS; + + using ::btowc _LIBCPP_USING_IF_EXISTS; + using ::fgetwc _LIBCPP_USING_IF_EXISTS; + using ::fgetws _LIBCPP_USING_IF_EXISTS; + using ::fputwc _LIBCPP_USING_IF_EXISTS; + using ::fputws _LIBCPP_USING_IF_EXISTS; + using ::fwide _LIBCPP_USING_IF_EXISTS; + using ::fwprintf _LIBCPP_USING_IF_EXISTS; + using ::fwscanf _LIBCPP_USING_IF_EXISTS; + using ::getwc _LIBCPP_USING_IF_EXISTS; + using ::getwchar _LIBCPP_USING_IF_EXISTS; + using ::putwc _LIBCPP_USING_IF_EXISTS; + using ::putwchar _LIBCPP_USING_IF_EXISTS; + using ::swprintf _LIBCPP_USING_IF_EXISTS; + using ::swscanf _LIBCPP_USING_IF_EXISTS; + using ::ungetwc _LIBCPP_USING_IF_EXISTS; + using ::vfwprintf _LIBCPP_USING_IF_EXISTS; + using ::vfwscanf _LIBCPP_USING_IF_EXISTS; + using ::vswprintf _LIBCPP_USING_IF_EXISTS; + using ::vswscanf _LIBCPP_USING_IF_EXISTS; + using ::vwprintf _LIBCPP_USING_IF_EXISTS; + using ::vwscanf _LIBCPP_USING_IF_EXISTS; + using ::wcscat _LIBCPP_USING_IF_EXISTS; + using ::wcschr _LIBCPP_USING_IF_EXISTS; + using ::wcscmp _LIBCPP_USING_IF_EXISTS; + using ::wcscoll _LIBCPP_USING_IF_EXISTS; + using ::wcscpy _LIBCPP_USING_IF_EXISTS; + using ::wcscspn _LIBCPP_USING_IF_EXISTS; + using ::wcsftime _LIBCPP_USING_IF_EXISTS; + using ::wcslen _LIBCPP_USING_IF_EXISTS; + using ::wcsncat _LIBCPP_USING_IF_EXISTS; + using ::wcsncmp _LIBCPP_USING_IF_EXISTS; + using ::wcsncpy _LIBCPP_USING_IF_EXISTS; + using ::wcspbrk _LIBCPP_USING_IF_EXISTS; + using ::wcsrchr _LIBCPP_USING_IF_EXISTS; + using ::wcsspn _LIBCPP_USING_IF_EXISTS; + using ::wcsstr _LIBCPP_USING_IF_EXISTS; + using ::wcstod _LIBCPP_USING_IF_EXISTS; + using ::wcstof _LIBCPP_USING_IF_EXISTS; + using ::wcstok _LIBCPP_USING_IF_EXISTS; + using ::wcstol _LIBCPP_USING_IF_EXISTS; + using ::wcstold _LIBCPP_USING_IF_EXISTS; + using ::wcstoll _LIBCPP_USING_IF_EXISTS; + using ::wcstoul _LIBCPP_USING_IF_EXISTS; + using ::wcstoull _LIBCPP_USING_IF_EXISTS; + using ::wcsxfrm _LIBCPP_USING_IF_EXISTS; + using ::wctob _LIBCPP_USING_IF_EXISTS; + using ::wmemchr _LIBCPP_USING_IF_EXISTS; + using ::wmemcmp _LIBCPP_USING_IF_EXISTS; + using ::wmemcpy _LIBCPP_USING_IF_EXISTS; + using ::wmemmove _LIBCPP_USING_IF_EXISTS; + using ::wmemset _LIBCPP_USING_IF_EXISTS; + using ::wprintf _LIBCPP_USING_IF_EXISTS; + using ::wscanf _LIBCPP_USING_IF_EXISTS; + + // [c.mb.wcs], multibyte / wide string and character conversion functions + using ::mbrlen _LIBCPP_USING_IF_EXISTS; + using ::mbrtowc _LIBCPP_USING_IF_EXISTS; + using ::mbsinit _LIBCPP_USING_IF_EXISTS; + using ::mbsrtowcs _LIBCPP_USING_IF_EXISTS; + using ::wcrtomb _LIBCPP_USING_IF_EXISTS; + using ::wcsrtombs _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_WIDE_CHARACTERS +} // export diff --git a/system/lib/libcxx/modules/std.compat/cwctype.inc b/system/lib/libcxx/modules/std.compat/cwctype.inc new file mode 100644 index 0000000000000..d9c3c6556d490 --- /dev/null +++ b/system/lib/libcxx/modules/std.compat/cwctype.inc @@ -0,0 +1,35 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export { +#if _LIBCPP_HAS_WIDE_CHARACTERS + using ::wctrans_t _LIBCPP_USING_IF_EXISTS; + using ::wctype_t _LIBCPP_USING_IF_EXISTS; + using ::wint_t _LIBCPP_USING_IF_EXISTS; + + using ::iswalnum _LIBCPP_USING_IF_EXISTS; + using ::iswalpha _LIBCPP_USING_IF_EXISTS; + using ::iswblank _LIBCPP_USING_IF_EXISTS; + using ::iswcntrl _LIBCPP_USING_IF_EXISTS; + using ::iswctype _LIBCPP_USING_IF_EXISTS; + using ::iswdigit _LIBCPP_USING_IF_EXISTS; + using ::iswgraph _LIBCPP_USING_IF_EXISTS; + using ::iswlower _LIBCPP_USING_IF_EXISTS; + using ::iswprint _LIBCPP_USING_IF_EXISTS; + using ::iswpunct _LIBCPP_USING_IF_EXISTS; + using ::iswspace _LIBCPP_USING_IF_EXISTS; + using ::iswupper _LIBCPP_USING_IF_EXISTS; + using ::iswxdigit _LIBCPP_USING_IF_EXISTS; + using ::towctrans _LIBCPP_USING_IF_EXISTS; + using ::towlower _LIBCPP_USING_IF_EXISTS; + using ::towupper _LIBCPP_USING_IF_EXISTS; + using ::wctrans _LIBCPP_USING_IF_EXISTS; + using ::wctype _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_WIDE_CHARACTERS +} // export diff --git a/system/lib/libcxx/modules/std.cppm.in b/system/lib/libcxx/modules/std.cppm.in new file mode 100644 index 0000000000000..984b18321923c --- /dev/null +++ b/system/lib/libcxx/modules/std.cppm.in @@ -0,0 +1,170 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// WARNING, this entire header is generated by +// utils/generate_libcxx_cppm_in.py +// DO NOT MODIFY! + +module; + +#include <__config> + +// The headers of Table 24: C++ library headers [tab:headers.cpp] +// and the headers of Table 25: C++ headers for C library facilities [tab:headers.cpp.c] +#include +#include +#include +#if _LIBCPP_HAS_ATOMIC_HEADER +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// *** Headers not yet available *** +// +// This validation is mainly to catch when a new header is added but adding the +// corresponding .inc file is forgotten. However, the check based on __has_include +// alone doesn't work on Windows because the Windows SDK is on the include path, +// and that means the MSVC STL headers can be found as well, tricking __has_include +// into thinking that libc++ provides the header. +// +#ifndef _WIN32 +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +# if __has_include() +# error "please update the header information for in headers_not_available in utils/libcxx/header_information.py" +# endif // __has_include() +#endif // _WIN32 + +export module std; + + +@LIBCXX_MODULE_STD_INCLUDE_SOURCES@ diff --git a/system/lib/libcxx/modules/std/algorithm.inc b/system/lib/libcxx/modules/std/algorithm.inc new file mode 100644 index 0000000000000..95c05f01e5562 --- /dev/null +++ b/system/lib/libcxx/modules/std/algorithm.inc @@ -0,0 +1,624 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + namespace ranges { + // [algorithms.results], algorithm result types + using std::ranges::in_found_result; + using std::ranges::in_fun_result; + using std::ranges::in_in_out_result; + using std::ranges::in_in_result; + using std::ranges::in_out_out_result; + using std::ranges::in_out_result; +#if _LIBCPP_STD_VER >= 23 + using std::ranges::in_value_result; +#endif + using std::ranges::min_max_result; +#if _LIBCPP_STD_VER >= 23 + using std::ranges::out_value_result; +#endif + } // namespace ranges + + // [alg.nonmodifying], non-modifying sequence operations + // [alg.all.of], all of + using std::all_of; + namespace ranges { + using std::ranges::all_of; + } + + // [alg.any.of], any of + using std::any_of; + namespace ranges { + using std::ranges::any_of; + } + + // [alg.none.of], none of + using std::none_of; + namespace ranges { + using std::ranges::none_of; + } + +#if _LIBCPP_STD_VER >= 23 + // [alg.contains], contains + namespace ranges { + using std::ranges::contains; + using std::ranges::contains_subrange; + } // namespace ranges +#endif // _LIBCPP_STD_VER >= 23 + + // [alg.foreach], for each + using std::for_each; + + namespace ranges { + using std::ranges::for_each; + using std::ranges::for_each_result; + } // namespace ranges + + using std::for_each_n; + + namespace ranges { + using std::ranges::for_each_n_result; + + using std::ranges::for_each_n; + } // namespace ranges + + // [alg.find], find + using std::find; + using std::find_if; + using std::find_if_not; + + namespace ranges { + using std::ranges::find; + using std::ranges::find_if; + using std::ranges::find_if_not; + } // namespace ranges + +#if _LIBCPP_STD_VER >= 23 + // [alg.find.last], find last + namespace ranges { + using std::ranges::find_last; + using std::ranges::find_last_if; + using std::ranges::find_last_if_not; + } // namespace ranges +#endif + + // [alg.find.end], find end + using std::find_end; + + namespace ranges { + using std::ranges::find_end; + } + + // [alg.find.first.of], find first + using std::find_first_of; + + namespace ranges { + using std::ranges::find_first_of; + } + + // [alg.adjacent.find], adjacent find + using std::adjacent_find; + + namespace ranges { + using std::ranges::adjacent_find; + } + + // [alg.count], count + using std::count; + using std::count_if; + + namespace ranges { + using std::ranges::count; + using std::ranges::count_if; + } // namespace ranges + + // [mismatch], mismatch + using std::mismatch; + + namespace ranges { + using std::ranges::mismatch_result; + + using std::ranges::mismatch; + } // namespace ranges + + // [alg.equal], equal + using std::equal; + + namespace ranges { + using std::ranges::equal; + } + + // [alg.is.permutation], is permutation + using std::is_permutation; + + namespace ranges { + using std::ranges::is_permutation; + } + + // [alg.search], search + using std::search; + + namespace ranges { + using std::ranges::search; + } + + using std::search_n; + + namespace ranges { + using std::ranges::search_n; + } + + namespace ranges { +#if _LIBCPP_STD_VER >= 23 + // [alg.starts.with], starts with + using std::ranges::starts_with; + + // [alg.ends.with], ends with + using std::ranges::ends_with; + + // [alg.fold], fold + using std::ranges::fold_left; + using std::ranges::fold_left_with_iter; + using std::ranges::fold_left_with_iter_result; +# if 0 + using std::ranges::fold_left_first; + using std::ranges::fold_right; + using std::ranges::fold_right_last; + using std::ranges::fold_left_with_iter; + using std::ranges::fold_left_first_with_iter; + using std::ranges::fold_left_first_with_iter; +# endif +#endif // _LIBCPP_STD_VER >= 23 + } // namespace ranges + + // [alg.modifying.operations], mutating sequence operations + // [alg.copy], copy + using std::copy; + + namespace ranges { + using std::ranges::copy; + using std::ranges::copy_result; + } // namespace ranges + + using std::copy_n; + + namespace ranges { + using std::ranges::copy_n; + using std::ranges::copy_n_result; + } // namespace ranges + + using std::copy_if; + + namespace ranges { + using std::ranges::copy_if; + using std::ranges::copy_if_result; + } // namespace ranges + + using std::copy_backward; + + namespace ranges { + using std::ranges::copy_backward; + using std::ranges::copy_backward_result; + } // namespace ranges + + // [alg.move], move + using std::move; + + namespace ranges { + using std::ranges::move; + using std::ranges::move_result; + } // namespace ranges + + using std::move_backward; + + namespace ranges { + using std::ranges::move_backward; + using std::ranges::move_backward_result; + } // namespace ranges + + // [alg.swap], swap + using std::swap_ranges; + + namespace ranges { + using std::ranges::swap_ranges; + using std::ranges::swap_ranges_result; + } // namespace ranges + + using std::iter_swap; + + // [alg.transform], transform + using std::transform; + + namespace ranges { + using std::ranges::binary_transform_result; + using std::ranges::unary_transform_result; + + using std::ranges::transform; + + } // namespace ranges + + using std::replace; + using std::replace_if; + + namespace ranges { + using std::ranges::replace; + using std::ranges::replace_if; + } // namespace ranges + + using std::replace_copy; + using std::replace_copy_if; + + namespace ranges { + using std::ranges::replace_copy; + using std::ranges::replace_copy_if; + using std::ranges::replace_copy_if_result; + using std::ranges::replace_copy_result; + } // namespace ranges + + // [alg.fill], fill + using std::fill; + using std::fill_n; + + namespace ranges { + using std::ranges::fill; + using std::ranges::fill_n; + } // namespace ranges + + // [alg.generate], generate + using std::generate; + using std::generate_n; + + namespace ranges { + using std::ranges::generate; + using std::ranges::generate_n; + } // namespace ranges + + // [alg.remove], remove + using std::remove; + using std::remove_if; + + namespace ranges { + using std::ranges::remove; + using std::ranges::remove_if; + } // namespace ranges + + using std::remove_copy; + using std::remove_copy_if; + namespace ranges { + using std::ranges::remove_copy; + using std::ranges::remove_copy_if; + using std::ranges::remove_copy_if_result; + using std::ranges::remove_copy_result; + } // namespace ranges + + // [alg.unique], unique + using std::unique; + + namespace ranges { + using std::ranges::unique; + } + + using std::unique_copy; + + namespace ranges { + using std::ranges::unique_copy; + using std::ranges::unique_copy_result; + } // namespace ranges + + // [alg.reverse], reverse + using std::reverse; + + namespace ranges { + using std::ranges::reverse; + } + + using std::reverse_copy; + + namespace ranges { + using std::ranges::reverse_copy; + using std::ranges::reverse_copy_result; + } // namespace ranges + + // [alg.rotate], rotate + using std::rotate; + + namespace ranges { + using std::ranges::rotate; + } + + using std::rotate_copy; + + namespace ranges { + using std::ranges::rotate_copy; + using std::ranges::rotate_copy_result; + } // namespace ranges + + // [alg.random.sample], sample + using std::sample; + + namespace ranges { + using std::ranges::sample; + } + + // [alg.random.shuffle], shuffle + using std::shuffle; + + namespace ranges { + using std::ranges::shuffle; + } + + // [alg.shift], shift + using std::shift_left; + + namespace ranges { + // using std::ranges::shift_left; + } + + using std::shift_right; + + namespace ranges { + // using std::ranges::shift_right; + } + + // [alg.sorting], sorting and related operations + // [alg.sort], sorting + using std::sort; + + namespace ranges { + using std::ranges::sort; + } + + using std::stable_sort; + + namespace ranges { + using std::ranges::stable_sort; + } + + using std::partial_sort; + + namespace ranges { + using std::ranges::partial_sort; + } + using std::partial_sort_copy; + + namespace ranges { + using std::ranges::partial_sort_copy; + using std::ranges::partial_sort_copy_result; + } // namespace ranges + + using std::is_sorted; + using std::is_sorted_until; + + namespace ranges { + using std::ranges::is_sorted; + using std::ranges::is_sorted_until; + } // namespace ranges + + // [alg.nth.element], Nth element + using std::nth_element; + + namespace ranges { + using std::ranges::nth_element; + } + + // [alg.binary.search], binary search + using std::lower_bound; + + namespace ranges { + using std::ranges::lower_bound; + } + + using std::upper_bound; + + namespace ranges { + using std::ranges::upper_bound; + } + + using std::equal_range; + + namespace ranges { + using std::ranges::equal_range; + } + + using std::binary_search; + + namespace ranges { + using std::ranges::binary_search; + } + + // [alg.partitions], partitions + using std::is_partitioned; + + namespace ranges { + using std::ranges::is_partitioned; + } + + using std::partition; + + namespace ranges { + using std::ranges::partition; + } + + using std::stable_partition; + + namespace ranges { + using std::ranges::stable_partition; + } + + using std::partition_copy; + + namespace ranges { + using std::ranges::partition_copy; + using std::ranges::partition_copy_result; + } // namespace ranges + + using std::partition_point; + + namespace ranges { + using std::ranges::partition_point; + } + // [alg.merge], merge + using std::merge; + namespace ranges { + using std::ranges::merge; + using std::ranges::merge_result; + } // namespace ranges + + using std::inplace_merge; + + namespace ranges { + using std::ranges::inplace_merge; + } + + // [alg.set.operations], set operations + using std::includes; + namespace ranges { + using std::ranges::includes; + } + + using std::set_union; + + namespace ranges { + using std::ranges::set_union; + using std::ranges::set_union_result; + } // namespace ranges + + using std::set_intersection; + namespace ranges { + using std::ranges::set_intersection; + using std::ranges::set_intersection_result; + } // namespace ranges + + using std::set_difference; + + namespace ranges { + using std::ranges::set_difference; + using std::ranges::set_difference_result; + } // namespace ranges + + using std::set_symmetric_difference; + + namespace ranges { + using std::ranges::set_symmetric_difference_result; + + using std::ranges::set_symmetric_difference; + } // namespace ranges + + // [alg.heap.operations], heap operations + using std::push_heap; + + namespace ranges { + using std::ranges::push_heap; + } + + using std::pop_heap; + + namespace ranges { + using std::ranges::pop_heap; + } + + using std::make_heap; + + namespace ranges { + using std::ranges::make_heap; + } + + using std::sort_heap; + + namespace ranges { + using std::ranges::sort_heap; + } + + using std::is_heap; + + namespace ranges { + using std::ranges::is_heap; + } + + using std::is_heap_until; + + namespace ranges { + using std::ranges::is_heap_until; + } + + // [alg.min.max], minimum and maximum + using std::min; + + namespace ranges { + using std::ranges::min; + } + + using std::max; + + namespace ranges { + using std::ranges::max; + } + + using std::minmax; + + namespace ranges { + using std::ranges::minmax_result; + + using std::ranges::minmax; + } // namespace ranges + + using std::min_element; + + namespace ranges { + using std::ranges::min_element; + } + + using std::max_element; + + namespace ranges { + using std::ranges::max_element; + } + + using std::minmax_element; + + namespace ranges { + using std::ranges::minmax_element_result; + + using std::ranges::minmax_element; + } // namespace ranges + // [alg.clamp], bounded value + using std::clamp; + + namespace ranges { + using std::ranges::clamp; + } + + // [alg.lex.comparison], lexicographical comparison + using std::lexicographical_compare; + + namespace ranges { + using std::ranges::lexicographical_compare; + } + + // [alg.three.way], three-way comparison algorithms + using std::lexicographical_compare_three_way; + + // [alg.permutation.generators], permutations + using std::next_permutation; + + namespace ranges { + using std::ranges::next_permutation_result; + + using std::ranges::next_permutation; + } // namespace ranges + + using std::prev_permutation; + + namespace ranges { + using std::ranges::prev_permutation_result; + + using std::ranges::prev_permutation; + } // namespace ranges + +} // namespace std diff --git a/system/lib/libcxx/modules/std/any.inc b/system/lib/libcxx/modules/std/any.inc new file mode 100644 index 0000000000000..c57257ede8490 --- /dev/null +++ b/system/lib/libcxx/modules/std/any.inc @@ -0,0 +1,23 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [any.bad.any.cast], class bad_any_cast + using std::bad_any_cast; + + // [any.class], class any + using std::any; + + // [any.nonmembers], non-member functions + using std::any_cast; + using std::make_any; + using std::swap; + +} // namespace std diff --git a/system/lib/libcxx/modules/std/array.inc b/system/lib/libcxx/modules/std/array.inc new file mode 100644 index 0000000000000..d55779c8bd128 --- /dev/null +++ b/system/lib/libcxx/modules/std/array.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [array], class template array + using std::array; + + using std::operator==; + using std::operator<=>; + + // [array.special], specialized algorithms + using std::swap; + + // [array.creation], array creation functions + using std::to_array; + + // [array.tuple], tuple interface + using std::get; + using std::tuple_element; + using std::tuple_size; + +} // namespace std diff --git a/system/lib/libcxx/modules/std/atomic.inc b/system/lib/libcxx/modules/std/atomic.inc new file mode 100644 index 0000000000000..9a30fb7affe71 --- /dev/null +++ b/system/lib/libcxx/modules/std/atomic.inc @@ -0,0 +1,141 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [atomics.order], order and consistency + using std::memory_order _LIBCPP_USING_IF_EXISTS; + using std::memory_order_acq_rel _LIBCPP_USING_IF_EXISTS; + using std::memory_order_acquire _LIBCPP_USING_IF_EXISTS; + using std::memory_order_consume _LIBCPP_USING_IF_EXISTS; + using std::memory_order_relaxed _LIBCPP_USING_IF_EXISTS; + using std::memory_order_release _LIBCPP_USING_IF_EXISTS; + using std::memory_order_seq_cst _LIBCPP_USING_IF_EXISTS; + + using std::kill_dependency _LIBCPP_USING_IF_EXISTS; + + // [atomics.ref.generic], class template atomic_ref + // [atomics.ref.pointer], partial specialization for pointers + using std::atomic_ref _LIBCPP_USING_IF_EXISTS; + + // [atomics.types.generic], class template atomic + using std::atomic _LIBCPP_USING_IF_EXISTS; + + // [atomics.nonmembers], non-member functions + using std::atomic_compare_exchange_strong _LIBCPP_USING_IF_EXISTS; + using std::atomic_compare_exchange_strong_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_compare_exchange_weak _LIBCPP_USING_IF_EXISTS; + using std::atomic_compare_exchange_weak_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_exchange _LIBCPP_USING_IF_EXISTS; + using std::atomic_exchange_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_is_lock_free _LIBCPP_USING_IF_EXISTS; + using std::atomic_load _LIBCPP_USING_IF_EXISTS; + using std::atomic_load_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_store _LIBCPP_USING_IF_EXISTS; + using std::atomic_store_explicit _LIBCPP_USING_IF_EXISTS; + + using std::atomic_fetch_add _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_add_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_and _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_and_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_or _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_or_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_sub _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_sub_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_xor _LIBCPP_USING_IF_EXISTS; + using std::atomic_fetch_xor_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_notify_all _LIBCPP_USING_IF_EXISTS; + using std::atomic_notify_one _LIBCPP_USING_IF_EXISTS; + using std::atomic_wait _LIBCPP_USING_IF_EXISTS; + using std::atomic_wait_explicit _LIBCPP_USING_IF_EXISTS; + + // [atomics.alias], type aliases + using std::atomic_bool _LIBCPP_USING_IF_EXISTS; + using std::atomic_char _LIBCPP_USING_IF_EXISTS; + using std::atomic_char16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_char32_t _LIBCPP_USING_IF_EXISTS; +#if _LIBCPP_HAS_CHAR8_T + using std::atomic_char8_t _LIBCPP_USING_IF_EXISTS; +#endif + using std::atomic_int _LIBCPP_USING_IF_EXISTS; + using std::atomic_llong _LIBCPP_USING_IF_EXISTS; + using std::atomic_long _LIBCPP_USING_IF_EXISTS; + using std::atomic_schar _LIBCPP_USING_IF_EXISTS; + using std::atomic_short _LIBCPP_USING_IF_EXISTS; + using std::atomic_uchar _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint _LIBCPP_USING_IF_EXISTS; + using std::atomic_ullong _LIBCPP_USING_IF_EXISTS; + using std::atomic_ulong _LIBCPP_USING_IF_EXISTS; + using std::atomic_ushort _LIBCPP_USING_IF_EXISTS; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::atomic_wchar_t _LIBCPP_USING_IF_EXISTS; +#endif + + using std::atomic_int16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int8_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint8_t _LIBCPP_USING_IF_EXISTS; + + using std::atomic_int_least16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_least32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_least64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_least8_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_least16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_least32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_least64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_least8_t _LIBCPP_USING_IF_EXISTS; + + using std::atomic_int_fast16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_fast32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_fast64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_int_fast8_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_fast16_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_fast32_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_fast64_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uint_fast8_t _LIBCPP_USING_IF_EXISTS; + + using std::atomic_intmax_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_intptr_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_ptrdiff_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_size_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uintmax_t _LIBCPP_USING_IF_EXISTS; + using std::atomic_uintptr_t _LIBCPP_USING_IF_EXISTS; + +#ifndef _LIBCPP_NO_LOCK_FREE_TYPES + using std::atomic_signed_lock_free _LIBCPP_USING_IF_EXISTS; + using std::atomic_unsigned_lock_free _LIBCPP_USING_IF_EXISTS; +#endif + + // [atomics.flag], flag type and operations + using std::atomic_flag _LIBCPP_USING_IF_EXISTS; + + using std::atomic_flag_clear _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_clear_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_test _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_test_and_set _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_test_and_set_explicit _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_test_explicit _LIBCPP_USING_IF_EXISTS; + + using std::atomic_flag_notify_all _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_notify_one _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_wait _LIBCPP_USING_IF_EXISTS; + using std::atomic_flag_wait_explicit _LIBCPP_USING_IF_EXISTS; + + // [atomics.fences], fences + using std::atomic_signal_fence _LIBCPP_USING_IF_EXISTS; + using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS; + + // [depr.atomics.nonmembers] + using std::atomic_init _LIBCPP_USING_IF_EXISTS; + +} // namespace std diff --git a/system/lib/libcxx/modules/std/barrier.inc b/system/lib/libcxx/modules/std/barrier.inc new file mode 100644 index 0000000000000..2d6a888b4d4fc --- /dev/null +++ b/system/lib/libcxx/modules/std/barrier.inc @@ -0,0 +1,14 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + using std::barrier; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/bit.inc b/system/lib/libcxx/modules/std/bit.inc new file mode 100644 index 0000000000000..027a6c17ad6a6 --- /dev/null +++ b/system/lib/libcxx/modules/std/bit.inc @@ -0,0 +1,38 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [bit.cast], bit_cast + using std::bit_cast; + +#if _LIBCPP_STD_VER >= 23 + // [bit.byteswap], byteswap + using std::byteswap; +#endif + + // [bit.pow.two], integral powers of 2 + using std::bit_ceil; + using std::bit_floor; + using std::bit_width; + using std::has_single_bit; + + // [bit.rotate], rotating + using std::rotl; + using std::rotr; + + // [bit.count], counting + using std::countl_one; + using std::countl_zero; + using std::countr_one; + using std::countr_zero; + using std::popcount; + + // [bit.endian], endian + using std::endian; +} // namespace std diff --git a/system/lib/libcxx/modules/std/bitset.inc b/system/lib/libcxx/modules/std/bitset.inc new file mode 100644 index 0000000000000..bb528860eb561 --- /dev/null +++ b/system/lib/libcxx/modules/std/bitset.inc @@ -0,0 +1,23 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::bitset; + + // [bitset.operators], bitset operators + using std::operator&; + using std::operator|; + using std::operator^; + using std::operator>>; + using std::operator<<; + + // [bitset.hash], hash support + using std::hash; + +} // namespace std diff --git a/system/lib/libcxx/modules/std/cassert.inc b/system/lib/libcxx/modules/std/cassert.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/std/cassert.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/libcxx/modules/std/cctype.inc b/system/lib/libcxx/modules/std/cctype.inc new file mode 100644 index 0000000000000..43417aa159624 --- /dev/null +++ b/system/lib/libcxx/modules/std/cctype.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::isalnum _LIBCPP_USING_IF_EXISTS; + using std::isalpha _LIBCPP_USING_IF_EXISTS; + using std::isblank _LIBCPP_USING_IF_EXISTS; + using std::iscntrl _LIBCPP_USING_IF_EXISTS; + using std::isdigit _LIBCPP_USING_IF_EXISTS; + using std::isgraph _LIBCPP_USING_IF_EXISTS; + using std::islower _LIBCPP_USING_IF_EXISTS; + using std::isprint _LIBCPP_USING_IF_EXISTS; + using std::ispunct _LIBCPP_USING_IF_EXISTS; + using std::isspace _LIBCPP_USING_IF_EXISTS; + using std::isupper _LIBCPP_USING_IF_EXISTS; + using std::isxdigit _LIBCPP_USING_IF_EXISTS; + using std::tolower _LIBCPP_USING_IF_EXISTS; + using std::toupper _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/std/cerrno.inc b/system/lib/libcxx/modules/std/cerrno.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/std/cerrno.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/libcxx/modules/std/cfenv.inc b/system/lib/libcxx/modules/std/cfenv.inc new file mode 100644 index 0000000000000..831c1fed8ebef --- /dev/null +++ b/system/lib/libcxx/modules/std/cfenv.inc @@ -0,0 +1,30 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // types + using std::fenv_t _LIBCPP_USING_IF_EXISTS; + using std::fexcept_t _LIBCPP_USING_IF_EXISTS; + + // functions + using std::feclearexcept _LIBCPP_USING_IF_EXISTS; + using std::fegetexceptflag _LIBCPP_USING_IF_EXISTS; + using std::feraiseexcept _LIBCPP_USING_IF_EXISTS; + using std::fesetexceptflag _LIBCPP_USING_IF_EXISTS; + using std::fetestexcept _LIBCPP_USING_IF_EXISTS; + + using std::fegetround _LIBCPP_USING_IF_EXISTS; + using std::fesetround _LIBCPP_USING_IF_EXISTS; + + using std::fegetenv _LIBCPP_USING_IF_EXISTS; + using std::feholdexcept _LIBCPP_USING_IF_EXISTS; + using std::fesetenv _LIBCPP_USING_IF_EXISTS; + using std::feupdateenv _LIBCPP_USING_IF_EXISTS; + +} // namespace std diff --git a/system/lib/libcxx/modules/std/cfloat.inc b/system/lib/libcxx/modules/std/cfloat.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/std/cfloat.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/libcxx/modules/std/charconv.inc b/system/lib/libcxx/modules/std/charconv.inc new file mode 100644 index 0000000000000..6fee460108d65 --- /dev/null +++ b/system/lib/libcxx/modules/std/charconv.inc @@ -0,0 +1,34 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // floating-point format for primitive numerical conversion + using std::chars_format; + + // chars_format is a bitmask type. + // [bitmask.types] specified operators + using std::operator&; + using std::operator&=; + using std::operator^; + using std::operator^=; + using std::operator|; + using std::operator|=; + using std::operator~; + + // [charconv.to.chars], primitive numerical output conversion + using std::to_chars_result; + + using std::to_chars; + + // [charconv.from.chars], primitive numerical input conversion + using std::from_chars_result; + + using std::from_chars; +} // namespace std diff --git a/system/lib/libcxx/modules/std/chrono.inc b/system/lib/libcxx/modules/std/chrono.inc new file mode 100644 index 0000000000000..66eccd8d290ad --- /dev/null +++ b/system/lib/libcxx/modules/std/chrono.inc @@ -0,0 +1,302 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + namespace chrono { + using std::chrono::duration; + using std::chrono::time_point; + + } // namespace chrono + + using std::common_type; + + namespace chrono { + + // [time.traits], customization traits + using std::chrono::treat_as_floating_point; + using std::chrono::treat_as_floating_point_v; + + using std::chrono::duration_values; + + // using std::chrono::is_clock; + // using std::chrono::is_clock_v; + + // [time.duration.nonmember], duration arithmetic + using std::chrono::operator+; + using std::chrono::operator-; + using std::chrono::operator*; + using std::chrono::operator/; + using std::chrono::operator%; + + // [time.duration.comparisons], duration comparisons + using std::chrono::operator==; + using std::chrono::operator<; + using std::chrono::operator>; + using std::chrono::operator<=; + using std::chrono::operator>=; + using std::chrono::operator<=>; + + // [time.duration.cast], conversions + using std::chrono::ceil; + using std::chrono::duration_cast; + using std::chrono::floor; + using std::chrono::round; + + // [time.duration.io], duration I/O +#if _LIBCPP_HAS_LOCALIZATION + using std::chrono::operator<<; +#endif + // using std::chrono::from_stream; + + // convenience typedefs + using std::chrono::days; + using std::chrono::hours; + using std::chrono::microseconds; + using std::chrono::milliseconds; + using std::chrono::minutes; + using std::chrono::months; + using std::chrono::nanoseconds; + using std::chrono::seconds; + using std::chrono::weeks; + using std::chrono::years; + + // [time.point.nonmember], time_point arithmetic + + // [time.point.comparisons], time_point comparisons + + // [time.point.cast], conversions + using std::chrono::time_point_cast; + + // [time.duration.alg], specialized algorithms + using std::chrono::abs; + + // [time.clock.system], class system_clock + using std::chrono::system_clock; + + using std::chrono::sys_days; + using std::chrono::sys_seconds; + using std::chrono::sys_time; + +#if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION +# ifdef _LIBCPP_ENABLE_EXPERIMENTAL + + // [time.clock.utc], class utc_clock + using std::chrono::utc_clock; + + using std::chrono::utc_seconds; + using std::chrono::utc_time; + + using std::chrono::leap_second_info; + + using std::chrono::get_leap_second_info; + + // [time.clock.tai], class tai_clock + using std::chrono::tai_clock; + + using std::chrono::tai_seconds; + using std::chrono::tai_time; + + // [time.clock.gps], class gps_clock + using std::chrono::gps_clock; + + using std::chrono::gps_seconds; + using std::chrono::gps_time; +# endif // _LIBCPP_ENABLE_EXPERIMENTAL +#endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION + + // [time.clock.file], type file_clock + using std::chrono::file_clock; + + using std::chrono::file_time; + +#if _LIBCPP_HAS_MONOTONIC_CLOCK + // [time.clock.steady], class steady_clock + using std::chrono::steady_clock; +#endif + + // [time.clock.hires], class high_resolution_clock + using std::chrono::high_resolution_clock; + + // [time.clock.local], local time + using std::chrono::local_days; + using std::chrono::local_seconds; + using std::chrono::local_t; + using std::chrono::local_time; + + // [time.clock.cast], time_point conversions + // using std::chrono::clock_time_conversion; + + // using std::chrono::clock_cast; + + // [time.cal.last], class last_spec + using std::chrono::last_spec; + + // [time.cal.day], class day + using std::chrono::day; + + // [time.cal.month], class month + using std::chrono::month; + + // [time.cal.year], class year + using std::chrono::year; + + // [time.cal.wd], class weekday + using std::chrono::weekday; + + // [time.cal.wdidx], class weekday_indexed + using std::chrono::weekday_indexed; + + // [time.cal.wdlast], class weekday_last + using std::chrono::weekday_last; + + // [time.cal.md], class month_day + using std::chrono::month_day; + + // [time.cal.mdlast], class month_day_last + using std::chrono::month_day_last; + + // [time.cal.mwd], class month_weekday + using std::chrono::month_weekday; + + // [time.cal.mwdlast], class month_weekday_last + using std::chrono::month_weekday_last; + + // [time.cal.ym], class year_month + using std::chrono::year_month; + + // [time.cal.ymd], class year_month_day + using std::chrono::year_month_day; + + // [time.cal.ymdlast], class year_month_day_last + using std::chrono::year_month_day_last; + + // [time.cal.ymwd], class year_month_weekday + using std::chrono::year_month_weekday; + + // [time.cal.ymwdlast], class year_month_weekday_last + using std::chrono::year_month_weekday_last; + + // [time.cal.operators], civil calendar conventional syntax operators + + // [time.hms], class template hh_mm_ss + using std::chrono::hh_mm_ss; + + // [time.12], 12/24 hour functions + using std::chrono::is_am; + using std::chrono::is_pm; + using std::chrono::make12; + using std::chrono::make24; + +#ifdef _LIBCPP_ENABLE_EXPERIMENTAL + +# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION + + // [time.zone.db], time zone database + using std::chrono::tzdb; + using std::chrono::tzdb_list; + + // [time.zone.db.access], time zone database access + using std::chrono::current_zone; + using std::chrono::get_tzdb; + using std::chrono::get_tzdb_list; + using std::chrono::locate_zone; + + // [time.zone.db.remote], remote time zone database support + using std::chrono::reload_tzdb; + using std::chrono::remote_version; + +# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION + + // [time.zone.exception], exception classes + using std::chrono::ambiguous_local_time; + using std::chrono::nonexistent_local_time; + + // [time.zone.info], information classes + using std::chrono::local_info; + using std::chrono::sys_info; + +# if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION + + // [time.zone.timezone], class time_zone + using std::chrono::choose; + using std::chrono::time_zone; + + // [time.zone.zonedtraits], class template zoned_traits + using std::chrono::zoned_traits; + + // [time.zone.zonedtime], class template zoned_time + using std::chrono::zoned_time; + + using std::chrono::zoned_seconds; + + // [time.zone.leap], leap second support + using std::chrono::leap_second; + + // [time.zone.link], class time_zone_link + using std::chrono::time_zone_link; + +# if 0 + // [time.format], formatting + using std::chrono::local_time_format; +# endif +# endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION +#endif // _LIBCPP_ENABLE_EXPERIMENTAL + + } // namespace chrono + +#if _LIBCPP_HAS_LOCALIZATION + using std::formatter; +#endif + + namespace chrono { + // using std::chrono::parse; + + // calendrical constants + using std::chrono::last; + + using std::chrono::Friday; + using std::chrono::Monday; + using std::chrono::Saturday; + using std::chrono::Sunday; + using std::chrono::Thursday; + using std::chrono::Tuesday; + using std::chrono::Wednesday; + + using std::chrono::April; + using std::chrono::August; + using std::chrono::December; + using std::chrono::February; + using std::chrono::January; + using std::chrono::July; + using std::chrono::June; + using std::chrono::March; + using std::chrono::May; + using std::chrono::November; + using std::chrono::October; + using std::chrono::September; + + } // namespace chrono + +} // namespace std +export namespace std::inline literals::inline chrono_literals { + // [time.duration.literals], suffixes for duration literals + using std::literals::chrono_literals::operator""h; + using std::literals::chrono_literals::operator""min; + using std::literals::chrono_literals::operator""s; + using std::literals::chrono_literals::operator""ms; + using std::literals::chrono_literals::operator""us; + using std::literals::chrono_literals::operator""ns; + + // [using std::literals::chrono_literals::.cal.day.nonmembers], non-member functions + using std::literals::chrono_literals::operator""d; + + // [using std::literals::chrono_literals::.cal.year.nonmembers], non-member functions + using std::literals::chrono_literals::operator""y; +} // namespace std::inline literals::inline chrono_literals diff --git a/system/lib/libcxx/modules/std/cinttypes.inc b/system/lib/libcxx/modules/std/cinttypes.inc new file mode 100644 index 0000000000000..b2b98c973e982 --- /dev/null +++ b/system/lib/libcxx/modules/std/cinttypes.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::imaxdiv_t _LIBCPP_USING_IF_EXISTS; + + using std::imaxabs _LIBCPP_USING_IF_EXISTS; + using std::imaxdiv _LIBCPP_USING_IF_EXISTS; + using std::strtoimax _LIBCPP_USING_IF_EXISTS; + using std::strtoumax _LIBCPP_USING_IF_EXISTS; + using std::wcstoimax _LIBCPP_USING_IF_EXISTS; + using std::wcstoumax _LIBCPP_USING_IF_EXISTS; + + // abs is conditionally here, but always present in cmath.cppm. To avoid + // conflicing declarations omit the using here. + + // div is conditionally here, but always present in cstdlib.cppm. To avoid + // conflicing declarations omit the using here. +} // namespace std diff --git a/system/lib/libcxx/modules/std/climits.inc b/system/lib/libcxx/modules/std/climits.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/std/climits.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/libcxx/modules/std/clocale.inc b/system/lib/libcxx/modules/std/clocale.inc new file mode 100644 index 0000000000000..c336a97a9f122 --- /dev/null +++ b/system/lib/libcxx/modules/std/clocale.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::lconv _LIBCPP_USING_IF_EXISTS; + + using std::localeconv _LIBCPP_USING_IF_EXISTS; + using std::setlocale _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/cmath.inc b/system/lib/libcxx/modules/std/cmath.inc new file mode 100644 index 0000000000000..fe8ac773c9d1c --- /dev/null +++ b/system/lib/libcxx/modules/std/cmath.inc @@ -0,0 +1,376 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + using std::double_t _LIBCPP_USING_IF_EXISTS; + using std::float_t _LIBCPP_USING_IF_EXISTS; + + using std::acos _LIBCPP_USING_IF_EXISTS; + using std::acosf _LIBCPP_USING_IF_EXISTS; + using std::acosl _LIBCPP_USING_IF_EXISTS; + + using std::asin _LIBCPP_USING_IF_EXISTS; + using std::asinf _LIBCPP_USING_IF_EXISTS; + using std::asinl _LIBCPP_USING_IF_EXISTS; + + using std::atan _LIBCPP_USING_IF_EXISTS; + using std::atanf _LIBCPP_USING_IF_EXISTS; + using std::atanl _LIBCPP_USING_IF_EXISTS; + + using std::atan2 _LIBCPP_USING_IF_EXISTS; + using std::atan2f _LIBCPP_USING_IF_EXISTS; + using std::atan2l _LIBCPP_USING_IF_EXISTS; + + using std::cos _LIBCPP_USING_IF_EXISTS; + using std::cosf _LIBCPP_USING_IF_EXISTS; + using std::cosl _LIBCPP_USING_IF_EXISTS; + + using std::sin _LIBCPP_USING_IF_EXISTS; + using std::sinf _LIBCPP_USING_IF_EXISTS; + using std::sinl _LIBCPP_USING_IF_EXISTS; + + using std::tan _LIBCPP_USING_IF_EXISTS; + using std::tanf _LIBCPP_USING_IF_EXISTS; + using std::tanl _LIBCPP_USING_IF_EXISTS; + + using std::acosh _LIBCPP_USING_IF_EXISTS; + using std::acoshf _LIBCPP_USING_IF_EXISTS; + using std::acoshl _LIBCPP_USING_IF_EXISTS; + + using std::asinh _LIBCPP_USING_IF_EXISTS; + using std::asinhf _LIBCPP_USING_IF_EXISTS; + using std::asinhl _LIBCPP_USING_IF_EXISTS; + + using std::atanh _LIBCPP_USING_IF_EXISTS; + using std::atanhf _LIBCPP_USING_IF_EXISTS; + using std::atanhl _LIBCPP_USING_IF_EXISTS; + + using std::cosh _LIBCPP_USING_IF_EXISTS; + using std::coshf _LIBCPP_USING_IF_EXISTS; + using std::coshl _LIBCPP_USING_IF_EXISTS; + + using std::sinh _LIBCPP_USING_IF_EXISTS; + using std::sinhf _LIBCPP_USING_IF_EXISTS; + using std::sinhl _LIBCPP_USING_IF_EXISTS; + + using std::tanh _LIBCPP_USING_IF_EXISTS; + using std::tanhf _LIBCPP_USING_IF_EXISTS; + using std::tanhl _LIBCPP_USING_IF_EXISTS; + + using std::exp _LIBCPP_USING_IF_EXISTS; + using std::expf _LIBCPP_USING_IF_EXISTS; + using std::expl _LIBCPP_USING_IF_EXISTS; + + using std::exp2 _LIBCPP_USING_IF_EXISTS; + using std::exp2f _LIBCPP_USING_IF_EXISTS; + using std::exp2l _LIBCPP_USING_IF_EXISTS; + + using std::expm1 _LIBCPP_USING_IF_EXISTS; + using std::expm1f _LIBCPP_USING_IF_EXISTS; + using std::expm1l _LIBCPP_USING_IF_EXISTS; + + using std::frexp _LIBCPP_USING_IF_EXISTS; + using std::frexpf _LIBCPP_USING_IF_EXISTS; + using std::frexpl _LIBCPP_USING_IF_EXISTS; + + using std::ilogb _LIBCPP_USING_IF_EXISTS; + using std::ilogbf _LIBCPP_USING_IF_EXISTS; + using std::ilogbl _LIBCPP_USING_IF_EXISTS; + + using std::ldexp _LIBCPP_USING_IF_EXISTS; + using std::ldexpf _LIBCPP_USING_IF_EXISTS; + using std::ldexpl _LIBCPP_USING_IF_EXISTS; + + using std::log _LIBCPP_USING_IF_EXISTS; + using std::logf _LIBCPP_USING_IF_EXISTS; + using std::logl _LIBCPP_USING_IF_EXISTS; + + using std::log10 _LIBCPP_USING_IF_EXISTS; + using std::log10f _LIBCPP_USING_IF_EXISTS; + using std::log10l _LIBCPP_USING_IF_EXISTS; + + using std::log1p _LIBCPP_USING_IF_EXISTS; + using std::log1pf _LIBCPP_USING_IF_EXISTS; + using std::log1pl _LIBCPP_USING_IF_EXISTS; + + using std::log2 _LIBCPP_USING_IF_EXISTS; + using std::log2f _LIBCPP_USING_IF_EXISTS; + using std::log2l _LIBCPP_USING_IF_EXISTS; + + using std::logb _LIBCPP_USING_IF_EXISTS; + using std::logbf _LIBCPP_USING_IF_EXISTS; + using std::logbl _LIBCPP_USING_IF_EXISTS; + + using std::modf _LIBCPP_USING_IF_EXISTS; + using std::modff _LIBCPP_USING_IF_EXISTS; + using std::modfl _LIBCPP_USING_IF_EXISTS; + + using std::scalbn _LIBCPP_USING_IF_EXISTS; + using std::scalbnf _LIBCPP_USING_IF_EXISTS; + using std::scalbnl _LIBCPP_USING_IF_EXISTS; + + using std::scalbln _LIBCPP_USING_IF_EXISTS; + using std::scalblnf _LIBCPP_USING_IF_EXISTS; + using std::scalblnl _LIBCPP_USING_IF_EXISTS; + + using std::cbrt _LIBCPP_USING_IF_EXISTS; + using std::cbrtf _LIBCPP_USING_IF_EXISTS; + using std::cbrtl _LIBCPP_USING_IF_EXISTS; + + // [c.math.abs], absolute values + using std::abs _LIBCPP_USING_IF_EXISTS; + + using std::fabs _LIBCPP_USING_IF_EXISTS; + using std::fabsf _LIBCPP_USING_IF_EXISTS; + using std::fabsl _LIBCPP_USING_IF_EXISTS; + + using std::hypot _LIBCPP_USING_IF_EXISTS; + using std::hypotf _LIBCPP_USING_IF_EXISTS; + using std::hypotl _LIBCPP_USING_IF_EXISTS; + + // [c.math.hypot3], three-dimensional hypotenuse + + using std::pow _LIBCPP_USING_IF_EXISTS; + using std::powf _LIBCPP_USING_IF_EXISTS; + using std::powl _LIBCPP_USING_IF_EXISTS; + + using std::sqrt _LIBCPP_USING_IF_EXISTS; + using std::sqrtf _LIBCPP_USING_IF_EXISTS; + using std::sqrtl _LIBCPP_USING_IF_EXISTS; + + using std::erf _LIBCPP_USING_IF_EXISTS; + using std::erff _LIBCPP_USING_IF_EXISTS; + using std::erfl _LIBCPP_USING_IF_EXISTS; + + using std::erfc _LIBCPP_USING_IF_EXISTS; + using std::erfcf _LIBCPP_USING_IF_EXISTS; + using std::erfcl _LIBCPP_USING_IF_EXISTS; + + using std::lgamma _LIBCPP_USING_IF_EXISTS; + using std::lgammaf _LIBCPP_USING_IF_EXISTS; + using std::lgammal _LIBCPP_USING_IF_EXISTS; + + using std::tgamma _LIBCPP_USING_IF_EXISTS; + using std::tgammaf _LIBCPP_USING_IF_EXISTS; + using std::tgammal _LIBCPP_USING_IF_EXISTS; + + using std::ceil _LIBCPP_USING_IF_EXISTS; + using std::ceilf _LIBCPP_USING_IF_EXISTS; + using std::ceill _LIBCPP_USING_IF_EXISTS; + + using std::floor _LIBCPP_USING_IF_EXISTS; + using std::floorf _LIBCPP_USING_IF_EXISTS; + using std::floorl _LIBCPP_USING_IF_EXISTS; + + using std::nearbyint _LIBCPP_USING_IF_EXISTS; + using std::nearbyintf _LIBCPP_USING_IF_EXISTS; + using std::nearbyintl _LIBCPP_USING_IF_EXISTS; + + using std::rint _LIBCPP_USING_IF_EXISTS; + using std::rintf _LIBCPP_USING_IF_EXISTS; + using std::rintl _LIBCPP_USING_IF_EXISTS; + + using std::lrint _LIBCPP_USING_IF_EXISTS; + using std::lrintf _LIBCPP_USING_IF_EXISTS; + using std::lrintl _LIBCPP_USING_IF_EXISTS; + + using std::llrint _LIBCPP_USING_IF_EXISTS; + using std::llrintf _LIBCPP_USING_IF_EXISTS; + using std::llrintl _LIBCPP_USING_IF_EXISTS; + + using std::round _LIBCPP_USING_IF_EXISTS; + using std::roundf _LIBCPP_USING_IF_EXISTS; + using std::roundl _LIBCPP_USING_IF_EXISTS; + + using std::lround _LIBCPP_USING_IF_EXISTS; + using std::lroundf _LIBCPP_USING_IF_EXISTS; + using std::lroundl _LIBCPP_USING_IF_EXISTS; + + using std::llround _LIBCPP_USING_IF_EXISTS; + using std::llroundf _LIBCPP_USING_IF_EXISTS; + using std::llroundl _LIBCPP_USING_IF_EXISTS; + + using std::trunc _LIBCPP_USING_IF_EXISTS; + using std::truncf _LIBCPP_USING_IF_EXISTS; + using std::truncl _LIBCPP_USING_IF_EXISTS; + + using std::fmod _LIBCPP_USING_IF_EXISTS; + using std::fmodf _LIBCPP_USING_IF_EXISTS; + using std::fmodl _LIBCPP_USING_IF_EXISTS; + + using std::remainder _LIBCPP_USING_IF_EXISTS; + using std::remainderf _LIBCPP_USING_IF_EXISTS; + using std::remainderl _LIBCPP_USING_IF_EXISTS; + + using std::remquo _LIBCPP_USING_IF_EXISTS; + using std::remquof _LIBCPP_USING_IF_EXISTS; + using std::remquol _LIBCPP_USING_IF_EXISTS; + + using std::copysign _LIBCPP_USING_IF_EXISTS; + using std::copysignf _LIBCPP_USING_IF_EXISTS; + using std::copysignl _LIBCPP_USING_IF_EXISTS; + + using std::nan _LIBCPP_USING_IF_EXISTS; + using std::nanf _LIBCPP_USING_IF_EXISTS; + using std::nanl _LIBCPP_USING_IF_EXISTS; + + using std::nextafter _LIBCPP_USING_IF_EXISTS; + using std::nextafterf _LIBCPP_USING_IF_EXISTS; + using std::nextafterl _LIBCPP_USING_IF_EXISTS; + + using std::nexttoward _LIBCPP_USING_IF_EXISTS; + using std::nexttowardf _LIBCPP_USING_IF_EXISTS; + using std::nexttowardl _LIBCPP_USING_IF_EXISTS; + + using std::fdim _LIBCPP_USING_IF_EXISTS; + using std::fdimf _LIBCPP_USING_IF_EXISTS; + using std::fdiml _LIBCPP_USING_IF_EXISTS; + + using std::fmax _LIBCPP_USING_IF_EXISTS; + using std::fmaxf _LIBCPP_USING_IF_EXISTS; + using std::fmaxl _LIBCPP_USING_IF_EXISTS; + + using std::fmin _LIBCPP_USING_IF_EXISTS; + using std::fminf _LIBCPP_USING_IF_EXISTS; + using std::fminl _LIBCPP_USING_IF_EXISTS; + + using std::fma _LIBCPP_USING_IF_EXISTS; + using std::fmaf _LIBCPP_USING_IF_EXISTS; + using std::fmal _LIBCPP_USING_IF_EXISTS; + + // [c.math.lerp], linear interpolation + using std::lerp _LIBCPP_USING_IF_EXISTS; + + // [c.math.fpclass], classification / comparison functions + using std::fpclassify _LIBCPP_USING_IF_EXISTS; + using std::isfinite _LIBCPP_USING_IF_EXISTS; + using std::isgreater _LIBCPP_USING_IF_EXISTS; + using std::isgreaterequal _LIBCPP_USING_IF_EXISTS; + using std::isinf _LIBCPP_USING_IF_EXISTS; + using std::isless _LIBCPP_USING_IF_EXISTS; + using std::islessequal _LIBCPP_USING_IF_EXISTS; + using std::islessgreater _LIBCPP_USING_IF_EXISTS; + using std::isnan _LIBCPP_USING_IF_EXISTS; + using std::isnormal _LIBCPP_USING_IF_EXISTS; + using std::isunordered _LIBCPP_USING_IF_EXISTS; + using std::signbit _LIBCPP_USING_IF_EXISTS; + + // [sf.cmath], mathematical special functions +#if 0 + // [sf.cmath.assoc.laguerre], associated Laguerre polynomials + using std::assoc_laguerre; + using std::assoc_laguerref; + using std::assoc_laguerrel; + + // [sf.cmath.assoc.legendre], associated Legendre functions + using std::assoc_legendre; + using std::assoc_legendref; + using std::assoc_legendrel; + + // [sf.cmath.beta], beta function + using std::beta; + using std::betaf; + using std::betal; + + // [sf.cmath.comp.ellint.1], complete elliptic integral of the first kind + using std::comp_ellint_1; + using std::comp_ellint_1f; + using std::comp_ellint_1l; + + // [sf.cmath.comp.ellint.2], complete elliptic integral of the second kind + using std::comp_ellint_2; + using std::comp_ellint_2f; + using std::comp_ellint_2l; + + // [sf.cmath.comp.ellint.3], complete elliptic integral of the third kind + using std::comp_ellint_3; + using std::comp_ellint_3f; + using std::comp_ellint_3l; + + // [sf.cmath.cyl.bessel.i], regular modified cylindrical Bessel functions + using std::cyl_bessel_i; + using std::cyl_bessel_if; + using std::cyl_bessel_il; + + // [sf.cmath.cyl.bessel.j], cylindrical Bessel functions of the first kind + using std::cyl_bessel_j; + using std::cyl_bessel_jf; + using std::cyl_bessel_jl; + + // [sf.cmath.cyl.bessel.k], irregular modified cylindrical Bessel functions + using std::cyl_bessel_k; + using std::cyl_bessel_kf; + using std::cyl_bessel_kl; + + // [sf.cmath.cyl.neumann], cylindrical Neumann functions + // cylindrical Bessel functions of the second kind + using std::cyl_neumann; + using std::cyl_neumannf; + using std::cyl_neumannl; + + // [sf.cmath.ellint.1], incomplete elliptic integral of the first kind + using std::ellint_1; + using std::ellint_1f; + using std::ellint_1l; + + // [sf.cmath.ellint.2], incomplete elliptic integral of the second kind + using std::ellint_2; + using std::ellint_2f; + using std::ellint_2l; + + // [sf.cmath.ellint.3], incomplete elliptic integral of the third kind + using std::ellint_3; + using std::ellint_3f; + using std::ellint_3l; + + // [sf.cmath.expint], exponential integral + using std::expint; + using std::expintf; + using std::expintl; +#endif + + // [sf.cmath.hermite], Hermite polynomials + using std::hermite; + using std::hermitef; + using std::hermitel; + +#if 0 + // [sf.cmath.laguerre], Laguerre polynomials + using std::laguerre; + using std::laguerref; + using std::laguerrel; + + // [sf.cmath.legendre], Legendre polynomials + using std::legendre; + using std::legendref; + using std::legendrel; + + // [sf.cmath.riemann.zeta], Riemann zeta function + using std::riemann_zeta; + using std::riemann_zetaf; + using std::riemann_zetal; + + // [sf.cmath.sph.bessel], spherical Bessel functions of the first kind + using std::sph_bessel; + using std::sph_besself; + using std::sph_bessell; + + // [sf.cmath.sph.legendre], spherical associated Legendre functions + using std::sph_legendre; + using std::sph_legendref; + using std::sph_legendrel; + + // [sf.cmath.sph.neumann], spherical Neumann functions; + // spherical Bessel functions of the second kind + using std::sph_neumann; + using std::sph_neumannf; + using std::sph_neumannl; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/codecvt.inc b/system/lib/libcxx/modules/std/codecvt.inc new file mode 100644 index 0000000000000..07accd513442d --- /dev/null +++ b/system/lib/libcxx/modules/std/codecvt.inc @@ -0,0 +1,20 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION +# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT) + using std::codecvt_mode; + + using std::codecvt_utf16; + using std::codecvt_utf8; + using std::codecvt_utf8_utf16; +# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT) +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/compare.inc b/system/lib/libcxx/modules/std/compare.inc new file mode 100644 index 0000000000000..9d002d301efc3 --- /dev/null +++ b/system/lib/libcxx/modules/std/compare.inc @@ -0,0 +1,51 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [cmp.categories], comparison category types + using std::partial_ordering; + using std::strong_ordering; + using std::weak_ordering; + + // named comparison functions + using std::is_eq; + using std::is_gt; + using std::is_gteq; + using std::is_lt; + using std::is_lteq; + using std::is_neq; + + // [cmp.common], common comparison category type + using std::common_comparison_category; + using std::common_comparison_category_t; + + // [cmp.concept], concept three_way_comparable + using std::three_way_comparable; + using std::three_way_comparable_with; + + // [cmp.result], result of three-way comparison + using std::compare_three_way_result; + + using std::compare_three_way_result_t; + + // [comparisons.three.way], class compare_three_way + using std::compare_three_way; + + // [cmp.alg], comparison algorithms + inline namespace __cpo { + using std::__cpo::compare_partial_order_fallback; + using std::__cpo::compare_strong_order_fallback; + using std::__cpo::compare_weak_order_fallback; + using std::__cpo::partial_order; + using std::__cpo::strong_order; + using std::__cpo::weak_order; + } // namespace __cpo + +} // namespace std diff --git a/system/lib/libcxx/modules/std/complex.inc b/system/lib/libcxx/modules/std/complex.inc new file mode 100644 index 0000000000000..1ad5f78d51fc5 --- /dev/null +++ b/system/lib/libcxx/modules/std/complex.inc @@ -0,0 +1,78 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [complex], class template complex + using std::complex; + + // [complex.ops], operators + using std::operator+; + using std::operator-; + using std::operator*; + using std::operator/; + + using std::operator==; +#if _LIBCPP_HAS_LOCALIZATION + using std::operator>>; + using std::operator<<; +#endif // _LIBCPP_HAS_LOCALIZATION + + // [complex.value.ops], values + using std::imag; + using std::real; + + using std::abs; + using std::arg; + using std::norm; + + using std::conj; + using std::polar; + using std::proj; + + // [complex.transcendentals], transcendentals + using std::acos; + using std::asin; + using std::atan; + + using std::acosh; + using std::asinh; + using std::atanh; + + using std::cos; + using std::cosh; + using std::exp; + using std::log; + using std::log10; + + using std::pow; + + using std::sin; + using std::sinh; + using std::sqrt; + using std::tan; + using std::tanh; + +#if _LIBCPP_STD_VER >= 26 + // [complex.tuple], tuple interface + using std::get; + using std::tuple_element; + using std::tuple_size; +#endif + + // [complex.literals], complex literals + inline namespace literals { + inline namespace complex_literals { + using std::operator""il; + using std::operator""i; + using std::operator""if; + } // namespace complex_literals + } // namespace literals + +} // namespace std diff --git a/system/lib/libcxx/modules/std/concepts.inc b/system/lib/libcxx/modules/std/concepts.inc new file mode 100644 index 0000000000000..29f4e2788e9ab --- /dev/null +++ b/system/lib/libcxx/modules/std/concepts.inc @@ -0,0 +1,96 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [concepts.lang], language-related concepts + // [concept.same], concept same_as + using std::same_as; + + // [concept.derived], concept derived_from + using std::derived_from; + + // [concept.convertible], concept convertible_to + using std::convertible_to; + + // [concept.commonref], concept common_reference_with + using std::common_reference_with; + + // [concept.common], concept common_with + using std::common_with; + + // [concepts.arithmetic], arithmetic concepts + using std::floating_point; + using std::integral; + using std::signed_integral; + using std::unsigned_integral; + + // [concept.assignable], concept assignable_from + using std::assignable_from; + + // [concept.swappable], concept swappable + namespace ranges { + inline namespace __cpo { + using std::ranges::__cpo::swap; + } + } // namespace ranges + + using std::swappable; + using std::swappable_with; + + // [concept.destructible], concept destructible + using std::destructible; + + // [concept.constructible], concept constructible_from + using std::constructible_from; + + // [concept.default.init], concept default_initializable + using std::default_initializable; + + // [concept.moveconstructible], concept move_constructible + using std::move_constructible; + + // [concept.copyconstructible], concept copy_constructible + using std::copy_constructible; + + // [concepts.compare], comparison concepts + // [concept.equalitycomparable], concept equality_comparable + using std::equality_comparable; + using std::equality_comparable_with; + + // [concept.totallyordered], concept totally_ordered + using std::totally_ordered; + using std::totally_ordered_with; + + // [concepts.object], object concepts + using std::copyable; + using std::movable; + using std::regular; + using std::semiregular; + + // [concepts.callable], callable concepts + // [concept.invocable], concept invocable + using std::invocable; + + // [concept.regularinvocable], concept regular_invocable + using std::regular_invocable; + + // [concept.predicate], concept predicate + using std::predicate; + + // [concept.relation], concept relation + using std::relation; + + // [concept.equiv], concept equivalence_relation + using std::equivalence_relation; + + // [concept.strictweakorder], concept strict_weak_order + using std::strict_weak_order; + +} // namespace std diff --git a/system/lib/libcxx/modules/std/condition_variable.inc b/system/lib/libcxx/modules/std/condition_variable.inc new file mode 100644 index 0000000000000..c3197d6891bd3 --- /dev/null +++ b/system/lib/libcxx/modules/std/condition_variable.inc @@ -0,0 +1,22 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.condition.condvar], class condition_variable + using std::condition_variable; + // [thread.condition.condvarany], class condition_variable_any + using std::condition_variable_any; + + // [thread.condition.nonmember], non-member functions + using std::notify_all_at_thread_exit; + + using std::cv_status; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/std/coroutine.inc b/system/lib/libcxx/modules/std/coroutine.inc new file mode 100644 index 0000000000000..5d992f29a1e2e --- /dev/null +++ b/system/lib/libcxx/modules/std/coroutine.inc @@ -0,0 +1,33 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + + // [coroutine.traits], coroutine traits + using std::coroutine_traits; + + // [coroutine.handle], coroutine handle + using std::coroutine_handle; + + // [coroutine.handle.compare], comparison operators + using std::operator==; + using std::operator<=>; + + // [coroutine.handle.hash], hash support + using std::hash; + + // [coroutine.noop], no-op coroutines + using std::noop_coroutine; + using std::noop_coroutine_handle; + using std::noop_coroutine_promise; + + // [coroutine.trivial.awaitables], trivial awaitables + using std::suspend_always; + using std::suspend_never; +} // namespace std diff --git a/system/lib/libcxx/modules/std/csetjmp.inc b/system/lib/libcxx/modules/std/csetjmp.inc new file mode 100644 index 0000000000000..8aa2e23292915 --- /dev/null +++ b/system/lib/libcxx/modules/std/csetjmp.inc @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::jmp_buf _LIBCPP_USING_IF_EXISTS; + using std::longjmp _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/std/csignal.inc b/system/lib/libcxx/modules/std/csignal.inc new file mode 100644 index 0000000000000..05f3986866c7b --- /dev/null +++ b/system/lib/libcxx/modules/std/csignal.inc @@ -0,0 +1,18 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::sig_atomic_t _LIBCPP_USING_IF_EXISTS; + + // [support.signal], signal handlers + using std::signal _LIBCPP_USING_IF_EXISTS; + + using std::raise _LIBCPP_USING_IF_EXISTS; + +} // namespace std diff --git a/system/lib/libcxx/modules/std/cstdarg.inc b/system/lib/libcxx/modules/std/cstdarg.inc new file mode 100644 index 0000000000000..5947bc2452b71 --- /dev/null +++ b/system/lib/libcxx/modules/std/cstdarg.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::va_list _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/std/cstddef.inc b/system/lib/libcxx/modules/std/cstddef.inc new file mode 100644 index 0000000000000..6443de8923823 --- /dev/null +++ b/system/lib/libcxx/modules/std/cstddef.inc @@ -0,0 +1,31 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::max_align_t _LIBCPP_USING_IF_EXISTS; + using std::nullptr_t; + using std::ptrdiff_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + + using std::byte; + + // [support.types.byteops], byte type operations + using std::operator<<=; + using std::operator<<; + using std::operator>>=; + using std::operator>>; + using std::operator|=; + using std::operator|; + using std::operator&=; + using std::operator&; + using std::operator^=; + using std::operator^; + using std::operator~; + using std::to_integer; +} // namespace std diff --git a/system/lib/libcxx/modules/std/cstdint.inc b/system/lib/libcxx/modules/std/cstdint.inc new file mode 100644 index 0000000000000..f23b52a94526e --- /dev/null +++ b/system/lib/libcxx/modules/std/cstdint.inc @@ -0,0 +1,50 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // signed + using std::int8_t _LIBCPP_USING_IF_EXISTS; + using std::int16_t _LIBCPP_USING_IF_EXISTS; + using std::int32_t _LIBCPP_USING_IF_EXISTS; + using std::int64_t _LIBCPP_USING_IF_EXISTS; + + using std::int_fast16_t _LIBCPP_USING_IF_EXISTS; + using std::int_fast32_t _LIBCPP_USING_IF_EXISTS; + using std::int_fast64_t _LIBCPP_USING_IF_EXISTS; + using std::int_fast8_t _LIBCPP_USING_IF_EXISTS; + + using std::int_least16_t _LIBCPP_USING_IF_EXISTS; + using std::int_least32_t _LIBCPP_USING_IF_EXISTS; + using std::int_least64_t _LIBCPP_USING_IF_EXISTS; + using std::int_least8_t _LIBCPP_USING_IF_EXISTS; + + using std::intmax_t _LIBCPP_USING_IF_EXISTS; + + using std::intptr_t _LIBCPP_USING_IF_EXISTS; + + // unsigned + using std::uint8_t _LIBCPP_USING_IF_EXISTS; + using std::uint16_t _LIBCPP_USING_IF_EXISTS; + using std::uint32_t _LIBCPP_USING_IF_EXISTS; + using std::uint64_t _LIBCPP_USING_IF_EXISTS; + + using std::uint_fast16_t _LIBCPP_USING_IF_EXISTS; + using std::uint_fast32_t _LIBCPP_USING_IF_EXISTS; + using std::uint_fast64_t _LIBCPP_USING_IF_EXISTS; + using std::uint_fast8_t _LIBCPP_USING_IF_EXISTS; + + using std::uint_least16_t _LIBCPP_USING_IF_EXISTS; + using std::uint_least32_t _LIBCPP_USING_IF_EXISTS; + using std::uint_least64_t _LIBCPP_USING_IF_EXISTS; + using std::uint_least8_t _LIBCPP_USING_IF_EXISTS; + + using std::uintmax_t _LIBCPP_USING_IF_EXISTS; + + using std::uintptr_t _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/std/cstdio.inc b/system/lib/libcxx/modules/std/cstdio.inc new file mode 100644 index 0000000000000..62fa2f566a5f6 --- /dev/null +++ b/system/lib/libcxx/modules/std/cstdio.inc @@ -0,0 +1,60 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::FILE _LIBCPP_USING_IF_EXISTS; + using std::fpos_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + + using std::clearerr _LIBCPP_USING_IF_EXISTS; + using std::fclose _LIBCPP_USING_IF_EXISTS; + using std::feof _LIBCPP_USING_IF_EXISTS; + using std::ferror _LIBCPP_USING_IF_EXISTS; + using std::fflush _LIBCPP_USING_IF_EXISTS; + using std::fgetc _LIBCPP_USING_IF_EXISTS; + using std::fgetpos _LIBCPP_USING_IF_EXISTS; + using std::fgets _LIBCPP_USING_IF_EXISTS; + using std::fopen _LIBCPP_USING_IF_EXISTS; + using std::fprintf _LIBCPP_USING_IF_EXISTS; + using std::fputc _LIBCPP_USING_IF_EXISTS; + using std::fputs _LIBCPP_USING_IF_EXISTS; + using std::fread _LIBCPP_USING_IF_EXISTS; + using std::freopen _LIBCPP_USING_IF_EXISTS; + using std::fscanf _LIBCPP_USING_IF_EXISTS; + using std::fseek _LIBCPP_USING_IF_EXISTS; + using std::fsetpos _LIBCPP_USING_IF_EXISTS; + using std::ftell _LIBCPP_USING_IF_EXISTS; + using std::fwrite _LIBCPP_USING_IF_EXISTS; + using std::getc _LIBCPP_USING_IF_EXISTS; + using std::getchar _LIBCPP_USING_IF_EXISTS; + using std::perror _LIBCPP_USING_IF_EXISTS; + using std::printf _LIBCPP_USING_IF_EXISTS; + using std::putc _LIBCPP_USING_IF_EXISTS; + using std::putchar _LIBCPP_USING_IF_EXISTS; + using std::puts _LIBCPP_USING_IF_EXISTS; + using std::remove _LIBCPP_USING_IF_EXISTS; + using std::rename _LIBCPP_USING_IF_EXISTS; + using std::rewind _LIBCPP_USING_IF_EXISTS; + using std::scanf _LIBCPP_USING_IF_EXISTS; + using std::setbuf _LIBCPP_USING_IF_EXISTS; + using std::setvbuf _LIBCPP_USING_IF_EXISTS; + using std::snprintf _LIBCPP_USING_IF_EXISTS; + using std::sprintf _LIBCPP_USING_IF_EXISTS; + using std::sscanf _LIBCPP_USING_IF_EXISTS; + using std::tmpfile _LIBCPP_USING_IF_EXISTS; + using std::tmpnam _LIBCPP_USING_IF_EXISTS; + using std::ungetc _LIBCPP_USING_IF_EXISTS; + using std::vfprintf _LIBCPP_USING_IF_EXISTS; + using std::vfscanf _LIBCPP_USING_IF_EXISTS; + using std::vprintf _LIBCPP_USING_IF_EXISTS; + using std::vscanf _LIBCPP_USING_IF_EXISTS; + using std::vsnprintf _LIBCPP_USING_IF_EXISTS; + using std::vsprintf _LIBCPP_USING_IF_EXISTS; + using std::vsscanf _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/std/cstdlib.inc b/system/lib/libcxx/modules/std/cstdlib.inc new file mode 100644 index 0000000000000..bfa88760ac0cb --- /dev/null +++ b/system/lib/libcxx/modules/std/cstdlib.inc @@ -0,0 +1,71 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::div_t _LIBCPP_USING_IF_EXISTS; + using std::ldiv_t _LIBCPP_USING_IF_EXISTS; + using std::lldiv_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + + // [support.start.term], start and termination + using std::_Exit _LIBCPP_USING_IF_EXISTS; + using std::abort _LIBCPP_USING_IF_EXISTS; + using std::at_quick_exit _LIBCPP_USING_IF_EXISTS; + using std::atexit _LIBCPP_USING_IF_EXISTS; + using std::exit _LIBCPP_USING_IF_EXISTS; + using std::quick_exit _LIBCPP_USING_IF_EXISTS; + + using std::getenv _LIBCPP_USING_IF_EXISTS; + using std::system _LIBCPP_USING_IF_EXISTS; + + // [c.malloc], C library memory allocation + using std::aligned_alloc _LIBCPP_USING_IF_EXISTS; + using std::calloc _LIBCPP_USING_IF_EXISTS; + using std::free _LIBCPP_USING_IF_EXISTS; + using std::malloc _LIBCPP_USING_IF_EXISTS; + using std::realloc _LIBCPP_USING_IF_EXISTS; + + using std::atof _LIBCPP_USING_IF_EXISTS; + using std::atoi _LIBCPP_USING_IF_EXISTS; + using std::atol _LIBCPP_USING_IF_EXISTS; + using std::atoll _LIBCPP_USING_IF_EXISTS; + using std::strtod _LIBCPP_USING_IF_EXISTS; + using std::strtof _LIBCPP_USING_IF_EXISTS; + using std::strtol _LIBCPP_USING_IF_EXISTS; + using std::strtold _LIBCPP_USING_IF_EXISTS; + using std::strtoll _LIBCPP_USING_IF_EXISTS; + using std::strtoul _LIBCPP_USING_IF_EXISTS; + using std::strtoull _LIBCPP_USING_IF_EXISTS; + + // [c.mb.wcs], multibyte / wide string and character conversion functions + using std::mblen _LIBCPP_USING_IF_EXISTS; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::mbstowcs _LIBCPP_USING_IF_EXISTS; + using std::mbtowc _LIBCPP_USING_IF_EXISTS; + using std::wcstombs _LIBCPP_USING_IF_EXISTS; + using std::wctomb _LIBCPP_USING_IF_EXISTS; +#endif + // [alg.c.library], C standard library algorithms + using std::bsearch _LIBCPP_USING_IF_EXISTS; + using std::qsort _LIBCPP_USING_IF_EXISTS; + + // [c.math.rand], low-quality random number generation + using std::rand _LIBCPP_USING_IF_EXISTS; + using std::srand _LIBCPP_USING_IF_EXISTS; + + // [c.math.abs], absolute values + using std::abs _LIBCPP_USING_IF_EXISTS; + + using std::labs _LIBCPP_USING_IF_EXISTS; + using std::llabs _LIBCPP_USING_IF_EXISTS; + + using std::div _LIBCPP_USING_IF_EXISTS; + using std::ldiv _LIBCPP_USING_IF_EXISTS; + using std::lldiv _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/std/cstring.inc b/system/lib/libcxx/modules/std/cstring.inc new file mode 100644 index 0000000000000..9ad33b982b32a --- /dev/null +++ b/system/lib/libcxx/modules/std/cstring.inc @@ -0,0 +1,35 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::size_t _LIBCPP_USING_IF_EXISTS; + + using std::memchr _LIBCPP_USING_IF_EXISTS; + using std::memcmp _LIBCPP_USING_IF_EXISTS; + using std::memcpy _LIBCPP_USING_IF_EXISTS; + using std::memmove _LIBCPP_USING_IF_EXISTS; + using std::memset _LIBCPP_USING_IF_EXISTS; + using std::strcat _LIBCPP_USING_IF_EXISTS; + using std::strchr _LIBCPP_USING_IF_EXISTS; + using std::strcmp _LIBCPP_USING_IF_EXISTS; + using std::strcoll _LIBCPP_USING_IF_EXISTS; + using std::strcpy _LIBCPP_USING_IF_EXISTS; + using std::strcspn _LIBCPP_USING_IF_EXISTS; + using std::strerror _LIBCPP_USING_IF_EXISTS; + using std::strlen _LIBCPP_USING_IF_EXISTS; + using std::strncat _LIBCPP_USING_IF_EXISTS; + using std::strncmp _LIBCPP_USING_IF_EXISTS; + using std::strncpy _LIBCPP_USING_IF_EXISTS; + using std::strpbrk _LIBCPP_USING_IF_EXISTS; + using std::strrchr _LIBCPP_USING_IF_EXISTS; + using std::strspn _LIBCPP_USING_IF_EXISTS; + using std::strstr _LIBCPP_USING_IF_EXISTS; + using std::strtok _LIBCPP_USING_IF_EXISTS; + using std::strxfrm _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/std/ctime.inc b/system/lib/libcxx/modules/std/ctime.inc new file mode 100644 index 0000000000000..5bfa61917e5f2 --- /dev/null +++ b/system/lib/libcxx/modules/std/ctime.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::clock_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + using std::time_t _LIBCPP_USING_IF_EXISTS; + + using std::timespec _LIBCPP_USING_IF_EXISTS; + using std::tm _LIBCPP_USING_IF_EXISTS; + + using std::asctime _LIBCPP_USING_IF_EXISTS; + using std::clock _LIBCPP_USING_IF_EXISTS; + using std::ctime _LIBCPP_USING_IF_EXISTS; + using std::difftime _LIBCPP_USING_IF_EXISTS; + using std::gmtime _LIBCPP_USING_IF_EXISTS; + using std::localtime _LIBCPP_USING_IF_EXISTS; + using std::mktime _LIBCPP_USING_IF_EXISTS; + using std::strftime _LIBCPP_USING_IF_EXISTS; + using std::time _LIBCPP_USING_IF_EXISTS; + using std::timespec_get _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/std/cuchar.inc b/system/lib/libcxx/modules/std/cuchar.inc new file mode 100644 index 0000000000000..4a0b21c17b7e1 --- /dev/null +++ b/system/lib/libcxx/modules/std/cuchar.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // Note the Standard does not mark these symbols optional, but libc++'s header + // does. So this seems strictly not to be conforming. + + // mbstate_t is conditionally here, but always present in cwchar.cppm. To avoid + // conflicing declarations omit the using here. + + // size_t is conditionally here, but always present in cstddef.cppm. To avoid + // conflicing declarations omit the using here. + +#if _LIBCPP_HAS_C8RTOMB_MBRTOC8 + using std::mbrtoc8 _LIBCPP_USING_IF_EXISTS; + using std::c8rtomb _LIBCPP_USING_IF_EXISTS; +#endif + using std::mbrtoc16 _LIBCPP_USING_IF_EXISTS; + using std::c16rtomb _LIBCPP_USING_IF_EXISTS; + using std::mbrtoc32 _LIBCPP_USING_IF_EXISTS; + using std::c32rtomb _LIBCPP_USING_IF_EXISTS; +} // namespace std diff --git a/system/lib/libcxx/modules/std/cwchar.inc b/system/lib/libcxx/modules/std/cwchar.inc new file mode 100644 index 0000000000000..6fda1cf5cdc75 --- /dev/null +++ b/system/lib/libcxx/modules/std/cwchar.inc @@ -0,0 +1,80 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::mbstate_t _LIBCPP_USING_IF_EXISTS; + using std::size_t _LIBCPP_USING_IF_EXISTS; + using std::wint_t _LIBCPP_USING_IF_EXISTS; + + using std::tm _LIBCPP_USING_IF_EXISTS; + + using std::btowc _LIBCPP_USING_IF_EXISTS; + using std::fgetwc _LIBCPP_USING_IF_EXISTS; + using std::fgetws _LIBCPP_USING_IF_EXISTS; + using std::fputwc _LIBCPP_USING_IF_EXISTS; + using std::fputws _LIBCPP_USING_IF_EXISTS; + using std::fwide _LIBCPP_USING_IF_EXISTS; + using std::fwprintf _LIBCPP_USING_IF_EXISTS; + using std::fwscanf _LIBCPP_USING_IF_EXISTS; + using std::getwc _LIBCPP_USING_IF_EXISTS; + using std::getwchar _LIBCPP_USING_IF_EXISTS; + using std::putwc _LIBCPP_USING_IF_EXISTS; + using std::putwchar _LIBCPP_USING_IF_EXISTS; + using std::swprintf _LIBCPP_USING_IF_EXISTS; + using std::swscanf _LIBCPP_USING_IF_EXISTS; + using std::ungetwc _LIBCPP_USING_IF_EXISTS; + using std::vfwprintf _LIBCPP_USING_IF_EXISTS; + using std::vfwscanf _LIBCPP_USING_IF_EXISTS; + using std::vswprintf _LIBCPP_USING_IF_EXISTS; + using std::vswscanf _LIBCPP_USING_IF_EXISTS; + using std::vwprintf _LIBCPP_USING_IF_EXISTS; + using std::vwscanf _LIBCPP_USING_IF_EXISTS; + using std::wcscat _LIBCPP_USING_IF_EXISTS; + using std::wcschr _LIBCPP_USING_IF_EXISTS; + using std::wcscmp _LIBCPP_USING_IF_EXISTS; + using std::wcscoll _LIBCPP_USING_IF_EXISTS; + using std::wcscpy _LIBCPP_USING_IF_EXISTS; + using std::wcscspn _LIBCPP_USING_IF_EXISTS; + using std::wcsftime _LIBCPP_USING_IF_EXISTS; + using std::wcslen _LIBCPP_USING_IF_EXISTS; + using std::wcsncat _LIBCPP_USING_IF_EXISTS; + using std::wcsncmp _LIBCPP_USING_IF_EXISTS; + using std::wcsncpy _LIBCPP_USING_IF_EXISTS; + using std::wcspbrk _LIBCPP_USING_IF_EXISTS; + using std::wcsrchr _LIBCPP_USING_IF_EXISTS; + using std::wcsspn _LIBCPP_USING_IF_EXISTS; + using std::wcsstr _LIBCPP_USING_IF_EXISTS; + using std::wcstod _LIBCPP_USING_IF_EXISTS; + using std::wcstof _LIBCPP_USING_IF_EXISTS; + using std::wcstok _LIBCPP_USING_IF_EXISTS; + using std::wcstol _LIBCPP_USING_IF_EXISTS; + using std::wcstold _LIBCPP_USING_IF_EXISTS; + using std::wcstoll _LIBCPP_USING_IF_EXISTS; + using std::wcstoul _LIBCPP_USING_IF_EXISTS; + using std::wcstoull _LIBCPP_USING_IF_EXISTS; + using std::wcsxfrm _LIBCPP_USING_IF_EXISTS; + using std::wctob _LIBCPP_USING_IF_EXISTS; + using std::wmemchr _LIBCPP_USING_IF_EXISTS; + using std::wmemcmp _LIBCPP_USING_IF_EXISTS; + using std::wmemcpy _LIBCPP_USING_IF_EXISTS; + using std::wmemmove _LIBCPP_USING_IF_EXISTS; + using std::wmemset _LIBCPP_USING_IF_EXISTS; + using std::wprintf _LIBCPP_USING_IF_EXISTS; + using std::wscanf _LIBCPP_USING_IF_EXISTS; + + // [c.mb.wcs], multibyte / wide string and character conversion functions + using std::mbrlen _LIBCPP_USING_IF_EXISTS; + using std::mbrtowc _LIBCPP_USING_IF_EXISTS; + using std::mbsinit _LIBCPP_USING_IF_EXISTS; + using std::mbsrtowcs _LIBCPP_USING_IF_EXISTS; + using std::wcrtomb _LIBCPP_USING_IF_EXISTS; + using std::wcsrtombs _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_WIDE_CHARACTERS +} // namespace std diff --git a/system/lib/libcxx/modules/std/cwctype.inc b/system/lib/libcxx/modules/std/cwctype.inc new file mode 100644 index 0000000000000..5d755d56e0103 --- /dev/null +++ b/system/lib/libcxx/modules/std/cwctype.inc @@ -0,0 +1,35 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wctrans_t _LIBCPP_USING_IF_EXISTS; + using std::wctype_t _LIBCPP_USING_IF_EXISTS; + using std::wint_t _LIBCPP_USING_IF_EXISTS; + + using std::iswalnum _LIBCPP_USING_IF_EXISTS; + using std::iswalpha _LIBCPP_USING_IF_EXISTS; + using std::iswblank _LIBCPP_USING_IF_EXISTS; + using std::iswcntrl _LIBCPP_USING_IF_EXISTS; + using std::iswctype _LIBCPP_USING_IF_EXISTS; + using std::iswdigit _LIBCPP_USING_IF_EXISTS; + using std::iswgraph _LIBCPP_USING_IF_EXISTS; + using std::iswlower _LIBCPP_USING_IF_EXISTS; + using std::iswprint _LIBCPP_USING_IF_EXISTS; + using std::iswpunct _LIBCPP_USING_IF_EXISTS; + using std::iswspace _LIBCPP_USING_IF_EXISTS; + using std::iswupper _LIBCPP_USING_IF_EXISTS; + using std::iswxdigit _LIBCPP_USING_IF_EXISTS; + using std::towctrans _LIBCPP_USING_IF_EXISTS; + using std::towlower _LIBCPP_USING_IF_EXISTS; + using std::towupper _LIBCPP_USING_IF_EXISTS; + using std::wctrans _LIBCPP_USING_IF_EXISTS; + using std::wctype _LIBCPP_USING_IF_EXISTS; +#endif // _LIBCPP_HAS_WIDE_CHARACTERS +} // namespace std diff --git a/system/lib/libcxx/modules/std/deque.inc b/system/lib/libcxx/modules/std/deque.inc new file mode 100644 index 0000000000000..5abf88816a98a --- /dev/null +++ b/system/lib/libcxx/modules/std/deque.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [deque], class template deque + using std::deque; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [deque.erasure], erasure + using std::erase; + using std::erase_if; + + namespace pmr { + using std::pmr::deque; + } +} // namespace std diff --git a/system/lib/libcxx/modules/std/exception.inc b/system/lib/libcxx/modules/std/exception.inc new file mode 100644 index 0000000000000..02b0f80190e5b --- /dev/null +++ b/system/lib/libcxx/modules/std/exception.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::bad_exception; + using std::current_exception; + using std::exception; + using std::exception_ptr; + using std::get_terminate; + using std::make_exception_ptr; + using std::nested_exception; + using std::rethrow_exception; + using std::rethrow_if_nested; + using std::set_terminate; + using std::terminate; + using std::terminate_handler; + using std::throw_with_nested; +#ifdef _LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION + using std::uncaught_exception; +#endif + using std::uncaught_exceptions; +} // namespace std diff --git a/system/lib/libcxx/modules/std/execution.inc b/system/lib/libcxx/modules/std/execution.inc new file mode 100644 index 0000000000000..86c1cd7622b9b --- /dev/null +++ b/system/lib/libcxx/modules/std/execution.inc @@ -0,0 +1,36 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifdef _LIBCPP_ENABLE_EXPERIMENTAL +export namespace std { + // [execpol.type], execution policy type trait + using std::is_execution_policy; + using std::is_execution_policy_v; +} // namespace std + +export namespace std::execution { + // [execpol.seq], sequenced execution policy + using std::execution::sequenced_policy; + + // [execpol.par], parallel execution policy + using std::execution::parallel_policy; + + // [execpol.parunseq], parallel and unsequenced execution policy + using std::execution::parallel_unsequenced_policy; + + // [execpol.unseq], unsequenced execution policy + using std::execution::unsequenced_policy; + + // [execpol.objects], execution policy objects + using std::execution::par; + using std::execution::par_unseq; + using std::execution::seq; + using std::execution::unseq; +} // namespace std::execution +#endif // _LIBCPP_ENABLE_EXPERIMENTAL diff --git a/system/lib/libcxx/modules/std/expected.inc b/system/lib/libcxx/modules/std/expected.inc new file mode 100644 index 0000000000000..c21683cb90d63 --- /dev/null +++ b/system/lib/libcxx/modules/std/expected.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [expected.unexpected], class template unexpected + using std::unexpected; + + // [expected.bad], class template bad_expected_access + using std::bad_expected_access; + + // in-place construction of unexpected values + using std::unexpect; + using std::unexpect_t; + + // [expected.expected], class template expected + using std::expected; +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/std/filesystem.inc b/system/lib/libcxx/modules/std/filesystem.inc new file mode 100644 index 0000000000000..0437a32802501 --- /dev/null +++ b/system/lib/libcxx/modules/std/filesystem.inc @@ -0,0 +1,121 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std::filesystem { + // [fs.class.path], paths + using std::filesystem::path; + + // [fs.path.nonmember], path non-member functions + using std::filesystem::hash_value; + using std::filesystem::swap; + + // [fs.class.filesystem.error], filesystem errors + using std::filesystem::filesystem_error; + +#if _LIBCPP_HAS_FILESYSTEM + // [fs.class.directory.entry], directory entries + using std::filesystem::directory_entry; + + // [fs.class.directory.iterator], directory iterators + using std::filesystem::directory_iterator; + + // [fs.dir.itr.nonmembers], range access for directory iterators + using std::filesystem::begin; + using std::filesystem::end; + + // [fs.class.rec.dir.itr], recursive directory iterators + using std::filesystem::recursive_directory_iterator; +#endif // _LIBCPP_HAS_FILESYSTEM + + // [fs.rec.dir.itr.nonmembers], range access for recursive directory iterators + + // [fs.class.file.status], file status + using std::filesystem::file_status; + using std::filesystem::space_info; + + // [fs.enum], enumerations + using std::filesystem::copy_options; + using std::filesystem::directory_options; + using std::filesystem::file_type; + using std::filesystem::perm_options; + using std::filesystem::perms; + + using std::filesystem::file_time_type; + + // several of these enums are a bitmask type. + // [bitmask.types] specified operators + using std::filesystem::operator&; + using std::filesystem::operator&=; + using std::filesystem::operator^; + using std::filesystem::operator^=; + using std::filesystem::operator|; + using std::filesystem::operator|=; + using std::filesystem::operator~; + +#if _LIBCPP_HAS_FILESYSTEM + // [fs.op.funcs], filesystem operations + using std::filesystem::absolute; + using std::filesystem::canonical; + using std::filesystem::copy; + using std::filesystem::copy_file; + using std::filesystem::copy_symlink; + using std::filesystem::create_directories; + using std::filesystem::create_directory; + using std::filesystem::create_directory_symlink; + using std::filesystem::create_hard_link; + using std::filesystem::create_symlink; + using std::filesystem::current_path; + using std::filesystem::equivalent; + using std::filesystem::exists; + using std::filesystem::file_size; + using std::filesystem::hard_link_count; + + using std::filesystem::is_block_file; + using std::filesystem::is_character_file; + using std::filesystem::is_directory; + using std::filesystem::is_empty; + using std::filesystem::is_fifo; + using std::filesystem::is_other; + using std::filesystem::is_regular_file; + using std::filesystem::is_socket; + using std::filesystem::is_symlink; + + using std::filesystem::last_write_time; + using std::filesystem::permissions; + using std::filesystem::proximate; + using std::filesystem::read_symlink; + using std::filesystem::relative; + using std::filesystem::remove; + + using std::filesystem::remove_all; + using std::filesystem::rename; + using std::filesystem::resize_file; + using std::filesystem::space; + using std::filesystem::status; + using std::filesystem::status_known; + using std::filesystem::symlink_status; + using std::filesystem::temp_directory_path; + using std::filesystem::weakly_canonical; +#endif // _LIBCPP_HAS_FILESYSTEM + + // [depr.fs.path.factory] + using std::filesystem::u8path; +} // namespace std::filesystem + +// [fs.path.hash], hash support +export namespace std { + using std::hash; +} + +export namespace std::ranges { +#if _LIBCPP_HAS_FILESYSTEM + using std::ranges::enable_borrowed_range; + using std::ranges::enable_view; +#endif // _LIBCPP_HAS_FILESYSTEM +} // namespace std::ranges diff --git a/system/lib/libcxx/modules/std/flat_map.inc b/system/lib/libcxx/modules/std/flat_map.inc new file mode 100644 index 0000000000000..e9521749dc4a8 --- /dev/null +++ b/system/lib/libcxx/modules/std/flat_map.inc @@ -0,0 +1,31 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [flat.map], class template flat_map + using std::flat_map; + + using std::sorted_unique; + using std::sorted_unique_t; + + using std::uses_allocator; + + // [flat.map.erasure], erasure for flat_map + using std::erase_if; + + // [flat.multimap], class template flat_multimap + using std::flat_multimap; + + using std::sorted_equivalent; + using std::sorted_equivalent_t; + + // [flat.multimap.erasure], erasure for flat_multimap +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/std/flat_set.inc b/system/lib/libcxx/modules/std/flat_set.inc new file mode 100644 index 0000000000000..51f39b75458b9 --- /dev/null +++ b/system/lib/libcxx/modules/std/flat_set.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [flat.set], class template flat_­set + using std::flat_set; + + using std::sorted_unique; + using std::sorted_unique_t; + + using std::uses_allocator; + + // [flat.set.erasure], erasure for flat_­set + using std::erase_if; + + // [flat.multiset], class template flat_­multiset + using std::flat_multiset; + + using std::sorted_equivalent; + using std::sorted_equivalent_t; +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/std/format.inc b/system/lib/libcxx/modules/std/format.inc new file mode 100644 index 0000000000000..fb0f971aeb0e9 --- /dev/null +++ b/system/lib/libcxx/modules/std/format.inc @@ -0,0 +1,84 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [format.context], class template basic_format_context + using std::basic_format_context; + using std::format_context; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wformat_context; +#endif + + // [format.args], class template basic_format_args + using std::basic_format_args; + using std::format_args; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wformat_args; +#endif + + // [format.fmt.string], class template basic_format_string + using std::basic_format_string; + using std::format_string; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wformat_string; +#endif +#if _LIBCPP_STD_VER >= 26 + using std::runtime_format; +#endif // _LIBCPP_STD_VER >= 26 + + // [format.functions], formatting functions + using std::format; + using std::format_to; + using std::vformat; + using std::vformat_to; + + using std::format_to_n; + using std::format_to_n_result; + using std::formatted_size; + + // [format.formatter], formatter + using std::formatter; + +#if _LIBCPP_STD_VER >= 23 + using std::enable_nonlocking_formatter_optimization; + + // [format.formattable], concept formattable + using std::formattable; +#endif + + // [format.parse.ctx], class template basic_format_parse_context + using std::basic_format_parse_context; + using std::format_parse_context; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wformat_parse_context; +#endif + +#if _LIBCPP_STD_VER >= 23 + // [format.range], formatting of ranges + // [format.range.fmtkind], variable template format_kind + using std::format_kind; + using std::range_format; + + // [format.range.formatter], class template range_formatter + using std::range_formatter; +#endif // _LIBCPP_STD_VER >= 23 + + // [format.arg], class template basic_format_arg + using std::basic_format_arg; + using std::visit_format_arg; + + // [format.arg.store], class template format-arg-store + using std::make_format_args; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::make_wformat_args; +#endif + + // [format.error], class format_error + using std::format_error; +} // namespace std diff --git a/system/lib/libcxx/modules/std/forward_list.inc b/system/lib/libcxx/modules/std/forward_list.inc new file mode 100644 index 0000000000000..c9585b5523b36 --- /dev/null +++ b/system/lib/libcxx/modules/std/forward_list.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [forward.list], class template forward_list + using std::forward_list; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [forward.list.erasure], erasure + using std::erase; + using std::erase_if; + + namespace pmr { + using std::pmr::forward_list; + } +} // namespace std diff --git a/system/lib/libcxx/modules/std/fstream.inc b/system/lib/libcxx/modules/std/fstream.inc new file mode 100644 index 0000000000000..1773c5509e9a7 --- /dev/null +++ b/system/lib/libcxx/modules/std/fstream.inc @@ -0,0 +1,44 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_filebuf; + +# if _LIBCPP_HAS_FILESYSTEM + using std::swap; +# endif + + using std::filebuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wfilebuf; +# endif + + using std::basic_ifstream; + + using std::ifstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wifstream; +# endif + + using std::basic_ofstream; + + using std::ofstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wofstream; +# endif + + using std::basic_fstream; + + using std::fstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wfstream; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/functional.inc b/system/lib/libcxx/modules/std/functional.inc new file mode 100644 index 0000000000000..9ef8f584611fc --- /dev/null +++ b/system/lib/libcxx/modules/std/functional.inc @@ -0,0 +1,124 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [func.invoke], invoke + using std::invoke; +#if _LIBCPP_STD_VER >= 23 + using std::invoke_r; +#endif + +#if _LIBCPP_STD_VER >= 20 + using std::basic_common_reference; +#endif + + // [refwrap], reference_wrapper + using std::reference_wrapper; + + using std::cref; + using std::ref; + + // [arithmetic.operations], arithmetic operations + using std::divides; + using std::minus; + using std::modulus; + using std::multiplies; + using std::negate; + using std::plus; + // [comparisons], comparisons + using std::equal_to; + using std::greater; + using std::greater_equal; + using std::less; + using std::less_equal; + using std::not_equal_to; + + // [comparisons.three.way], class compare_three_way + using std::compare_three_way; + + // [logical.operations], logical operations + using std::logical_and; + using std::logical_not; + using std::logical_or; + + // [bitwise.operations], bitwise operations + using std::bit_and; + using std::bit_not; + using std::bit_or; + using std::bit_xor; + + // [func.identity], identity + using std::identity; + + // [func.not.fn], function template not_fn + using std::not_fn; + + // [func.bind.partial], function templates bind_front and bind_back + using std::bind_front; +#if _LIBCPP_STD_VER >= 23 + using std::bind_back; +#endif + + // [func.bind], bind + using std::is_bind_expression; + using std::is_bind_expression_v; + using std::is_placeholder; + using std::is_placeholder_v; + + using std::bind; + + namespace placeholders { + // M is the implementation-defined number of placeholders + using std::placeholders::_1; + using std::placeholders::_10; + using std::placeholders::_2; + using std::placeholders::_3; + using std::placeholders::_4; + using std::placeholders::_5; + using std::placeholders::_6; + using std::placeholders::_7; + using std::placeholders::_8; + using std::placeholders::_9; + } // namespace placeholders + + // [func.memfn], member function adaptors + using std::mem_fn; + + // [func.wrap], polymorphic function wrappers + using std::bad_function_call; + + using std::function; + + using std::swap; + + using std::operator==; + + // [func.wrap.move], move only wrapper + // using std::move_only_function; + + // [func.search], searchers + using std::default_searcher; + + using std::boyer_moore_searcher; + + using std::boyer_moore_horspool_searcher; + + // [unord.hash], class template hash + using std::hash; + + namespace ranges { + // [range.cmp], concept-constrained comparisons + using std::ranges::equal_to; + using std::ranges::greater; + using std::ranges::greater_equal; + using std::ranges::less; + using std::ranges::less_equal; + using std::ranges::not_equal_to; + } // namespace ranges +} // namespace std diff --git a/system/lib/libcxx/modules/std/future.inc b/system/lib/libcxx/modules/std/future.inc new file mode 100644 index 0000000000000..1abf9b3ef612f --- /dev/null +++ b/system/lib/libcxx/modules/std/future.inc @@ -0,0 +1,55 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + using std::future_errc; + using std::future_status; + using std::launch; + + // launch is a bitmask type. + // [bitmask.types] specified operators + using std::operator&; + using std::operator&=; + using std::operator^; + using std::operator^=; + using std::operator|; + using std::operator|=; + using std::operator~; + + // [futures.errors], error handling + using std::is_error_code_enum; + using std::make_error_code; + using std::make_error_condition; + + using std::future_category; + + // [futures.future.error], class future_error + using std::future_error; + + // [futures.promise], class template promise + using std::promise; + + using std::swap; + + using std::uses_allocator; + + // [futures.unique.future], class template future + using std::future; + + // [futures.shared.future], class template shared_future + using std::shared_future; + + // [futures.task], class template packaged_task + using std::packaged_task; + + // [futures.async], function template async + using std::async; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/std/generator.inc b/system/lib/libcxx/modules/std/generator.inc new file mode 100644 index 0000000000000..43fb0daf5c659 --- /dev/null +++ b/system/lib/libcxx/modules/std/generator.inc @@ -0,0 +1,14 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 + using std::generator; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/hazard_pointer.inc b/system/lib/libcxx/modules/std/hazard_pointer.inc new file mode 100644 index 0000000000000..e56f4d0bf4363 --- /dev/null +++ b/system/lib/libcxx/modules/std/hazard_pointer.inc @@ -0,0 +1,23 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 +# if _LIBCPP_STD_VER >= 23 + // 4.1.3, class template hazard_pointer_obj_base + using std::hazard_pointer_obj_base; + // 4.1.4, class hazard_pointer + using std::hazard_pointer; + // 4.1.5, Construct non-empty hazard_pointer + using std::make_hazard_pointer; + // 4.1.6, Hazard pointer swap + using std::swap; +# endif // _LIBCPP_STD_VER >= 23 +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/initializer_list.inc b/system/lib/libcxx/modules/std/initializer_list.inc new file mode 100644 index 0000000000000..1dbeb220ca3c5 --- /dev/null +++ b/system/lib/libcxx/modules/std/initializer_list.inc @@ -0,0 +1,16 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::initializer_list; + + // [support.initlist.range], initializer list range access + using std::begin; + using std::end; +} // namespace std diff --git a/system/lib/libcxx/modules/std/iomanip.inc b/system/lib/libcxx/modules/std/iomanip.inc new file mode 100644 index 0000000000000..f525f81cf117d --- /dev/null +++ b/system/lib/libcxx/modules/std/iomanip.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::get_money; + using std::get_time; + using std::put_money; + using std::put_time; + using std::resetiosflags; + using std::setbase; + using std::setfill; + using std::setiosflags; + using std::setprecision; + using std::setw; + + using std::quoted; +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/ios.inc b/system/lib/libcxx/modules/std/ios.inc new file mode 100644 index 0000000000000..d9e1e97fad55a --- /dev/null +++ b/system/lib/libcxx/modules/std/ios.inc @@ -0,0 +1,76 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::fpos; + // based on [tab:fpos.operations] + using std::operator!=; // Note not affected by P1614, seems like a bug. + using std::operator-; + using std::operator==; + + using std::streamoff; + using std::streamsize; + + using std::basic_ios; + using std::ios_base; + + // [std.ios.manip], manipulators + using std::boolalpha; + using std::noboolalpha; + + using std::noshowbase; + using std::showbase; + + using std::noshowpoint; + using std::showpoint; + + using std::noshowpos; + using std::showpos; + + using std::noskipws; + using std::skipws; + + using std::nouppercase; + using std::uppercase; + + using std::nounitbuf; + using std::unitbuf; + + // [adjustfield.manip], adjustfield + using std::internal; + using std::left; + using std::right; + + // [basefield.manip], basefield + using std::dec; + using std::hex; + using std::oct; + + // [floatfield.manip], floatfield + using std::defaultfloat; + using std::fixed; + using std::hexfloat; + using std::scientific; + + // [error.reporting], error reporting + using std::io_errc; + + using std::iostream_category; + using std::is_error_code_enum; + using std::make_error_code; + using std::make_error_condition; + + // [iosfwd.syn] + using std::ios; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wios; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/iosfwd.inc b/system/lib/libcxx/modules/std/iosfwd.inc new file mode 100644 index 0000000000000..61ed3af6e86ae --- /dev/null +++ b/system/lib/libcxx/modules/std/iosfwd.inc @@ -0,0 +1,40 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::streampos; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstreampos; +#endif + using std::u16streampos; + using std::u32streampos; +#if _LIBCPP_HAS_CHAR8_T + using std::u8streampos; +#endif + +#if _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM + using std::basic_osyncstream; + using std::basic_syncbuf; +#endif + + using std::istreambuf_iterator; + using std::ostreambuf_iterator; + +#if _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM + using std::osyncstream; + using std::syncbuf; + +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wosyncstream; + using std::wsyncbuf; +# endif +#endif // _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM + + using std::fpos; +} // namespace std diff --git a/system/lib/libcxx/modules/std/iostream.inc b/system/lib/libcxx/modules/std/iostream.inc new file mode 100644 index 0000000000000..76ff94923dea4 --- /dev/null +++ b/system/lib/libcxx/modules/std/iostream.inc @@ -0,0 +1,24 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::cerr; + using std::cin; + using std::clog; + using std::cout; + +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcerr; + using std::wcin; + using std::wclog; + using std::wcout; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/istream.inc b/system/lib/libcxx/modules/std/istream.inc new file mode 100644 index 0000000000000..19fcd5db3de70 --- /dev/null +++ b/system/lib/libcxx/modules/std/istream.inc @@ -0,0 +1,30 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_istream; + + using std::istream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wistream; +# endif + + using std::basic_iostream; + + using std::iostream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wiostream; +# endif + + using std::ws; + + using std::operator>>; +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/iterator.inc b/system/lib/libcxx/modules/std/iterator.inc new file mode 100644 index 0000000000000..10c63d74e6e05 --- /dev/null +++ b/system/lib/libcxx/modules/std/iterator.inc @@ -0,0 +1,244 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [iterator.assoc.types], associated types + // [incrementable.traits], incrementable traits + using std::incrementable_traits; + using std::iter_difference_t; + + using std::indirectly_readable_traits; + using std::iter_value_t; + + // [iterator.traits], iterator traits + using std::iterator_traits; + + using std::iter_reference_t; + + namespace ranges { + // [iterator.cust], customization point objects + inline namespace __cpo { + // [iterator.cust.move], ranges::iter_move + using std::ranges::__cpo::iter_move; + + // [iterator.cust.swap], ranges::iter_swap + using std::ranges::__cpo::iter_swap; + } // namespace __cpo + } // namespace ranges + + using std::iter_rvalue_reference_t; + + // [iterator.concepts], iterator concepts + // [iterator.concept.readable], concept indirectly_readable + using std::indirectly_readable; + + using std::iter_common_reference_t; + + // [iterator.concept.writable], concept indirectly_writable + using std::indirectly_writable; + + // [iterator.concept.winc], concept weakly_incrementable + using std::weakly_incrementable; + + // [iterator.concept.inc], concept incrementable + using std::incrementable; + + // [iterator.concept.iterator], concept input_or_output_iterator + using std::input_or_output_iterator; + + // [iterator.concept.sentinel], concept sentinel_for + using std::sentinel_for; + + // [iterator.concept.sizedsentinel], concept sized_sentinel_for + using std::disable_sized_sentinel_for; + + using std::sized_sentinel_for; + + // [iterator.concept.input], concept input_iterator + using std::input_iterator; + + // [iterator.concept.output], concept output_iterator + using std::output_iterator; + + // [iterator.concept.forward], concept forward_iterator + using std::forward_iterator; + + // [iterator.concept.bidir], concept bidirectional_iterator + using std::bidirectional_iterator; + + // [iterator.concept.random.access], concept random_access_iterator + using std::random_access_iterator; + + // [iterator.concept.contiguous], concept contiguous_iterator + using std::contiguous_iterator; + + // [indirectcallable], indirect callable requirements + // [indirectcallable.indirectinvocable], indirect callables + using std::indirectly_unary_invocable; + + using std::indirectly_regular_unary_invocable; + + using std::indirect_unary_predicate; + + using std::indirect_binary_predicate; + + using std::indirect_equivalence_relation; + + using std::indirect_strict_weak_order; + + using std::indirect_result_t; + + // [projected], projected + using std::projected; + + // [alg.req], common algorithm requirements + // [alg.req.ind.move], concept indirectly_movable + using std::indirectly_movable; + + using std::indirectly_movable_storable; + + // [alg.req.ind.copy], concept indirectly_copyable + using std::indirectly_copyable; + + using std::indirectly_copyable_storable; + + // [alg.req.ind.swap], concept indirectly_swappable + using std::indirectly_swappable; + + // [alg.req.ind.cmp], concept indirectly_comparable + using std::indirectly_comparable; + + // [alg.req.permutable], concept permutable + using std::permutable; + + // [alg.req.mergeable], concept mergeable + using std::mergeable; + + // [alg.req.sortable], concept sortable + using std::sortable; + + // [iterator.primitives], primitives + // [std.iterator.tags], iterator tags + using std::bidirectional_iterator_tag; + using std::contiguous_iterator_tag; + using std::forward_iterator_tag; + using std::input_iterator_tag; + using std::output_iterator_tag; + using std::random_access_iterator_tag; + + // [iterator.operations], iterator operations + using std::advance; + using std::distance; + using std::next; + using std::prev; + + // [range.iter.ops], range iterator operations + namespace ranges { + // [range.iter.op.advance], ranges​::​advance + using std::ranges::advance; + + // [range.iter.op.distance], ranges​::​distance + using std::ranges::distance; + + // [range.iter.op.next], ranges​::​next + using std::ranges::next; + + // [range.iter.op.prev], ranges​::​prev + using std::ranges::prev; + } // namespace ranges + + // [predef.iterators], predefined iterators and sentinels + // [reverse.iterators], reverse iterators + using std::reverse_iterator; + + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + using std::operator-; + using std::operator+; + + using std::make_reverse_iterator; + + // using std::disable_sized_sentinel_for; + + // [insert.iterators], insert iterators + using std::back_insert_iterator; + using std::back_inserter; + + using std::front_insert_iterator; + using std::front_inserter; + + using std::insert_iterator; + using std::inserter; + + // [const.iterators], constant iterators and sentinels + // [const.iterators.alias], alias templates + // using std::const_iterator; + // using std::const_sentinel; + // using std::iter_const_reference_t; + + // [const.iterators.iterator], class template basic_const_iterator + // using std::basic_const_iterator; + + // using std::common_type; + + // using std::make_const_iterator; + + // [move.iterators], move iterators and sentinels + using std::move_iterator; + + using std::make_move_iterator; + + using std::move_sentinel; + + using std::common_iterator; + + // [default.sentinel], default sentinel + using std::default_sentinel; + using std::default_sentinel_t; + + // [iterators.counted], counted iterators + using std::counted_iterator; + + // [unreachable.sentinel], unreachable sentinel + using std::unreachable_sentinel; + using std::unreachable_sentinel_t; + + // [stream.iterators], stream iterators + using std::istream_iterator; + + using std::ostream_iterator; + + using std::istreambuf_iterator; + using std::ostreambuf_iterator; + + // [iterator.range], range access + using std::begin; + using std::cbegin; + using std::cend; + using std::crbegin; + using std::crend; + using std::end; + using std::rbegin; + using std::rend; + + using std::empty; + using std::size; + using std::ssize; + + using std::data; + + // [depr.iterator] + using std::iterator; +} // namespace std diff --git a/system/lib/libcxx/modules/std/latch.inc b/system/lib/libcxx/modules/std/latch.inc new file mode 100644 index 0000000000000..c64be15808e25 --- /dev/null +++ b/system/lib/libcxx/modules/std/latch.inc @@ -0,0 +1,14 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + using std::latch; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/std/limits.inc b/system/lib/libcxx/modules/std/limits.inc new file mode 100644 index 0000000000000..9aae993baa6f7 --- /dev/null +++ b/system/lib/libcxx/modules/std/limits.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [fp.style], floating-point type properties + using std::float_denorm_style; + using std::float_round_style; + + // [numeric.limits], class template numeric_­limits + using std::numeric_limits; +} // namespace std diff --git a/system/lib/libcxx/modules/std/list.inc b/system/lib/libcxx/modules/std/list.inc new file mode 100644 index 0000000000000..f38094c9b8a7c --- /dev/null +++ b/system/lib/libcxx/modules/std/list.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [list], class template list + using std::list; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [list.erasure], erasure + using std::erase; + using std::erase_if; + + namespace pmr { + using std::pmr::list; + } +} // namespace std diff --git a/system/lib/libcxx/modules/std/locale.inc b/system/lib/libcxx/modules/std/locale.inc new file mode 100644 index 0000000000000..cdc7441ece52e --- /dev/null +++ b/system/lib/libcxx/modules/std/locale.inc @@ -0,0 +1,81 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + // [locale], locale + using std::has_facet; + using std::locale; + using std::use_facet; + + // [locale.convenience], convenience interfaces + using std::isalnum; + using std::isalpha; + using std::isblank; + using std::iscntrl; + using std::isdigit; + using std::isgraph; + using std::islower; + using std::isprint; + using std::ispunct; + using std::isspace; + using std::isupper; + using std::isxdigit; + using std::tolower; + using std::toupper; + + // [category.ctype], ctype + using std::codecvt; + using std::codecvt_base; + using std::codecvt_byname; + using std::ctype; + using std::ctype_base; + using std::ctype_byname; + + // [category.numeric], numeric + using std::num_get; + using std::num_put; + using std::numpunct; + using std::numpunct_byname; + + // [category.collate], collation + using std::collate; + using std::collate_byname; + + // [category.time], date and time + using std::time_base; + using std::time_get; + using std::time_get_byname; + using std::time_put; + using std::time_put_byname; + + // [category.monetary], money + using std::money_base; + using std::money_get; + using std::money_put; + using std::moneypunct; + using std::moneypunct_byname; + + // [category.messages], message retrieval + using std::messages; + using std::messages_base; + using std::messages_byname; + +# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT) + + // [depr.conversions.buffer] + using std::wbuffer_convert; + + // [depr.conversions.string] + using std::wstring_convert; + +# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT) + +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/map.inc b/system/lib/libcxx/modules/std/map.inc new file mode 100644 index 0000000000000..ed154e3e8c6fd --- /dev/null +++ b/system/lib/libcxx/modules/std/map.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [map], class template map + using std::map; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [map.erasure], erasure for map + using std::erase_if; + + // [multimap], class template multimap + using std::multimap; + + namespace pmr { + using std::pmr::map; + using std::pmr::multimap; + } // namespace pmr +} // namespace std diff --git a/system/lib/libcxx/modules/std/mdspan.inc b/system/lib/libcxx/modules/std/mdspan.inc new file mode 100644 index 0000000000000..c8cc78badb7d5 --- /dev/null +++ b/system/lib/libcxx/modules/std/mdspan.inc @@ -0,0 +1,39 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [mdspan.extents], class template extents + using std::extents; + + // [mdspan.extents.dextents], alias template dextents + using std::dextents; + +# if _LIBCPP_STD_VER >= 26 + // [mdspan.extents.dims] + using std::dims; +# endif // _LIBCPP_STD_VER >= 26 + + // [mdspan.layout], layout mapping + using std::layout_left; + using std::layout_right; + using std::layout_stride; + + // [mdspan.accessor.default], class template default_accessor + using std::default_accessor; + +# if _LIBCPP_STD_VER >= 26 + // [mdspan.accessor.aligned], class template aligned_accessor + using std::aligned_accessor; +# endif // _LIBCPP_STD_VER >= 26 + + // [mdspan.mdspan], class template mdspan + using std::mdspan; +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/std/memory.inc b/system/lib/libcxx/modules/std/memory.inc new file mode 100644 index 0000000000000..c25e9e3443e9c --- /dev/null +++ b/system/lib/libcxx/modules/std/memory.inc @@ -0,0 +1,215 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [pointer.traits], pointer traits + using std::pointer_traits; + + // [pointer.conversion], pointer conversion + using std::to_address; + + // [ptr.align], pointer alignment + using std::align; + using std::assume_aligned; +#if _LIBCPP_STD_VER >= 26 + using std::is_sufficiently_aligned; +#endif + + // [obj.lifetime], explicit lifetime management + // using std::start_lifetime_as; + // using std::start_lifetime_as_array; + + // [allocator.tag], allocator argument tag + using std::allocator_arg; + using std::allocator_arg_t; + + // [allocator.uses], uses_allocator + using std::uses_allocator; + + // [allocator.uses.trait], uses_allocator + using std::uses_allocator_v; + + // [allocator.uses.construction], uses-allocator construction + using std::uses_allocator_construction_args; + + using std::make_obj_using_allocator; + using std::uninitialized_construct_using_allocator; + + // [allocator.traits], allocator traits + using std::allocator_traits; + +#if _LIBCPP_STD_VER >= 23 + using std::allocation_result; +#endif + + // [default.allocator], the default allocator + using std::allocator; + using std::operator==; + + // [specialized.addressof], addressof + using std::addressof; + + // [specialized.algorithms], specialized algorithms + // [special.mem.concepts], special memory concepts + + using std::uninitialized_default_construct; + using std::uninitialized_default_construct_n; + + namespace ranges { + using std::ranges::uninitialized_default_construct; + using std::ranges::uninitialized_default_construct_n; + } // namespace ranges + + using std::uninitialized_value_construct; + using std::uninitialized_value_construct_n; + + namespace ranges { + using std::ranges::uninitialized_value_construct; + using std::ranges::uninitialized_value_construct_n; + } // namespace ranges + + using std::uninitialized_copy; + using std::uninitialized_copy_n; + + namespace ranges { + using std::ranges::uninitialized_copy; + using std::ranges::uninitialized_copy_result; + + using std::ranges::uninitialized_copy_n; + using std::ranges::uninitialized_copy_n_result; + } // namespace ranges + + using std::uninitialized_move; + using std::uninitialized_move_n; + + namespace ranges { + using std::ranges::uninitialized_move; + using std::ranges::uninitialized_move_result; + + using std::ranges::uninitialized_move_n; + using std::ranges::uninitialized_move_n_result; + } // namespace ranges + + using std::uninitialized_fill; + using std::uninitialized_fill_n; + + namespace ranges { + using std::ranges::uninitialized_fill; + using std::ranges::uninitialized_fill_n; + } // namespace ranges + + // [specialized.construct], construct_at + using std::construct_at; + + namespace ranges { + using std::ranges::construct_at; + } + // [specialized.destroy], destroy + using std::destroy; + using std::destroy_at; + using std::destroy_n; + + namespace ranges { + using std::ranges::destroy; + using std::ranges::destroy_at; + using std::ranges::destroy_n; + } // namespace ranges + + // [unique.ptr], class template unique_ptr + using std::default_delete; + using std::unique_ptr; + + using std::make_unique; + using std::make_unique_for_overwrite; + + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + using std::operator<<; + + // [util.smartptr.weak.bad], class bad_weak_ptr + using std::bad_weak_ptr; + + // [util.smartptr.shared], class template shared_ptr + using std::shared_ptr; + + // [util.smartptr.shared.create], shared_ptr creation + using std::allocate_shared; + using std::allocate_shared_for_overwrite; + using std::make_shared; + using std::make_shared_for_overwrite; + + // [util.smartptr.shared.spec], shared_ptr specialized algorithms + using std::swap; + + // [util.smartptr.shared.cast], shared_ptr casts + using std::const_pointer_cast; + using std::dynamic_pointer_cast; + using std::reinterpret_pointer_cast; + using std::static_pointer_cast; + +#if _LIBCPP_HAS_RTTI + using std::get_deleter; +#endif // _LIBCPP_HAS_RTTI + + // [util.smartptr.shared.io], shared_ptr I/O + + // [util.smartptr.weak], class template weak_ptr + using std::weak_ptr; + + // [util.smartptr.weak.spec], weak_ptr specialized algorithms + + // [util.smartptr.ownerless], class template owner_less + using std::owner_less; + + // [util.smartptr.enab], class template enable_shared_from_this + using std::enable_shared_from_this; + + // [util.smartptr.hash], hash support + using std::hash; + + // [util.smartptr.atomic], atomic smart pointers + // using std::atomic; + +#if _LIBCPP_STD_VER >= 23 + // [out.ptr.t], class template out_ptr_t + using std::out_ptr_t; + + // [out.ptr], function template out_ptr + using std::out_ptr; + + // [inout.ptr.t], class template inout_ptr_t + using std::inout_ptr_t; + + // [inout.ptr], function template inout_ptr + using std::inout_ptr; +#endif // _LIBCPP_STD_VER >= 23 + +#if _LIBCPP_HAS_THREADS + // [depr.util.smartptr.shared.atomic] + using std::atomic_is_lock_free; + + using std::atomic_load; + using std::atomic_load_explicit; + + using std::atomic_store; + using std::atomic_store_explicit; + + using std::atomic_exchange; + using std::atomic_exchange_explicit; + + using std::atomic_compare_exchange_strong; + using std::atomic_compare_exchange_strong_explicit; + using std::atomic_compare_exchange_weak; + using std::atomic_compare_exchange_weak_explicit; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/std/memory_resource.inc b/system/lib/libcxx/modules/std/memory_resource.inc new file mode 100644 index 0000000000000..740179baea273 --- /dev/null +++ b/system/lib/libcxx/modules/std/memory_resource.inc @@ -0,0 +1,30 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std::pmr { + // [mem.res.class], class memory_resource + using std::pmr::memory_resource; + + using std::pmr::operator==; + + // [mem.poly.allocator.class], class template polymorphic_allocator + using std::pmr::polymorphic_allocator; + + // [mem.res.global], global memory resources + using std::pmr::get_default_resource; + using std::pmr::new_delete_resource; + using std::pmr::null_memory_resource; + using std::pmr::set_default_resource; + + // [mem.res.pool], pool resource classes + using std::pmr::monotonic_buffer_resource; + using std::pmr::pool_options; + using std::pmr::synchronized_pool_resource; + using std::pmr::unsynchronized_pool_resource; +} // namespace std::pmr diff --git a/system/lib/libcxx/modules/std/mutex.inc b/system/lib/libcxx/modules/std/mutex.inc new file mode 100644 index 0000000000000..7a12506424a2d --- /dev/null +++ b/system/lib/libcxx/modules/std/mutex.inc @@ -0,0 +1,44 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.mutex.class], class mutex + using std::mutex; + // [thread.mutex.recursive], class recursive_mutex + using std::recursive_mutex; + // [thread.timedmutex.class] class timed_mutex + using std::timed_mutex; + // [thread.timedmutex.recursive], class recursive_timed_mutex + using std::recursive_timed_mutex; + + using std::adopt_lock_t; + using std::defer_lock_t; + using std::try_to_lock_t; + + using std::adopt_lock; + using std::defer_lock; + using std::try_to_lock; + + // [thread.lock], locks + using std::lock_guard; + using std::scoped_lock; + using std::unique_lock; + + using std::swap; + + // [thread.lock.algorithm], generic locking algorithms + using std::lock; + using std::try_lock; +#endif // _LIBCPP_HAS_THREADS + + using std::once_flag; + + using std::call_once; +} // namespace std diff --git a/system/lib/libcxx/modules/std/new.inc b/system/lib/libcxx/modules/std/new.inc new file mode 100644 index 0000000000000..76d0a29ed98f6 --- /dev/null +++ b/system/lib/libcxx/modules/std/new.inc @@ -0,0 +1,44 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [alloc.errors], storage allocation errors + using std::bad_alloc; + using std::bad_array_new_length; + + using std::destroying_delete; + using std::destroying_delete_t; + + // global operator new control + using std::align_val_t; + + using std::nothrow; + using std::nothrow_t; + + using std::get_new_handler; + using std::new_handler; + using std::set_new_handler; + + // [ptr.launder], pointer optimization barrier + using std::launder; +#if _LIBCPP_STD_VER >= 17 +# if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE) + // [hardware.interference], hardware interference size + using std::hardware_constructive_interference_size; + using std::hardware_destructive_interference_size; +# endif +#endif // _LIBCPP_STD_VER >= 17 +} // namespace std + +export { + using ::operator new; + using ::operator delete; + using ::operator new[]; + using ::operator delete[]; +} // export diff --git a/system/lib/libcxx/modules/std/numbers.inc b/system/lib/libcxx/modules/std/numbers.inc new file mode 100644 index 0000000000000..2f55f442b18dc --- /dev/null +++ b/system/lib/libcxx/modules/std/numbers.inc @@ -0,0 +1,38 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std::numbers { + using std::numbers::e_v; + using std::numbers::egamma_v; + using std::numbers::inv_pi_v; + using std::numbers::inv_sqrt3_v; + using std::numbers::inv_sqrtpi_v; + using std::numbers::ln10_v; + using std::numbers::ln2_v; + using std::numbers::log10e_v; + using std::numbers::log2e_v; + using std::numbers::phi_v; + using std::numbers::pi_v; + using std::numbers::sqrt2_v; + using std::numbers::sqrt3_v; + + using std::numbers::e; + using std::numbers::egamma; + using std::numbers::inv_pi; + using std::numbers::inv_sqrt3; + using std::numbers::inv_sqrtpi; + using std::numbers::ln10; + using std::numbers::ln2; + using std::numbers::log10e; + using std::numbers::log2e; + using std::numbers::phi; + using std::numbers::pi; + using std::numbers::sqrt2; + using std::numbers::sqrt3; +} // namespace std::numbers diff --git a/system/lib/libcxx/modules/std/numeric.inc b/system/lib/libcxx/modules/std/numeric.inc new file mode 100644 index 0000000000000..5a549552081d2 --- /dev/null +++ b/system/lib/libcxx/modules/std/numeric.inc @@ -0,0 +1,71 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [accumulate], accumulate + using std::accumulate; + + // [reduce], reduce + using std::reduce; + + // [inner.product], inner product + using std::inner_product; + + // [transform.reduce], transform reduce + using std::transform_reduce; + + // [partial.sum], partial sum + using std::partial_sum; + + // [exclusive.scan], exclusive scan + using std::exclusive_scan; + + // [inclusive.scan], inclusive scan + using std::inclusive_scan; + + // [transform.exclusive.scan], transform exclusive scan + using std::transform_exclusive_scan; + + // [transform.inclusive.scan], transform inclusive scan + using std::transform_inclusive_scan; + + // [adjacent.difference], adjacent difference + using std::adjacent_difference; + + // [numeric.iota], iota + using std::iota; + + namespace ranges { + +#if _LIBCPP_STD_VER >= 23 + using std::ranges::iota; + using std::ranges::iota_result; +#endif // _LIBCPP_STD_VER >= 23 + + } // namespace ranges + + // [numeric.ops.gcd], greatest common divisor + using std::gcd; + + // [numeric.ops.lcm], least common multiple + using std::lcm; + + // [numeric.ops.midpoint], midpoint + using std::midpoint; + +#if _LIBCPP_STD_VER >= 26 + // [numeric.sat], saturation arithmetic + using std::add_sat; + using std::div_sat; + using std::mul_sat; + using std::saturate_cast; + using std::sub_sat; +#endif + +} // namespace std diff --git a/system/lib/libcxx/modules/std/optional.inc b/system/lib/libcxx/modules/std/optional.inc new file mode 100644 index 0000000000000..0f812bc0e24a4 --- /dev/null +++ b/system/lib/libcxx/modules/std/optional.inc @@ -0,0 +1,37 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [optional.optional], class template optional + using std::optional; + + // [optional.nullopt], no-value state indicator + using std::nullopt; + using std::nullopt_t; + + // [optional.bad.access], class bad_optional_access + using std::bad_optional_access; + + // [optional.relops], relational operators + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + // [optional.specalg], specialized algorithms + using std::swap; + + using std::make_optional; + + // [optional.hash], hash support + using std::hash; +} // namespace std diff --git a/system/lib/libcxx/modules/std/ostream.inc b/system/lib/libcxx/modules/std/ostream.inc new file mode 100644 index 0000000000000..e124e6618eec2 --- /dev/null +++ b/system/lib/libcxx/modules/std/ostream.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_ostream; + + using std::ostream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wostream; +# endif + + using std::endl; + using std::ends; + using std::flush; + +# if 0 + using std::emit_on_flush; + using std::flush_emit; + using std::noemit_on_flush; +# endif + using std::operator<<; + +# if _LIBCPP_STD_VER >= 23 + // [ostream.formatted.print], print functions + using std::print; + using std::println; + + using std::vprint_nonunicode; +# if _LIBCPP_HAS_UNICODE + using std::vprint_unicode; +# endif // _LIBCPP_HAS_UNICODE +# endif // _LIBCPP_STD_VER >= 23 + +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/print.inc b/system/lib/libcxx/modules/std/print.inc new file mode 100644 index 0000000000000..5354025ca8bd8 --- /dev/null +++ b/system/lib/libcxx/modules/std/print.inc @@ -0,0 +1,21 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_STD_VER >= 23 + // [print.fun], print functions + using std::print; + using std::println; + + using std::vprint_nonunicode; +# if _LIBCPP_HAS_UNICODE + using std::vprint_unicode; +# endif // _LIBCPP_HAS_UNICODE +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/std/queue.inc b/system/lib/libcxx/modules/std/queue.inc new file mode 100644 index 0000000000000..d2fb18709c709 --- /dev/null +++ b/system/lib/libcxx/modules/std/queue.inc @@ -0,0 +1,27 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [queue], class template queue + using std::queue; + + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + using std::swap; + using std::uses_allocator; + + // [priority.queue], class template priority_queue + using std::priority_queue; +} // namespace std diff --git a/system/lib/libcxx/modules/std/random.inc b/system/lib/libcxx/modules/std/random.inc new file mode 100644 index 0000000000000..0ab6945247c97 --- /dev/null +++ b/system/lib/libcxx/modules/std/random.inc @@ -0,0 +1,115 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [rand.req.urng], uniform random bit generator requirements + using std::uniform_random_bit_generator; + + // [rand.eng.lcong], class template linear_congruential_engine + using std::linear_congruential_engine; + + // [rand.eng.mers], class template mersenne_twister_engine + using std::mersenne_twister_engine; + + // [rand.eng.sub], class template subtract_with_carry_engine + using std::subtract_with_carry_engine; + + // [rand.adapt.disc], class template discard_block_engine + using std::discard_block_engine; + + // [rand.adapt.ibits], class template independent_bits_engine + using std::independent_bits_engine; + + // [rand.adapt.shuf], class template shuffle_order_engine + using std::shuffle_order_engine; + + // [rand.predef], engines and engine adaptors with predefined parameters + using std::knuth_b; + using std::minstd_rand; + using std::minstd_rand0; + using std::mt19937; + using std::mt19937_64; + using std::ranlux24; + using std::ranlux24_base; + using std::ranlux48; + using std::ranlux48_base; + + using std::default_random_engine; + +#if _LIBCPP_HAS_RANDOM_DEVICE + // [rand.device], class random_device + using std::random_device; +#endif + + // [rand.util.seedseq], class seed_seq + using std::seed_seq; + + // [rand.util.canonical], function template generate_canonical + using std::generate_canonical; + + // [rand.dist.uni.int], class template uniform_int_distribution + using std::uniform_int_distribution; + + // [rand.dist.uni.real], class template uniform_real_distribution + using std::uniform_real_distribution; + + // [rand.dist.bern.bernoulli], class bernoulli_distribution + using std::bernoulli_distribution; + + // [rand.dist.bern.bin], class template binomial_distribution + using std::binomial_distribution; + + // [rand.dist.bern.geo], class template geometric_distribution + using std::geometric_distribution; + + // [rand.dist.bern.negbin], class template negative_binomial_distribution + using std::negative_binomial_distribution; + + // [rand.dist.pois.poisson], class template poisson_distribution + using std::poisson_distribution; + + // [rand.dist.pois.exp], class template exponential_distribution + using std::exponential_distribution; + + // [rand.dist.pois.gamma], class template gamma_distribution + using std::gamma_distribution; + + // [rand.dist.pois.weibull], class template weibull_distribution + using std::weibull_distribution; + + // [rand.dist.pois.extreme], class template extreme_value_distribution + using std::extreme_value_distribution; + + // [rand.dist.norm.normal], class template normal_distribution + using std::normal_distribution; + + // [rand.dist.norm.lognormal], class template lognormal_distribution + using std::lognormal_distribution; + + // [rand.dist.norm.chisq], class template chi_squared_distribution + using std::chi_squared_distribution; + + // [rand.dist.norm.cauchy], class template cauchy_distribution + using std::cauchy_distribution; + + // [rand.dist.norm.f], class template fisher_f_distribution + using std::fisher_f_distribution; + + // [rand.dist.norm.t], class template student_t_distribution + using std::student_t_distribution; + + // [rand.dist.samp.discrete], class template discrete_distribution + using std::discrete_distribution; + + // [rand.dist.samp.pconst], class template piecewise_constant_distribution + using std::piecewise_constant_distribution; + + // [rand.dist.samp.plinear], class template piecewise_linear_distribution + using std::piecewise_linear_distribution; +} // namespace std diff --git a/system/lib/libcxx/modules/std/ranges.inc b/system/lib/libcxx/modules/std/ranges.inc new file mode 100644 index 0000000000000..adabeeb22d551 --- /dev/null +++ b/system/lib/libcxx/modules/std/ranges.inc @@ -0,0 +1,365 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + namespace ranges { + inline namespace __cpo { + // [range.access], range access + using std::ranges::__cpo::begin; + using std::ranges::__cpo::cbegin; + using std::ranges::__cpo::cend; + using std::ranges::__cpo::crbegin; + using std::ranges::__cpo::crend; + using std::ranges::__cpo::end; + using std::ranges::__cpo::rbegin; + using std::ranges::__cpo::rend; + + using std::ranges::__cpo::cdata; + using std::ranges::__cpo::data; + using std::ranges::__cpo::empty; + using std::ranges::__cpo::size; + using std::ranges::__cpo::ssize; + } // namespace __cpo + + // [range.range], ranges + using std::ranges::range; + + using std::ranges::enable_borrowed_range; + + using std::ranges::borrowed_range; + + // using std::ranges::const_iterator_t; + // using std::ranges::const_sentinel_t; + using std::ranges::iterator_t; + // using std::ranges::range_const_reference_t; + using std::ranges::range_common_reference_t; + using std::ranges::range_difference_t; + using std::ranges::range_reference_t; + using std::ranges::range_rvalue_reference_t; + using std::ranges::range_size_t; + using std::ranges::range_value_t; + using std::ranges::sentinel_t; + + // [range.sized], sized ranges + using std::ranges::disable_sized_range; + using std::ranges::sized_range; + + // [range.view], views + using std::ranges::enable_view; + using std::ranges::view; + using std::ranges::view_base; + + // [range.refinements], other range refinements + using std::ranges::bidirectional_range; + using std::ranges::common_range; + // using std::ranges::constant_range; + using std::ranges::contiguous_range; + using std::ranges::forward_range; + using std::ranges::input_range; + using std::ranges::output_range; + using std::ranges::random_access_range; + using std::ranges::viewable_range; + + // [view.interface], class template view_­interface + using std::ranges::view_interface; + + // [range.subrange], sub-ranges + using std::ranges::subrange; + using std::ranges::subrange_kind; + + using std::ranges::get; + } // namespace ranges + + using std::ranges::get; + + namespace ranges { + + // [range.dangling], dangling iterator handling + using std::ranges::dangling; + + // [range.elementsof], class template elements_­of + // using std::ranges::elements_of; + + using std::ranges::borrowed_iterator_t; + + using std::ranges::borrowed_subrange_t; + +#if _LIBCPP_STD_VER >= 23 + // [range.utility.conv], range conversions + using std::ranges::to; +#endif + + // [range.empty], empty view + using std::ranges::empty_view; + + namespace views { + using std::ranges::views::empty; + } + + // [range.single], single view + using std::ranges::single_view; + + namespace views { + using std::ranges::views::single; + } // namespace views + + // [range.iota], iota view + using std::ranges::iota_view; + + namespace views { + using std::ranges::views::iota; + } // namespace views + +#if _LIBCPP_STD_VER >= 23 + // [range.repeat], repeat view + using std::ranges::repeat_view; + + namespace views { + using std::ranges::views::repeat; + } // namespace views +#endif // _LIBCPP_STD_VER >= 23 + +#if _LIBCPP_HAS_LOCALIZATION + // [range.istream], istream view + using std::ranges::basic_istream_view; + using std::ranges::istream_view; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::ranges::wistream_view; +# endif + + namespace views { + using std::ranges::views::istream; + } +#endif // _LIBCPP_HAS_LOCALIZATION + + // Note: This declaration not in the synopsis or explicitly in the wording. + // However it is needed for the range adaptors. + // [range.adaptor.object]/3 + // The template parameter D for range_adaptor_closure may be an + // incomplete type. If an expression of type cv D is used as an operand + // to the | operator, D shall be complete and model + // derived_from>. The behavior of an expression + // involving an object of type cv D as an operand to the | operator is + // undefined if overload resolution selects a program-defined operator| + // function. + // This is used internally in C++20 mode. + using std::ranges::operator|; +#if _LIBCPP_STD_VER >= 23 + // [range.adaptor.object], range adaptor objects + using std::ranges::range_adaptor_closure; +#endif + + // [range.all], all view + namespace views { + using std::ranges::views::all; + using std::ranges::views::all_t; + } // namespace views + + // [range.ref.view], ref view + using std::ranges::ref_view; + + // [range.owning.view], owning view + using std::ranges::owning_view; + +#if _LIBCPP_STD_VER >= 23 + // [range.as.rvalue], as rvalue view + using std::ranges::as_rvalue_view; + + namespace views { + using std::ranges::views::as_rvalue; + } // namespace views +#endif // _LIBCPP_STD_VER >= 23 + + // [range.filter], filter view + using std::ranges::filter_view; + + namespace views { + using std::ranges::views::filter; + } // namespace views + + // [range.transform], transform view + using std::ranges::transform_view; + + namespace views { + using std::ranges::views::transform; + } // namespace views + + // [range.take], take view + using std::ranges::take_view; + + namespace views { + using std::ranges::views::take; + } // namespace views + + // [range.take.while], take while view + using std::ranges::take_while_view; + + namespace views { + using std::ranges::views::take_while; + } // namespace views + + // [range.drop], drop view + using std::ranges::drop_view; + + namespace views { + using std::ranges::views::drop; + } // namespace views + + // [range.drop.while], drop while view + using std::ranges::drop_while_view; + + namespace views { + using std::ranges::views::drop_while; + } // namespace views + + using std::ranges::join_view; + + namespace views { + using std::ranges::views::join; + } // namespace views + +#if _LIBCPP_STD_VER >= 23 + // [range.join.with] + using std::ranges::join_with_view; + + namespace views { + using std::ranges::views::join_with; + } // namespace views +#endif // _LIBCPP_STD_VER >= 23 + + using std::ranges::lazy_split_view; + + // [range.split], split view + using std::ranges::split_view; + + namespace views { + using std::ranges::views::lazy_split; + using std::ranges::views::split; + } // namespace views + + // [range.counted], counted view + namespace views { + using std::ranges::views::counted; + } // namespace views + + // [range.common], common view + using std::ranges::common_view; + + namespace views { + using std::ranges::views::common; + } // namespace views + + // [range.reverse], reverse view + using std::ranges::reverse_view; + + namespace views { + using std::ranges::views::reverse; + } // namespace views + + // [range.as.const], as const view +#if 0 + using std::ranges::as_const_view; + + namespace views { + using std::ranges::views::as_const; + } // namespace views +#endif + // [range.elements], elements view + using std::ranges::elements_view; + + using std::ranges::keys_view; + using std::ranges::values_view; + + namespace views { + using std::ranges::views::elements; + using std::ranges::views::keys; + using std::ranges::views::values; + } // namespace views + +#if _LIBCPP_STD_VER >= 23 + // [range.zip], zip view + using std::ranges::zip_view; + + namespace views { + using std::ranges::views::zip; + } // namespace views +#endif // _LIBCPP_STD_VER >= 23 + +#if 0 + // [range.zip.transform], zip transform view + using std::ranges::zip_transform_view; + + namespace views { + using std::ranges::views::zip_transform; + } + + using std::ranges::adjacent_view; + + namespace views { + using std::ranges::views::adjacent; + using std::ranges::views::pairwise; + } // namespace views + + using std::ranges::adjacent_transform_view; + + namespace views { + using std::ranges::views::adjacent_transform; + using std::ranges::views::pairwise_transform; + } // namespace views + + using std::ranges::chunk_view; + + using std::ranges::chunk_view; + + namespace views { + using std::ranges::views::chunk; + } + + using std::ranges::slide_view; + + namespace views { + using std::ranges::views::slide; + } +#endif + +#if _LIBCPP_STD_VER >= 23 + // [range.chunk.by], chunk by view + using std::ranges::chunk_by_view; + + namespace views { + using std::ranges::views::chunk_by; + } +#endif // _LIBCPP_STD_VER >= 23 + +#if 0 + // [range.stride], stride view + using std::ranges::stride_view; + + namespace views { + using std::ranges::views::stride; + } + + using std::ranges::cartesian_product_view; + + namespace views { + using std::ranges::views::cartesian_product; + } +#endif + } // namespace ranges + + namespace views = ranges::views; + + using std::tuple_element; + using std::tuple_size; + +#if _LIBCPP_STD_VER >= 23 + using std::from_range; + using std::from_range_t; +#endif // _LIBCPP_STD_VER >= 23 +} // namespace std diff --git a/system/lib/libcxx/modules/std/ratio.inc b/system/lib/libcxx/modules/std/ratio.inc new file mode 100644 index 0000000000000..4e1d4c61e7072 --- /dev/null +++ b/system/lib/libcxx/modules/std/ratio.inc @@ -0,0 +1,58 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [ratio.ratio], class template ratio + using std::ratio; + + // [ratio.arithmetic], ratio arithmetic + using std::ratio_add; + using std::ratio_divide; + using std::ratio_multiply; + using std::ratio_subtract; + + // [ratio.comparison], ratio comparison + using std::ratio_equal; + using std::ratio_greater; + using std::ratio_greater_equal; + using std::ratio_less; + using std::ratio_less_equal; + using std::ratio_not_equal; + + using std::ratio_equal_v; + using std::ratio_greater_equal_v; + using std::ratio_greater_v; + using std::ratio_less_equal_v; + using std::ratio_less_v; + using std::ratio_not_equal_v; + + // [ratio.si], convenience SI typedefs + using std::atto; + using std::centi; + using std::deca; + using std::deci; + using std::exa; + using std::femto; + using std::giga; + using std::hecto; + using std::kilo; + using std::mega; + using std::micro; + using std::milli; + using std::nano; + using std::peta; + using std::pico; + using std::tera; + + // These are not supported by libc++, due to the range of intmax_t + // using std::yocto; + // using std::yotta; + // using std::zepto; + // using std::zetta +} // namespace std diff --git a/system/lib/libcxx/modules/std/rcu.inc b/system/lib/libcxx/modules/std/rcu.inc new file mode 100644 index 0000000000000..abf5afad30c13 --- /dev/null +++ b/system/lib/libcxx/modules/std/rcu.inc @@ -0,0 +1,22 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 +# if _LIBCPP_STD_VER >= 23 + // 2.2.3, class template rcu_obj_base using std::rcu_obj_base; + // 2.2.4, class rcu_domain + using std::rcu_domain; + using std::rcu_default_domain(); + using std::rcu_barrier; + using std::rcu_retire; + using std::rcu_synchronize; +# endif // _LIBCPP_STD_VER >= 23 +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/regex.inc b/system/lib/libcxx/modules/std/regex.inc new file mode 100644 index 0000000000000..9d0c58075b582 --- /dev/null +++ b/system/lib/libcxx/modules/std/regex.inc @@ -0,0 +1,117 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + // [re.const], regex constants + namespace regex_constants { + using std::regex_constants::error_type; + using std::regex_constants::match_flag_type; + using std::regex_constants::syntax_option_type; + + // regex_constants is a bitmask type. + // [bitmask.types] specified operators + using std::regex_constants::operator&; + using std::regex_constants::operator&=; + using std::regex_constants::operator^; + using std::regex_constants::operator^=; + using std::regex_constants::operator|; + using std::regex_constants::operator|=; + using std::regex_constants::operator~; + + } // namespace regex_constants + + // [re.badexp], class regex_error + using std::regex_error; + + // [re.traits], class template regex_traits + using std::regex_traits; + + // [re.regex], class template basic_regex + using std::basic_regex; + + using std::regex; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wregex; +# endif + + // [re.regex.swap], basic_regex swap + using std::swap; + + // [re.submatch], class template sub_match + using std::sub_match; + + using std::csub_match; + using std::ssub_match; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcsub_match; + using std::wssub_match; +# endif + + // [re.submatch.op], sub_match non-member operators + using std::operator==; + using std::operator<=>; + + using std::operator<<; + + // [re.results], class template match_results + using std::match_results; + + using std::cmatch; + using std::smatch; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcmatch; + using std::wsmatch; +# endif + + // match_results comparisons + + // [re.results.swap], match_results swap + + // [re.alg.match], function template regex_match + using std::regex_match; + + // [re.alg.search], function template regex_search + using std::regex_search; + + // [re.alg.replace], function template regex_replace + using std::regex_replace; + + // [re.regiter], class template regex_iterator + using std::regex_iterator; + + using std::cregex_iterator; + using std::sregex_iterator; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcregex_iterator; + using std::wsregex_iterator; +# endif + + // [re.tokiter], class template regex_token_iterator + using std::regex_token_iterator; + + using std::cregex_token_iterator; + using std::sregex_token_iterator; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wcregex_token_iterator; + using std::wsregex_token_iterator; +# endif + + namespace pmr { + using std::pmr::match_results; + + using std::pmr::cmatch; + using std::pmr::smatch; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::pmr::wcmatch; + using std::pmr::wsmatch; +# endif + } // namespace pmr +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/scoped_allocator.inc b/system/lib/libcxx/modules/std/scoped_allocator.inc new file mode 100644 index 0000000000000..91c9694db28f9 --- /dev/null +++ b/system/lib/libcxx/modules/std/scoped_allocator.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // class template scoped_allocator_adaptor + using std::scoped_allocator_adaptor; + + // [scoped.adaptor.operators], scoped allocator operators + using std::operator==; + +} // namespace std diff --git a/system/lib/libcxx/modules/std/semaphore.inc b/system/lib/libcxx/modules/std/semaphore.inc new file mode 100644 index 0000000000000..7b47554fb6e35 --- /dev/null +++ b/system/lib/libcxx/modules/std/semaphore.inc @@ -0,0 +1,17 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.sema.cnt], class template counting_semaphore + using std::counting_semaphore; + + using std::binary_semaphore; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/std/set.inc b/system/lib/libcxx/modules/std/set.inc new file mode 100644 index 0000000000000..a8db792b4b381 --- /dev/null +++ b/system/lib/libcxx/modules/std/set.inc @@ -0,0 +1,29 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [set], class template set + using std::set; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [set.erasure], erasure for set + using std::erase_if; + + // [multiset], class template multiset + using std::multiset; + + namespace pmr { + using std::pmr::multiset; + using std::pmr::set; + } // namespace pmr +} // namespace std diff --git a/system/lib/libcxx/modules/std/shared_mutex.inc b/system/lib/libcxx/modules/std/shared_mutex.inc new file mode 100644 index 0000000000000..95102fc1ffee3 --- /dev/null +++ b/system/lib/libcxx/modules/std/shared_mutex.inc @@ -0,0 +1,20 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.sharedmutex.class], class shared_­mutex + using std::shared_mutex; + // [thread.sharedtimedmutex.class], class shared_­timed_­mutex + using std::shared_timed_mutex; + // [thread.lock.shared], class template shared_­lock + using std::shared_lock; + using std::swap; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/std/source_location.inc b/system/lib/libcxx/modules/std/source_location.inc new file mode 100644 index 0000000000000..750ab164a38de --- /dev/null +++ b/system/lib/libcxx/modules/std/source_location.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::source_location; +} // namespace std diff --git a/system/lib/libcxx/modules/std/span.inc b/system/lib/libcxx/modules/std/span.inc new file mode 100644 index 0000000000000..184591c6b170d --- /dev/null +++ b/system/lib/libcxx/modules/std/span.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // constants + using std::dynamic_extent; + + // [views.span], class template span + using std::span; + + namespace ranges { + using std::ranges::enable_borrowed_range; + using std::ranges::enable_view; + } // namespace ranges + + // [span.objectrep], views of object representation + using std::as_bytes; + + using std::as_writable_bytes; +} // namespace std diff --git a/system/lib/libcxx/modules/std/spanstream.inc b/system/lib/libcxx/modules/std/spanstream.inc new file mode 100644 index 0000000000000..e5b096e993307 --- /dev/null +++ b/system/lib/libcxx/modules/std/spanstream.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 + using std::basic_spanbuf; + + using std::swap; + + using std::spanbuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wspanbuf; +# endif + + using std::basic_ispanstream; + + using std::ispanstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wispanstream; +# endif + + using std::basic_ospanstream; + + using std::ospanstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wospanstream; +# endif + + using std::basic_spanstream; + + using std::spanstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wspanstream; +# endif +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/sstream.inc b/system/lib/libcxx/modules/std/sstream.inc new file mode 100644 index 0000000000000..99ec3b34e5af0 --- /dev/null +++ b/system/lib/libcxx/modules/std/sstream.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_stringbuf; + + using std::swap; + + using std::stringbuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstringbuf; +# endif + + using std::basic_istringstream; + + using std::istringstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wistringstream; +# endif + + using std::basic_ostringstream; + + using std::ostringstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wostringstream; +# endif + + using std::basic_stringstream; + + using std::stringstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstringstream; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/stack.inc b/system/lib/libcxx/modules/std/stack.inc new file mode 100644 index 0000000000000..3f736ff0e8410 --- /dev/null +++ b/system/lib/libcxx/modules/std/stack.inc @@ -0,0 +1,24 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [stack], class template stack + using std::stack; + + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + using std::swap; + using std::uses_allocator; +} // namespace std diff --git a/system/lib/libcxx/modules/std/stacktrace.inc b/system/lib/libcxx/modules/std/stacktrace.inc new file mode 100644 index 0000000000000..c1184087c0df4 --- /dev/null +++ b/system/lib/libcxx/modules/std/stacktrace.inc @@ -0,0 +1,35 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 + // [stacktrace.entry], class stacktrace_­entry + using std::stacktrace_entry; + + // [stacktrace.basic], class template basic_­stacktrace + using std::basic_stacktrace; + + // basic_­stacktrace typedef-names + using std::stacktrace; + + // [stacktrace.basic.nonmem], non-member functions + using std::swap; + + using std::to_string; + + using std::operator<<; + + namespace pmr { + using std::pmr::stacktrace; + } + + // [stacktrace.basic.hash], hash support + using std::hash; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/stdexcept.inc b/system/lib/libcxx/modules/std/stdexcept.inc new file mode 100644 index 0000000000000..15d37bafdba95 --- /dev/null +++ b/system/lib/libcxx/modules/std/stdexcept.inc @@ -0,0 +1,20 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::domain_error; + using std::invalid_argument; + using std::length_error; + using std::logic_error; + using std::out_of_range; + using std::overflow_error; + using std::range_error; + using std::runtime_error; + using std::underflow_error; +} // namespace std diff --git a/system/lib/libcxx/modules/std/stdfloat.inc b/system/lib/libcxx/modules/std/stdfloat.inc new file mode 100644 index 0000000000000..7e7201a854154 --- /dev/null +++ b/system/lib/libcxx/modules/std/stdfloat.inc @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if defined(__STDCPP_FLOAT16_T__) + using std::float16_t; +#endif +#if defined(__STDCPP_FLOAT32_T__) + using std::float32_t; +#endif +#if defined(__STDCPP_FLOAT64_T__) + using std::float64_t; +#endif +#if defined(__STDCPP_FLOAT128_T__) + using std::float128_t; +#endif +#if defined(__STDCPP_BFLOAT16_T__) + using std::bfloat16_t; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/stop_token.inc b/system/lib/libcxx/modules/std/stop_token.inc new file mode 100644 index 0000000000000..b5c7eb215fb63 --- /dev/null +++ b/system/lib/libcxx/modules/std/stop_token.inc @@ -0,0 +1,25 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [stoptoken], class stop_­token + using std::stop_token; + + // [stopsource], class stop_­source + using std::stop_source; + + // no-shared-stop-state indicator + using std::nostopstate; + using std::nostopstate_t; + + // [stopcallback], class template stop_­callback + using std::stop_callback; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/std/streambuf.inc b/system/lib/libcxx/modules/std/streambuf.inc new file mode 100644 index 0000000000000..fac076765ea22 --- /dev/null +++ b/system/lib/libcxx/modules/std/streambuf.inc @@ -0,0 +1,18 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION + using std::basic_streambuf; + using std::streambuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstreambuf; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/string.inc b/system/lib/libcxx/modules/std/string.inc new file mode 100644 index 0000000000000..8e14be8dcbe41 --- /dev/null +++ b/system/lib/libcxx/modules/std/string.inc @@ -0,0 +1,80 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [char.traits], character traits + using std::char_traits; + + // [basic.string], basic_string + using std::basic_string; + + using std::operator+; + using std::operator==; + using std::operator<=>; + + // [string.special], swap + using std::swap; + + // [string.io], inserters and extractors + using std::operator>>; + using std::operator<<; + using std::getline; + + // [string.erasure], erasure + using std::erase; + using std::erase_if; + + // basic_string typedef-names + using std::string; + using std::u16string; + using std::u32string; +#if _LIBCPP_HAS_CHAR8_T + using std::u8string; +#endif +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstring; +#endif + + // [string.conversions], numeric conversions + using std::stod; + using std::stof; + using std::stoi; + using std::stol; + using std::stold; + using std::stoll; + using std::stoul; + using std::stoull; + using std::to_string; +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::to_wstring; +#endif + + namespace pmr { + using std::pmr::basic_string; + using std::pmr::string; + using std::pmr::u16string; + using std::pmr::u32string; +#if _LIBCPP_HAS_CHAR8_T + using std::pmr::u8string; +#endif +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::pmr::wstring; +#endif + } // namespace pmr + + // [basic.string.hash], hash support + using std::hash; + + inline namespace literals { + inline namespace string_literals { + // [basic.string.literals], suffix for basic_string literals + using std::literals::string_literals::operator""s; + } // namespace string_literals + } // namespace literals +} // namespace std diff --git a/system/lib/libcxx/modules/std/string_view.inc b/system/lib/libcxx/modules/std/string_view.inc new file mode 100644 index 0000000000000..4de1c8b58c2e5 --- /dev/null +++ b/system/lib/libcxx/modules/std/string_view.inc @@ -0,0 +1,46 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [string.view.template], class template basic_string_view + using std::basic_string_view; + + namespace ranges { + using std::ranges::enable_borrowed_range; + using std::ranges::enable_view; + } // namespace ranges + + // [string.view.comparison], non-member comparison functions + using std::operator==; + using std::operator<=>; + + // [string.view.io], inserters and extractors + using std::operator<<; + + // basic_string_view typedef-names + using std::string_view; + using std::u16string_view; + using std::u32string_view; +#if _LIBCPP_HAS_CHAR8_T + using std::u8string_view; +#endif +#if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wstring_view; +#endif + + // [string.view.hash], hash support + using std::hash; + + inline namespace literals { + inline namespace string_view_literals { + // [string.view.literals], suffix for basic_string_view literals + using std::literals::string_view_literals::operator""sv; + } // namespace string_view_literals + } // namespace literals +} // namespace std diff --git a/system/lib/libcxx/modules/std/strstream.inc b/system/lib/libcxx/modules/std/strstream.inc new file mode 100644 index 0000000000000..5b9d45ad9e8fc --- /dev/null +++ b/system/lib/libcxx/modules/std/strstream.inc @@ -0,0 +1,19 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION +# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_STRSTREAM) + using std::istrstream; + using std::ostrstream; + using std::strstream; + using std::strstreambuf; +# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_STRSTREAM) +#endif // _LIBCPP_HAS_LOCALIZATION +} // namespace std diff --git a/system/lib/libcxx/modules/std/syncstream.inc b/system/lib/libcxx/modules/std/syncstream.inc new file mode 100644 index 0000000000000..0c3c640433444 --- /dev/null +++ b/system/lib/libcxx/modules/std/syncstream.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_LOCALIZATION && _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM + using std::basic_syncbuf; + + // [syncstream.syncbuf.special], specialized algorithms + using std::swap; + + using std::syncbuf; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wsyncbuf; +# endif + using std::basic_osyncstream; + + using std::osyncstream; +# if _LIBCPP_HAS_WIDE_CHARACTERS + using std::wosyncstream; +# endif +#endif // _LIBCPP_HAS_LOCALIZATION && _LIBCPP_HAS_EXPERIMENTAL_SYNCSTREAM +} // namespace std diff --git a/system/lib/libcxx/modules/std/system_error.inc b/system/lib/libcxx/modules/std/system_error.inc new file mode 100644 index 0000000000000..cf553a5ee4a18 --- /dev/null +++ b/system/lib/libcxx/modules/std/system_error.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::error_category; + using std::generic_category; + using std::system_category; + + using std::error_code; + using std::error_condition; + using std::system_error; + + using std::is_error_code_enum; + using std::is_error_condition_enum; + + using std::errc; + + // [syserr.errcode.nonmembers], non-member functions + using std::make_error_code; + + using std::operator<<; + + // [syserr.errcondition.nonmembers], non-member functions + using std::make_error_condition; + + // [syserr.compare], comparison operator functions + using std::operator==; + using std::operator<=>; + + // [syserr.hash], hash support + using std::hash; + + // [syserr], system error support + using std::is_error_code_enum_v; + using std::is_error_condition_enum_v; +} // namespace std diff --git a/system/lib/libcxx/modules/std/text_encoding.inc b/system/lib/libcxx/modules/std/text_encoding.inc new file mode 100644 index 0000000000000..6d5e3f1d68c60 --- /dev/null +++ b/system/lib/libcxx/modules/std/text_encoding.inc @@ -0,0 +1,19 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if 0 +# if _LIBCPP_STD_VER >= 23 + using std::text_encoding; + + // hash support + using std::hash; +# endif // _LIBCPP_STD_VER >= 23 +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/thread.inc b/system/lib/libcxx/modules/std/thread.inc new file mode 100644 index 0000000000000..694539e1a0c5e --- /dev/null +++ b/system/lib/libcxx/modules/std/thread.inc @@ -0,0 +1,42 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { +#if _LIBCPP_HAS_THREADS + // [thread.thread.class], class thread + using std::thread; + + using std::swap; + + // [thread.jthread.class], class jthread + using std::jthread; + + // [thread.thread.this], namespace this_thread + namespace this_thread { + using std::this_thread::get_id; + + using std::this_thread::sleep_for; + using std::this_thread::sleep_until; + using std::this_thread::yield; + } // namespace this_thread + + // [thread.thread.id] + using std::operator==; + using std::operator<=>; +# if _LIBCPP_HAS_LOCALIZATION + using std::operator<<; +# endif // _LIBCPP_HAS_LOCALIZATION + +# if _LIBCPP_STD_VER >= 23 + using std::formatter; +# endif + + using std::hash; +#endif // _LIBCPP_HAS_THREADS +} // namespace std diff --git a/system/lib/libcxx/modules/std/tuple.inc b/system/lib/libcxx/modules/std/tuple.inc new file mode 100644 index 0000000000000..706e2266c174b --- /dev/null +++ b/system/lib/libcxx/modules/std/tuple.inc @@ -0,0 +1,55 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [tuple.tuple], class template tuple + using std::tuple; + + // [tuple.like], concept tuple-like + +#if _LIBCPP_STD_VER >= 23 + // [tuple.common.ref], common_reference related specializations + using std::basic_common_reference; + using std::common_type; +#endif + + // [tuple.creation], tuple creation functions + using std::ignore; + + using std::forward_as_tuple; + using std::make_tuple; + using std::tie; + using std::tuple_cat; + + // [tuple.apply], calling a function with a tuple of arguments + using std::apply; + + using std::make_from_tuple; + + // [tuple.helper], tuple helper classes + using std::tuple_element; + using std::tuple_size; + + // [tuple.elem], element access + using std::get; + using std::tuple_element_t; + + // [tuple.rel], relational operators + using std::operator==; + using std::operator<=>; + + // [tuple.traits], allocator-related traits + using std::uses_allocator; + + // [tuple.special], specialized algorithms + using std::swap; + + // [tuple.helper], tuple helper classes + using std::tuple_size_v; +} // namespace std diff --git a/system/lib/libcxx/modules/std/type_traits.inc b/system/lib/libcxx/modules/std/type_traits.inc new file mode 100644 index 0000000000000..6823c86ed153b --- /dev/null +++ b/system/lib/libcxx/modules/std/type_traits.inc @@ -0,0 +1,341 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [meta.help], helper class + using std::integral_constant; + + using std::bool_constant; + using std::false_type; + using std::true_type; + + // [meta.unary.cat], primary type categories + using std::is_array; + using std::is_class; + using std::is_enum; + using std::is_floating_point; + using std::is_function; + using std::is_integral; + using std::is_lvalue_reference; + using std::is_member_function_pointer; + using std::is_member_object_pointer; + using std::is_null_pointer; + using std::is_pointer; + using std::is_rvalue_reference; + using std::is_union; + using std::is_void; + + // [meta.unary.comp], composite type categories + using std::is_arithmetic; + using std::is_compound; + using std::is_fundamental; + using std::is_member_pointer; + using std::is_object; + using std::is_reference; + using std::is_scalar; + + // [meta.unary.prop], type properties + using std::is_abstract; + using std::is_aggregate; + using std::is_const; + using std::is_empty; + using std::is_final; + using std::is_polymorphic; + using std::is_standard_layout; + using std::is_trivial; + using std::is_trivially_copyable; + using std::is_volatile; + + using std::is_bounded_array; +#if _LIBCPP_STD_VER >= 23 + using std::is_scoped_enum; +#endif + using std::is_signed; + using std::is_unbounded_array; + using std::is_unsigned; + + using std::is_constructible; + using std::is_copy_constructible; + using std::is_default_constructible; + using std::is_move_constructible; + + using std::is_assignable; + using std::is_copy_assignable; + using std::is_move_assignable; + + using std::is_swappable; + using std::is_swappable_with; + + using std::is_destructible; + + using std::is_trivially_constructible; + using std::is_trivially_copy_constructible; + using std::is_trivially_default_constructible; + using std::is_trivially_move_constructible; + + using std::is_trivially_assignable; + using std::is_trivially_copy_assignable; + using std::is_trivially_destructible; + using std::is_trivially_move_assignable; + + using std::is_nothrow_constructible; + using std::is_nothrow_copy_constructible; + using std::is_nothrow_default_constructible; + using std::is_nothrow_move_constructible; + + using std::is_nothrow_assignable; + using std::is_nothrow_copy_assignable; + using std::is_nothrow_move_assignable; + + using std::is_nothrow_swappable; + using std::is_nothrow_swappable_with; + + using std::is_nothrow_destructible; + +#if _LIBCPP_STD_VER >= 23 && __has_builtin(__builtin_is_implicit_lifetime) + using std::is_implicit_lifetime; +#endif + + using std::has_virtual_destructor; + + using std::has_unique_object_representations; + +#if _LIBCPP_STD_VER >= 23 +# if __has_builtin(__reference_constructs_from_temporary) + using std::reference_constructs_from_temporary; +# endif +# if __has_builtin(__reference_converts_from_temporary) + using std::reference_converts_from_temporary; +# endif +#endif + + // [meta.unary.prop.query], type property queries + using std::alignment_of; + using std::extent; + using std::rank; + + // [meta.rel], type relations + using std::is_base_of; +#if _LIBCPP_STD_VER >= 26 && __has_builtin(__builtin_is_virtual_base_of) + using std::is_virtual_base_of; +#endif + using std::is_convertible; + // using std::is_layout_compatible; + using std::is_nothrow_convertible; + // using std::is_pointer_interconvertible_base_of; + using std::is_same; + + using std::is_invocable; + using std::is_invocable_r; + + using std::is_nothrow_invocable; + using std::is_nothrow_invocable_r; + + // [meta.trans.cv], const-volatile modifications + using std::add_const; + using std::add_cv; + using std::add_volatile; + using std::remove_const; + using std::remove_cv; + using std::remove_volatile; + + using std::add_const_t; + using std::add_cv_t; + using std::add_volatile_t; + using std::remove_const_t; + using std::remove_cv_t; + using std::remove_volatile_t; + + // [meta.trans.ref], reference modifications + using std::add_lvalue_reference; + using std::add_rvalue_reference; + using std::remove_reference; + + using std::add_lvalue_reference_t; + using std::add_rvalue_reference_t; + using std::remove_reference_t; + + // [meta.trans.sign], sign modifications + using std::make_signed; + using std::make_unsigned; + + using std::make_signed_t; + using std::make_unsigned_t; + + // [meta.trans.arr], array modifications + using std::remove_all_extents; + using std::remove_extent; + + using std::remove_all_extents_t; + using std::remove_extent_t; + + // [meta.trans.ptr], pointer modifications + using std::add_pointer; + using std::remove_pointer; + + using std::add_pointer_t; + using std::remove_pointer_t; + + // [meta.trans.other], other transformations + using std::basic_common_reference; + using std::common_reference; + using std::common_type; + using std::conditional; + using std::decay; + using std::enable_if; + using std::invoke_result; + using std::remove_cvref; + using std::type_identity; + using std::underlying_type; + using std::unwrap_ref_decay; + using std::unwrap_reference; + + using std::common_reference_t; + using std::common_type_t; + using std::conditional_t; + using std::decay_t; + using std::enable_if_t; + using std::invoke_result_t; + using std::remove_cvref_t; + using std::type_identity_t; + using std::underlying_type_t; + using std::unwrap_ref_decay_t; + using std::unwrap_reference_t; + using std::void_t; + + // [meta.logical], logical operator traits + using std::conjunction; + using std::disjunction; + using std::negation; + + // [meta.unary.cat], primary type categories + using std::is_array_v; + using std::is_class_v; + using std::is_enum_v; + using std::is_floating_point_v; + using std::is_function_v; + using std::is_integral_v; + using std::is_lvalue_reference_v; + using std::is_member_function_pointer_v; + using std::is_member_object_pointer_v; + using std::is_null_pointer_v; + using std::is_pointer_v; + using std::is_rvalue_reference_v; + using std::is_union_v; + using std::is_void_v; + + // [meta.unary.comp], composite type categories + using std::is_arithmetic_v; + using std::is_compound_v; + using std::is_fundamental_v; + using std::is_member_pointer_v; + using std::is_object_v; + using std::is_reference_v; + using std::is_scalar_v; + + // [meta.unary.prop], type properties + using std::has_unique_object_representations_v; + using std::has_virtual_destructor_v; + using std::is_abstract_v; + using std::is_aggregate_v; + using std::is_assignable_v; + using std::is_bounded_array_v; + using std::is_const_v; + using std::is_constructible_v; + using std::is_copy_assignable_v; + using std::is_copy_constructible_v; + using std::is_default_constructible_v; + using std::is_destructible_v; + using std::is_empty_v; + using std::is_final_v; +#if _LIBCPP_STD_VER >= 23 && __has_builtin(__builtin_is_implicit_lifetime) + using std::is_implicit_lifetime_v; +#endif + using std::is_move_assignable_v; + using std::is_move_constructible_v; + using std::is_nothrow_assignable_v; + using std::is_nothrow_constructible_v; + using std::is_nothrow_copy_assignable_v; + using std::is_nothrow_copy_constructible_v; + using std::is_nothrow_default_constructible_v; + using std::is_nothrow_destructible_v; + using std::is_nothrow_move_assignable_v; + using std::is_nothrow_move_constructible_v; + using std::is_nothrow_swappable_v; + using std::is_nothrow_swappable_with_v; + using std::is_polymorphic_v; +#if _LIBCPP_STD_VER >= 23 + using std::is_scoped_enum_v; +#endif + using std::is_signed_v; + using std::is_standard_layout_v; + using std::is_swappable_v; + using std::is_swappable_with_v; + using std::is_trivial_v; + using std::is_trivially_assignable_v; + using std::is_trivially_constructible_v; + using std::is_trivially_copy_assignable_v; + using std::is_trivially_copy_constructible_v; + using std::is_trivially_copyable_v; + using std::is_trivially_default_constructible_v; + using std::is_trivially_destructible_v; + using std::is_trivially_move_assignable_v; + using std::is_trivially_move_constructible_v; + using std::is_unbounded_array_v; + using std::is_unsigned_v; + using std::is_volatile_v; +#if _LIBCPP_STD_VER >= 23 +# if __has_builtin(__reference_constructs_from_temporary) + using std::reference_constructs_from_temporary_v; +# endif +# if __has_builtin(__reference_converts_from_temporary) + using std::reference_converts_from_temporary_v; +# endif +#endif + + // [meta.unary.prop.query], type property queries + using std::alignment_of_v; + using std::extent_v; + using std::rank_v; + + // [meta.rel], type relations + using std::is_base_of_v; +#if _LIBCPP_STD_VER >= 26 && __has_builtin(__builtin_is_virtual_base_of) + using std::is_virtual_base_of_v; +#endif + using std::is_convertible_v; + using std::is_invocable_r_v; + using std::is_invocable_v; + // using std::is_layout_compatible_v; + using std::is_nothrow_convertible_v; + using std::is_nothrow_invocable_r_v; + using std::is_nothrow_invocable_v; + // using std::is_pointer_interconvertible_base_of_v; + using std::is_same_v; + + // [meta.logical], logical operator traits + using std::conjunction_v; + using std::disjunction_v; + using std::negation_v; + + // [meta.member], member relationships + // using std::is_corresponding_member; + // using std::is_pointer_interconvertible_with_class; + + // [meta.const.eval], constant evaluation context + using std::is_constant_evaluated; + + // [depr.meta.types] + using std::aligned_storage; + using std::aligned_storage_t; + using std::aligned_union; + using std::aligned_union_t; + using std::is_pod; + using std::is_pod_v; +} // namespace std diff --git a/system/lib/libcxx/modules/std/typeindex.inc b/system/lib/libcxx/modules/std/typeindex.inc new file mode 100644 index 0000000000000..0fdcd8fb440f1 --- /dev/null +++ b/system/lib/libcxx/modules/std/typeindex.inc @@ -0,0 +1,13 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::hash; + using std::type_index; +} // namespace std diff --git a/system/lib/libcxx/modules/std/typeinfo.inc b/system/lib/libcxx/modules/std/typeinfo.inc new file mode 100644 index 0000000000000..ee1273baf4896 --- /dev/null +++ b/system/lib/libcxx/modules/std/typeinfo.inc @@ -0,0 +1,14 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::bad_cast; + using std::bad_typeid; + using std::type_info; +} // namespace std diff --git a/system/lib/libcxx/modules/std/unordered_map.inc b/system/lib/libcxx/modules/std/unordered_map.inc new file mode 100644 index 0000000000000..eff62f30540a7 --- /dev/null +++ b/system/lib/libcxx/modules/std/unordered_map.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [unord.map], class template unordered_­map + using std::unordered_map; + + // [unord.multimap], class template unordered_­multimap + using std::unordered_multimap; + + using std::operator==; + + using std::swap; + + // [unord.map.erasure], erasure for unordered_­map + using std::erase_if; + + namespace pmr { + using std::pmr::unordered_map; + using std::pmr::unordered_multimap; + } // namespace pmr +} // namespace std diff --git a/system/lib/libcxx/modules/std/unordered_set.inc b/system/lib/libcxx/modules/std/unordered_set.inc new file mode 100644 index 0000000000000..c214e3420434b --- /dev/null +++ b/system/lib/libcxx/modules/std/unordered_set.inc @@ -0,0 +1,28 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [unord.set], class template unordered_­set + using std::unordered_set; + + // [unord.multiset], class template unordered_­multiset + using std::unordered_multiset; + + using std::operator==; + + using std::swap; + + // [unord.set.erasure], erasure for unordered_­set + using std::erase_if; + + namespace pmr { + using std::pmr::unordered_multiset; + using std::pmr::unordered_set; + } // namespace pmr +} // namespace std diff --git a/system/lib/libcxx/modules/std/utility.inc b/system/lib/libcxx/modules/std/utility.inc new file mode 100644 index 0000000000000..77c21b87640dd --- /dev/null +++ b/system/lib/libcxx/modules/std/utility.inc @@ -0,0 +1,99 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [utility.swap], swap + using std::swap; + + // [utility.exchange], exchange + using std::exchange; + + // [forward], forward/move + using std::forward; +#if _LIBCPP_STD_VER >= 23 + using std::forward_like; +#endif + using std::move; + using std::move_if_noexcept; + + // [utility.as.const], as_const + using std::as_const; + + // [declval], declval + using std::declval; + + // [utility.intcmp], integer comparison functions + using std::cmp_equal; + using std::cmp_not_equal; + + using std::cmp_greater; + using std::cmp_greater_equal; + using std::cmp_less; + using std::cmp_less_equal; + + using std::in_range; + +#if _LIBCPP_STD_VER >= 23 + // [utility.underlying], to_underlying + using std::to_underlying; + + // [utility.unreachable], unreachable + using std::unreachable; +#endif // _LIBCPP_STD_VER >= 23 + + // [intseq], compile-time integer sequences + using std::index_sequence; + using std::integer_sequence; + + using std::make_index_sequence; + using std::make_integer_sequence; + + using std::index_sequence_for; + + // [pairs], class template pair + using std::pair; + +#if _LIBCPP_STD_VER >= 23 + using std::basic_common_reference; + using std::common_type; +#endif + // [pairs.spec], pair specialized algorithms + using std::operator==; + using std::operator<=>; + + using std::make_pair; + + // [pair.astuple], tuple-like access to pair + using std::tuple_element; + using std::tuple_size; + + using std::get; + + // [pair.piecewise], pair piecewise construction + using std::piecewise_construct; + using std::piecewise_construct_t; + + // in-place construction + using std::in_place; + using std::in_place_t; + + using std::in_place_type; + using std::in_place_type_t; + + using std::in_place_index; + using std::in_place_index_t; + + // [depr.relops] + namespace rel_ops { + using rel_ops::operator!=; + using rel_ops::operator>; + using rel_ops::operator<=; + using rel_ops::operator>=; + } // namespace rel_ops +} // namespace std diff --git a/system/lib/libcxx/modules/std/valarray.inc b/system/lib/libcxx/modules/std/valarray.inc new file mode 100644 index 0000000000000..1cdf7f14060fb --- /dev/null +++ b/system/lib/libcxx/modules/std/valarray.inc @@ -0,0 +1,68 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + using std::gslice; + using std::gslice_array; + using std::indirect_array; + using std::mask_array; + using std::slice; + using std::slice_array; + using std::valarray; + + using std::swap; + + using std::operator*; + using std::operator/; + using std::operator%; + using std::operator+; + using std::operator-; + + using std::operator^; + using std::operator&; + using std::operator|; + + using std::operator<<; + using std::operator>>; + + using std::operator&&; + using std::operator||; + + using std::operator==; + using std::operator!=; + + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + + using std::abs; + using std::acos; + using std::asin; + using std::atan; + + using std::atan2; + + using std::cos; + using std::cosh; + using std::exp; + using std::log; + using std::log10; + + using std::pow; + + using std::sin; + using std::sinh; + using std::sqrt; + using std::tan; + using std::tanh; + + using std::begin; + using std::end; +} // namespace std diff --git a/system/lib/libcxx/modules/std/variant.inc b/system/lib/libcxx/modules/std/variant.inc new file mode 100644 index 0000000000000..6fcecddbedaf5 --- /dev/null +++ b/system/lib/libcxx/modules/std/variant.inc @@ -0,0 +1,49 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [variant.variant], class template variant + using std::variant; + + // [variant.helper], variant helper classes + using std::variant_alternative; + using std::variant_npos; + using std::variant_size; + using std::variant_size_v; + + // [variant.get], value access + using std::get; + using std::get_if; + using std::holds_alternative; + using std::variant_alternative_t; + + // [variant.relops], relational operators + using std::operator==; + using std::operator!=; + using std::operator<; + using std::operator>; + using std::operator<=; + using std::operator>=; + using std::operator<=>; + + // [variant.visit], visitation + using std::visit; + + // [variant.monostate], class monostate + using std::monostate; + + // [variant.specalg], specialized algorithms + using std::swap; + + // [variant.bad.access], class bad_variant_access + using std::bad_variant_access; + + // [variant.hash], hash support + using std::hash; +} // namespace std diff --git a/system/lib/libcxx/modules/std/vector.inc b/system/lib/libcxx/modules/std/vector.inc new file mode 100644 index 0000000000000..7168ec2bb7035 --- /dev/null +++ b/system/lib/libcxx/modules/std/vector.inc @@ -0,0 +1,34 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // [vector], class template vector + using std::vector; + + using std::operator==; + using std::operator<=>; + + using std::swap; + + // [vector.erasure], erasure + using std::erase; + using std::erase_if; + + namespace pmr { + using std::pmr::vector; + } + + // hash support + using std::hash; + +#if _LIBCPP_STD_VER >= 23 + // [vector.bool.fmt], formatter specialization for vector + using std::formatter; +#endif +} // namespace std diff --git a/system/lib/libcxx/modules/std/version.inc b/system/lib/libcxx/modules/std/version.inc new file mode 100644 index 0000000000000..2ab8eb970e7a5 --- /dev/null +++ b/system/lib/libcxx/modules/std/version.inc @@ -0,0 +1,12 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +export namespace std { + // This module exports nothing. +} // namespace std diff --git a/system/lib/update_libcxx.py b/system/lib/update_libcxx.py index 3dacb46eae950..669f5ca5f51fa 100755 --- a/system/lib/update_libcxx.py +++ b/system/lib/update_libcxx.py @@ -14,10 +14,11 @@ local_root = os.path.join(script_dir, 'libcxx') local_src = os.path.join(local_root, 'src') local_inc = os.path.join(local_root, 'include') +local_modules = os.path.join(local_root, 'modules') preserve_files = ('readme.txt', '__assertion_handler', '__config_site') # ryu_long_double_constants.h from libc is unused (and very large) -excludes = ('CMakeLists.txt', 'ryu_long_double_constants.h') +excludes = {'ryu_long_double_constants.h'} libc_copy_dirs = [ 'hdr', @@ -64,15 +65,19 @@ def main(): libcxx_dir = os.path.join(llvm_dir, 'libcxx') upstream_src = os.path.join(libcxx_dir, 'src') upstream_inc = os.path.join(libcxx_dir, 'include') + upstream_modules = os.path.join(libcxx_dir, 'modules') assert os.path.exists(upstream_inc) assert os.path.exists(upstream_src) + assert os.path.exists(upstream_modules) # Remove old version clean_dir(local_src) clean_dir(local_inc) + clean_dir(local_modules) copy_tree(upstream_src, local_src) copy_tree(upstream_inc, local_inc) + copy_tree(upstream_modules, local_modules) shutil.copy2(os.path.join(libcxx_dir, 'CREDITS.TXT'), local_root) shutil.copy2(os.path.join(libcxx_dir, 'LICENSE.TXT'), local_root) diff --git a/test/cmake/cxx_import_std/CMakeLists.txt b/test/cmake/cxx_import_std/CMakeLists.txt new file mode 100644 index 0000000000000..fd75ceb1a7236 --- /dev/null +++ b/test/cmake/cxx_import_std/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 4.3) + +set(CMAKE_CXX_MODULE_STD ON) +set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD 451f2fe2-a8a2-47c3-bc32-94786d8fc91b) + +project(cxx_import_std) + +foreach(_STD IN LISTS CMAKE_CXX_COMPILER_IMPORT_STD) + add_executable(cxx_import_std${_STD} main.cpp) + target_compile_features(cxx_import_std${_STD} PRIVATE cxx_std_${_STD}) +endforeach() diff --git a/test/cmake/cxx_import_std/main.cpp b/test/cmake/cxx_import_std/main.cpp new file mode 100644 index 0000000000000..64914c23e664a --- /dev/null +++ b/test/cmake/cxx_import_std/main.cpp @@ -0,0 +1,5 @@ +import std; + +int main(){ + std::print("Hello, world!\n"); +} diff --git a/test/test_other.py b/test/test_other.py index c90480d7bc4c2..a3dc4cdf468dc 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -901,6 +901,11 @@ def test_cmake(self, test_dir, output_file, cmake_args): if test_dir == 'post_build': ret = self.run_process(['ctest'], env=env) + @requires_ninja + def test_cmake_cxx_import_std(self): + self.run_process([EMCMAKE, 'cmake', '-GNinja', test_file('cmake/cxx_import_std')]) + self.run_process(['cmake', '--build', '.']) + # Test that the various CMAKE_xxx_COMPILE_FEATURES that are advertised for the Emscripten # toolchain match with the actual language features that Clang supports. # If we update LLVM version and this test fails, copy over the new advertised features from Clang diff --git a/tools/system_libs.py b/tools/system_libs.py index de51ca14fb1ec..c1a7691ffa0a2 100644 --- a/tools/system_libs.py +++ b/tools/system_libs.py @@ -12,6 +12,7 @@ import shlex import shutil import subprocess +import tempfile import textwrap from enum import IntEnum, auto from glob import iglob @@ -2528,6 +2529,8 @@ def install_system_headers(stamp): 'system/lib/libcxx/include': 'c++/v1', 'system/lib/libcxxabi/include': 'c++/v1', 'system/lib/mimalloc/include': '', + 'system/lib/libcxx/modules/prefix/lib/emscripten': cache.get_lib_dir(absolute=True), + 'system/lib/libcxx/modules/prefix/share': cache.get_sysroot_dir('share'), } target_include_dir = cache.get_include_dir()