[libcxx-commits] [libcxx] dd72b81 - [libc++] Rename availability macros for <filesystem>
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 7 11:33:40 PDT 2023
Author: Louis Dionne
Date: 2023-06-07T11:31:29-07:00
New Revision: dd72b81334bb155e6e3511311f9137550aff915e
URL: https://github.com/llvm/llvm-project/commit/dd72b81334bb155e6e3511311f9137550aff915e
DIFF: https://github.com/llvm/llvm-project/commit/dd72b81334bb155e6e3511311f9137550aff915e.diff
LOG: [libc++] Rename availability macros for <filesystem>
This makes it clearer that the availability macro only pertains to
<filesystem>, and not to whether the platform has support for a file
system.
Differential Revision: https://reviews.llvm.org/D152172
Added:
Modified:
libcxx/include/__availability
libcxx/include/__chrono/file_clock.h
libcxx/include/__filesystem/copy_options.h
libcxx/include/__filesystem/directory_entry.h
libcxx/include/__filesystem/directory_iterator.h
libcxx/include/__filesystem/directory_options.h
libcxx/include/__filesystem/file_status.h
libcxx/include/__filesystem/filesystem_error.h
libcxx/include/__filesystem/operations.h
libcxx/include/__filesystem/path.h
libcxx/include/__filesystem/path_iterator.h
libcxx/include/__filesystem/perm_options.h
libcxx/include/__filesystem/perms.h
libcxx/include/__filesystem/recursive_directory_iterator.h
libcxx/include/__filesystem/space_info.h
libcxx/include/__filesystem/u8path.h
libcxx/include/fstream
libcxx/include/version
libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
libcxx/utils/generate_feature_test_macro_components.py
Removed:
################################################################################
diff --git a/libcxx/include/__availability b/libcxx/include/__availability
index 3c4c5cc7b9508..adaf0c75a51e0 100644
--- a/libcxx/include/__availability
+++ b/libcxx/include/__availability
@@ -146,10 +146,10 @@
// These macros control the availability of all parts of <filesystem> that
// depend on something in the dylib.
-// # define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM
-# define _LIBCPP_AVAILABILITY_FILESYSTEM
-# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP
+// # define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
// This controls the availability of floating-point std::to_chars functions.
// These overloads were added later than the integer overloads.
@@ -271,19 +271,19 @@
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000)
-# define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM
+# define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY
# endif
-# define _LIBCPP_AVAILABILITY_FILESYSTEM \
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY \
__attribute__((availability(macos,strict,introduced=10.15))) \
__attribute__((availability(ios,strict,introduced=13.0))) \
__attribute__((availability(tvos,strict,introduced=13.0))) \
__attribute__((availability(watchos,strict,introduced=6.0)))
-# define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH \
_Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \
_Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \
_Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \
_Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))")
-# define _LIBCPP_AVAILABILITY_FILESYSTEM_POP \
+# define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP \
_Pragma("clang attribute pop") \
_Pragma("clang attribute pop") \
_Pragma("clang attribute pop") \
diff --git a/libcxx/include/__chrono/file_clock.h b/libcxx/include/__chrono/file_clock.h
index 7a4dce9d5160a..80a0944740e37 100644
--- a/libcxx/include/__chrono/file_clock.h
+++ b/libcxx/include/__chrono/file_clock.h
@@ -63,7 +63,7 @@ struct _FilesystemClock {
_LIBCPP_EXPORTED_FROM_ABI
static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;
- _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_FUNC_VIS static time_point now() noexcept;
+ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_FUNC_VIS static time_point now() noexcept;
#if _LIBCPP_STD_VER >= 20
template <class _Duration>
diff --git a/libcxx/include/__filesystem/copy_options.h b/libcxx/include/__filesystem/copy_options.h
index 96c7535812e2b..11ac9ab67ef9e 100644
--- a/libcxx/include/__filesystem/copy_options.h
+++ b/libcxx/include/__filesystem/copy_options.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
enum class _LIBCPP_ENUM_VIS copy_options : unsigned short {
none = 0,
@@ -75,7 +75,7 @@ inline copy_options& operator^=(copy_options& __lhs, copy_options __rhs) {
return __lhs = __lhs ^ __rhs;
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/directory_entry.h b/libcxx/include/__filesystem/directory_entry.h
index bd9dbdc76079a..0fa958b3aacba 100644
--- a/libcxx/include/__filesystem/directory_entry.h
+++ b/libcxx/include/__filesystem/directory_entry.h
@@ -39,7 +39,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
class directory_entry {
@@ -517,7 +517,7 @@ class __dir_element_proxy {
directory_entry __elem_;
};
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/directory_iterator.h b/libcxx/include/__filesystem/directory_iterator.h
index d74c8be1075be..708f77a8642f2 100644
--- a/libcxx/include/__filesystem/directory_iterator.h
+++ b/libcxx/include/__filesystem/directory_iterator.h
@@ -32,7 +32,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
class _LIBCPP_HIDDEN __dir_stream;
class directory_iterator {
@@ -145,18 +145,18 @@ end(directory_iterator) noexcept {
return directory_iterator();
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
#if _LIBCPP_STD_VER >= 20
template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline constexpr bool _VSTD::ranges::enable_borrowed_range<_VSTD_FS::directory_iterator> = true;
template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::directory_iterator> = true;
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__filesystem/directory_options.h b/libcxx/include/__filesystem/directory_options.h
index c5c031a567cfe..406bb107da60a 100644
--- a/libcxx/include/__filesystem/directory_options.h
+++ b/libcxx/include/__filesystem/directory_options.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
enum class _LIBCPP_ENUM_VIS directory_options : unsigned char {
none = 0,
@@ -73,7 +73,7 @@ inline directory_options& operator^=(directory_options& __lhs,
return __lhs = __lhs ^ __rhs;
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/file_status.h b/libcxx/include/__filesystem/file_status.h
index 350b0fcc8039c..30ff55526f670 100644
--- a/libcxx/include/__filesystem/file_status.h
+++ b/libcxx/include/__filesystem/file_status.h
@@ -23,7 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
class _LIBCPP_TYPE_VIS file_status {
public:
@@ -63,7 +63,7 @@ class _LIBCPP_TYPE_VIS file_status {
perms __prms_;
};
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/filesystem_error.h b/libcxx/include/__filesystem/filesystem_error.h
index d345dab76cbe4..028352dfaf897 100644
--- a/libcxx/include/__filesystem/filesystem_error.h
+++ b/libcxx/include/__filesystem/filesystem_error.h
@@ -30,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-class _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
+class _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
public:
_LIBCPP_INLINE_VISIBILITY
filesystem_error(const string& __what, error_code __ec)
@@ -84,7 +84,7 @@ class _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_EXCEPTION_ABI filesystem_error : p
// TODO(ldionne): We need to pop the pragma and push it again after
// filesystem_error to work around PR41078.
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
template <class... _Args>
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
@@ -97,7 +97,7 @@ void __throw_filesystem_error(_Args&&...) {
_LIBCPP_VERBOSE_ABORT("filesystem_error was thrown in -fno-exceptions mode");
}
#endif
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/operations.h b/libcxx/include/__filesystem/operations.h
index 6bf58d8a78ab2..4e62521281f4b 100644
--- a/libcxx/include/__filesystem/operations.h
+++ b/libcxx/include/__filesystem/operations.h
@@ -32,7 +32,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
_LIBCPP_FUNC_VIS path __absolute(const path&, error_code* __ec = nullptr);
_LIBCPP_FUNC_VIS path __canonical(const path&, error_code* __ec = nullptr);
@@ -192,7 +192,7 @@ inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path(error_code& __ec) { return
inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p) { return __weakly_canonical(__p); }
inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p, error_code& __ec) { return __weakly_canonical(__p, &__ec); }
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h
index bf36ad9b5868d..3da18ab08752a 100644
--- a/libcxx/include/__filesystem/path.h
+++ b/libcxx/include/__filesystem/path.h
@@ -39,7 +39,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
template <class _Tp>
struct __can_convert_char {
@@ -1087,14 +1087,14 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(path& __lhs, path& __rhs) noexcept {
_LIBCPP_FUNC_VIS
size_t hash_value(const path& __p) noexcept;
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_NAMESPACE_STD
template <>
-struct _LIBCPP_AVAILABILITY_FILESYSTEM hash<_VSTD_FS::path> : __unary_function<_VSTD_FS::path, size_t> {
+struct _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY hash<_VSTD_FS::path> : __unary_function<_VSTD_FS::path, size_t> {
_LIBCPP_HIDE_FROM_ABI size_t operator()(_VSTD_FS::path const& __p) const noexcept {
return _VSTD_FS::hash_value(__p);
}
diff --git a/libcxx/include/__filesystem/path_iterator.h b/libcxx/include/__filesystem/path_iterator.h
index d754fdce20421..bc0a3dd0fc5f9 100644
--- a/libcxx/include/__filesystem/path_iterator.h
+++ b/libcxx/include/__filesystem/path_iterator.h
@@ -27,7 +27,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
class _LIBCPP_TYPE_VIS path::iterator {
public:
@@ -125,7 +125,7 @@ inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const path::iterator& __lhs,
return !(__lhs == __rhs);
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/perm_options.h b/libcxx/include/__filesystem/perm_options.h
index 4aba302edfbee..5b7dbd619887e 100644
--- a/libcxx/include/__filesystem/perm_options.h
+++ b/libcxx/include/__filesystem/perm_options.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
enum class _LIBCPP_ENUM_VIS perm_options : unsigned char {
replace = 1,
@@ -68,7 +68,7 @@ inline perm_options& operator^=(perm_options& __lhs, perm_options __rhs) {
return __lhs = __lhs ^ __rhs;
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/perms.h b/libcxx/include/__filesystem/perms.h
index df4590057ee16..dd22d56cc1214 100644
--- a/libcxx/include/__filesystem/perms.h
+++ b/libcxx/include/__filesystem/perms.h
@@ -21,7 +21,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
// On Windows, these permission bits map to one single readonly flag per
// file, and the executable bit is always returned as set. When setting
@@ -86,7 +86,7 @@ inline perms& operator|=(perms& __lhs, perms __rhs) { return __lhs = __lhs | __r
_LIBCPP_INLINE_VISIBILITY
inline perms& operator^=(perms& __lhs, perms __rhs) { return __lhs = __lhs ^ __rhs; }
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/recursive_directory_iterator.h b/libcxx/include/__filesystem/recursive_directory_iterator.h
index 3d5c025401443..130a41f7d0eed 100644
--- a/libcxx/include/__filesystem/recursive_directory_iterator.h
+++ b/libcxx/include/__filesystem/recursive_directory_iterator.h
@@ -31,7 +31,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
class recursive_directory_iterator {
public:
@@ -165,18 +165,18 @@ end(recursive_directory_iterator) noexcept {
return recursive_directory_iterator();
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
#if _LIBCPP_STD_VER >= 20
template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline constexpr bool _VSTD::ranges::enable_borrowed_range<_VSTD_FS::recursive_directory_iterator> = true;
template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::recursive_directory_iterator> = true;
#endif // _LIBCPP_STD_VER >= 20
diff --git a/libcxx/include/__filesystem/space_info.h b/libcxx/include/__filesystem/space_info.h
index 25fcb9a7739bb..2cbd785d4ae1a 100644
--- a/libcxx/include/__filesystem/space_info.h
+++ b/libcxx/include/__filesystem/space_info.h
@@ -22,7 +22,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
struct _LIBCPP_TYPE_VIS space_info {
uintmax_t capacity;
@@ -34,7 +34,7 @@ struct _LIBCPP_TYPE_VIS space_info {
# endif
};
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/__filesystem/u8path.h b/libcxx/include/__filesystem/u8path.h
index ebc1159ee0b44..90b879aec28ef 100644
--- a/libcxx/include/__filesystem/u8path.h
+++ b/libcxx/include/__filesystem/u8path.h
@@ -30,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
template <class _InputIt>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
@@ -98,7 +98,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
#endif
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/libcxx/include/fstream b/libcxx/include/fstream
index 3c358a9af7678..7119c7905483d 100644
--- a/libcxx/include/fstream
+++ b/libcxx/include/fstream
@@ -246,7 +246,7 @@ public:
basic_filebuf* open(const string& __s, ios_base::openmode __mode);
#if _LIBCPP_STD_VER >= 17
- _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INLINE_VISIBILITY
basic_filebuf* open(const _VSTD_FS::path& __p, ios_base::openmode __mode) {
return open(__p.c_str(), __mode);
}
@@ -1169,7 +1169,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in);
#if _LIBCPP_STD_VER >= 17
- _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INLINE_VISIBILITY
explicit basic_ifstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in)
: basic_ifstream(__p.c_str(), __mode) {}
#endif // _LIBCPP_STD_VER >= 17
@@ -1190,7 +1190,7 @@ public:
#endif
void open(const string& __s, ios_base::openmode __mode = ios_base::in);
#if _LIBCPP_STD_VER >= 17
- _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INLINE_VISIBILITY
void open(const filesystem::path& __p,
ios_base::openmode __mode = ios_base::in) {
return open(__p.c_str(), __mode);
@@ -1370,7 +1370,7 @@ public:
explicit basic_ofstream(const string& __s, ios_base::openmode __mode = ios_base::out);
#if _LIBCPP_STD_VER >= 17
- _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INLINE_VISIBILITY
explicit basic_ofstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::out)
: basic_ofstream(__p.c_str(), __mode) {}
#endif // _LIBCPP_STD_VER >= 17
@@ -1393,7 +1393,7 @@ public:
void open(const string& __s, ios_base::openmode __mode = ios_base::out);
#if _LIBCPP_STD_VER >= 17
- _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INLINE_VISIBILITY
void open(const filesystem::path& __p, ios_base::openmode __mode = ios_base::out)
{ return open(__p.c_str(), __mode); }
#endif // _LIBCPP_STD_VER >= 17
@@ -1571,7 +1571,7 @@ public:
explicit basic_fstream(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
#if _LIBCPP_STD_VER >= 17
- _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INLINE_VISIBILITY
explicit basic_fstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in | ios_base::out)
: basic_fstream(__p.c_str(), __mode) {}
#endif // _LIBCPP_STD_VER >= 17
@@ -1596,7 +1596,7 @@ public:
_LIBCPP_HIDE_FROM_ABI void open(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
#if _LIBCPP_STD_VER >= 17
- _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INLINE_VISIBILITY
void open(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in|ios_base::out)
{ return open(__p.c_str(), __mode); }
#endif // _LIBCPP_STD_VER >= 17
diff --git a/libcxx/include/version b/libcxx/include/version
index 0117a9282c00f..a1525397b988a 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -253,7 +253,7 @@ __cpp_lib_void_t 201411L <type_traits>
# define __cpp_lib_clamp 201603L
# define __cpp_lib_enable_shared_from_this 201603L
// # define __cpp_lib_execution 201603L
-# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# define __cpp_lib_filesystem 201703L
# endif
# define __cpp_lib_gcd_lcm 201606L
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp
index 010986a0a1b30..496e0d38ae066 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp
@@ -51,7 +51,7 @@
# error "__cpp_lib_char8_t should not be defined before c++20"
# endif
-# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# ifndef __cpp_lib_filesystem
# error "__cpp_lib_filesystem should be defined in c++17"
# endif
@@ -60,7 +60,7 @@
# endif
# else
# ifdef __cpp_lib_filesystem
-# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)' is not met!"
+# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)' is not met!"
# endif
# endif
@@ -79,7 +79,7 @@
# endif
# endif
-# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# ifndef __cpp_lib_filesystem
# error "__cpp_lib_filesystem should be defined in c++20"
# endif
@@ -88,7 +88,7 @@
# endif
# else
# ifdef __cpp_lib_filesystem
-# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)' is not met!"
+# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)' is not met!"
# endif
# endif
@@ -107,7 +107,7 @@
# endif
# endif
-# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# ifndef __cpp_lib_filesystem
# error "__cpp_lib_filesystem should be defined in c++23"
# endif
@@ -116,7 +116,7 @@
# endif
# else
# ifdef __cpp_lib_filesystem
-# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)' is not met!"
+# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)' is not met!"
# endif
# endif
@@ -135,7 +135,7 @@
# endif
# endif
-# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# ifndef __cpp_lib_filesystem
# error "__cpp_lib_filesystem should be defined in c++26"
# endif
@@ -144,7 +144,7 @@
# endif
# else
# ifdef __cpp_lib_filesystem
-# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)' is not met!"
+# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)' is not met!"
# endif
# endif
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
index d9b2c127932b6..8443fb1d97513 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
@@ -1865,7 +1865,7 @@
# error "__cpp_lib_expected should not be defined before c++23"
# endif
-# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# ifndef __cpp_lib_filesystem
# error "__cpp_lib_filesystem should be defined in c++17"
# endif
@@ -1874,7 +1874,7 @@
# endif
# else
# ifdef __cpp_lib_filesystem
-# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)' is not met!"
+# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)' is not met!"
# endif
# endif
@@ -2916,7 +2916,7 @@
# error "__cpp_lib_expected should not be defined before c++23"
# endif
-# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# ifndef __cpp_lib_filesystem
# error "__cpp_lib_filesystem should be defined in c++20"
# endif
@@ -2925,7 +2925,7 @@
# endif
# else
# ifdef __cpp_lib_filesystem
-# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)' is not met!"
+# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)' is not met!"
# endif
# endif
@@ -4165,7 +4165,7 @@
# error "__cpp_lib_expected should have the value 202211L in c++23"
# endif
-# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# ifndef __cpp_lib_filesystem
# error "__cpp_lib_filesystem should be defined in c++23"
# endif
@@ -4174,7 +4174,7 @@
# endif
# else
# ifdef __cpp_lib_filesystem
-# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)' is not met!"
+# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)' is not met!"
# endif
# endif
@@ -5579,7 +5579,7 @@
# error "__cpp_lib_expected should have the value 202211L in c++26"
# endif
-# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)
+# if !defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)
# ifndef __cpp_lib_filesystem
# error "__cpp_lib_filesystem should be defined in c++26"
# endif
@@ -5588,7 +5588,7 @@
# endif
# else
# ifdef __cpp_lib_filesystem
-# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)' is not met!"
+# error "__cpp_lib_filesystem should not be defined when the requirement '!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)' is not met!"
# endif
# endif
diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index e71370aa6226a..19738d80e6f18 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -416,8 +416,8 @@ def add_version_header(tc):
"name": "__cpp_lib_filesystem",
"values": {"c++17": 201703},
"headers": ["filesystem"],
- "test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)",
- "libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM)",
+ "test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)",
+ "libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY)",
},
{
"name": "__cpp_lib_format",
More information about the libcxx-commits
mailing list