Skip to content

[libc++] Get rid of experimental/__config #108233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion libcxx/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,6 @@ set(files
exception
execution
expected
experimental/__config
experimental/__simd/aligned_tag.h
experimental/__simd/declaration.h
experimental/__simd/reference.h
Expand Down
9 changes: 9 additions & 0 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,15 @@ typedef __char32_t char32_t;
inline namespace _LIBCPP_ABI_NAMESPACE {
# define _LIBCPP_END_NAMESPACE_STD }} _LIBCPP_POP_EXTENSION_DIAGNOSTICS

#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace std { namespace experimental {
#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL }}

#define _LIBCPP_BEGIN_NAMESPACE_LFTS _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v1 {
#define _LIBCPP_END_NAMESPACE_LFTS } _LIBCPP_END_NAMESPACE_EXPERIMENTAL

#define _LIBCPP_BEGIN_NAMESPACE_LFTS_V2 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v2 {
#define _LIBCPP_END_NAMESPACE_LFTS_V2 } _LIBCPP_END_NAMESPACE_EXPERIMENTAL

#ifdef _LIBCPP_ABI_NO_FILESYSTEM_INLINE_NAMESPACE
# define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM _LIBCPP_BEGIN_NAMESPACE_STD namespace filesystem {
# define _LIBCPP_END_NAMESPACE_FILESYSTEM } _LIBCPP_END_NAMESPACE_STD
Expand Down
45 changes: 0 additions & 45 deletions libcxx/include/experimental/__config

This file was deleted.

2 changes: 1 addition & 1 deletion libcxx/include/experimental/__simd/aligned_tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H
#define _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H

#include <__config>
#include <__memory/assume_aligned.h>
#include <__type_traits/remove_const.h>
#include <cstddef>
#include <experimental/__config>
#include <experimental/__simd/traits.h>

#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)
Expand Down
9 changes: 8 additions & 1 deletion libcxx/include/experimental/__simd/declaration.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,18 @@
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_DECLARATION_H
#define _LIBCPP_EXPERIMENTAL___SIMD_DECLARATION_H

#include <__config>
#include <cstddef>
#include <experimental/__config>

#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL)

// TODO: support more targets
# if defined(__AVX__)
# define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 32
# else
# define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 16
# endif

_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
inline namespace parallelism_v2 {
namespace simd_abi {
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/__simd/reference.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_REFERENCE_H
#define _LIBCPP_EXPERIMENTAL___SIMD_REFERENCE_H

#include <__config>
#include <__type_traits/enable_if.h>
#include <__type_traits/is_assignable.h>
#include <__type_traits/is_same.h>
#include <__utility/declval.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <cstddef>
#include <experimental/__config>
#include <experimental/__simd/utility.h>

_LIBCPP_PUSH_MACROS
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/__simd/scalar.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#define _LIBCPP_EXPERIMENTAL___SIMD_SCALAR_H

#include <__assert>
#include <__config>
#include <__type_traits/integral_constant.h>
#include <cstddef>
#include <experimental/__config>
#include <experimental/__simd/declaration.h>
#include <experimental/__simd/traits.h>

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/__simd/simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_SIMD_H
#define _LIBCPP_EXPERIMENTAL___SIMD_SIMD_H

#include <__config>
#include <__type_traits/enable_if.h>
#include <__type_traits/is_same.h>
#include <__type_traits/remove_cvref.h>
#include <__utility/forward.h>
#include <cstddef>
#include <experimental/__config>
#include <experimental/__simd/declaration.h>
#include <experimental/__simd/reference.h>
#include <experimental/__simd/traits.h>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/__simd/simd_mask.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_SIMD_MASK_H
#define _LIBCPP_EXPERIMENTAL___SIMD_SIMD_MASK_H

#include <__config>
#include <__type_traits/enable_if.h>
#include <__type_traits/is_same.h>
#include <cstddef>
#include <experimental/__config>
#include <experimental/__simd/declaration.h>
#include <experimental/__simd/reference.h>
#include <experimental/__simd/traits.h>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/__simd/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#define _LIBCPP_EXPERIMENTAL___SIMD_TRAITS_H

#include <__bit/bit_ceil.h>
#include <__config>
#include <__type_traits/integral_constant.h>
#include <__type_traits/is_same.h>
#include <cstddef>
#include <experimental/__config>
#include <experimental/__simd/declaration.h>
#include <experimental/__simd/utility.h>

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/__simd/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#ifndef _LIBCPP_EXPERIMENTAL___SIMD_UTILITY_H
#define _LIBCPP_EXPERIMENTAL___SIMD_UTILITY_H

#include <__config>
#include <__type_traits/is_arithmetic.h>
#include <__type_traits/is_const.h>
#include <__type_traits/is_constant_evaluated.h>
Expand All @@ -22,7 +23,6 @@
#include <__utility/integer_sequence.h>
#include <cstddef>
#include <cstdint>
#include <experimental/__config>
#include <limits>

_LIBCPP_PUSH_MACROS
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/__simd/vec_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

#include <__assert>
#include <__bit/bit_ceil.h>
#include <__config>
#include <__type_traits/integral_constant.h>
#include <__utility/forward.h>
#include <__utility/integer_sequence.h>
#include <cstddef>
#include <experimental/__config>
#include <experimental/__simd/declaration.h>
#include <experimental/__simd/traits.h>
#include <experimental/__simd/utility.h>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/iterator
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ namespace std {

*/

#include <__config>
#include <__memory/addressof.h>
#include <__type_traits/decay.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <experimental/__config>
#include <iterator>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/memory
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public:
}
*/

#include <__config>
#include <__functional/hash.h>
#include <__functional/operations.h>
#include <__type_traits/add_lvalue_reference.h>
Expand All @@ -57,7 +58,6 @@ public:
#include <__type_traits/enable_if.h>
#include <__type_traits/is_convertible.h>
#include <cstddef>
#include <experimental/__config>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/propagate_const
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
*/

#include <__config>
#include <__functional/operations.h>
#include <__fwd/functional.h>
#include <__type_traits/conditional.h>
Expand All @@ -128,7 +129,6 @@
#include <__utility/move.h>
#include <__utility/swap.h>
#include <cstddef>
#include <experimental/__config>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/simd
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ inline namespace parallelism_v2 {
# pragma GCC system_header
#endif

#include <experimental/__config>
#include <__config>
#include <experimental/__simd/aligned_tag.h>
#include <experimental/__simd/declaration.h>
#include <experimental/__simd/reference.h>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ inline namespace fundamentals_v1 {

*/

#include <experimental/__config>
#include <__config>

#if _LIBCPP_STD_VER >= 14

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/experimental/utility
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ inline namespace fundamentals_v1 {

*/

#include <experimental/__config>
#include <__config>
#include <utility>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
4 changes: 0 additions & 4 deletions libcxx/include/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,6 @@ module std_experimental [system] {
header "experimental/utility"
export *
}
module __config {
textual header "experimental/__config"
export *
}
}

// Convenience method to get all of the above modules in a single import statement.
Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/any.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace std {
const char* bad_any_cast::what() const noexcept { return "bad any cast"; }
} // namespace std

#include <experimental/__config>
#include <__config>

// Preserve std::experimental::any_bad_cast for ABI compatibility
// Even though it no longer exists in a header file
Expand Down
2 changes: 1 addition & 1 deletion libcxx/src/optional.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const char* bad_optional_access::what() const noexcept { return "bad_optional_ac

} // namespace std

#include <experimental/__config>
#include <__config>

// Preserve std::experimental::bad_optional_access for ABI compatibility
// Even though it no longer exists in a header file
Expand Down
Loading