[libc++] Mark internal types of std::filesystem as hidden
Summary:
Otherwise, implicit instantiations of templates with these types can
cause the dylib to start exporting the vtable/RTTI of the instantiation.
Giving hidden visibility to those types causes the compiler to understand
that they are not used outside the dylib, and as a result implicitly
instantiated vtables/RTTI of templates with those internal types will
get hidden visibility.
Reviewers: EricWF
Subscribers: christof, jkorous, dexonsmith, jdoerfert, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59550
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356488 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/filesystem b/include/filesystem
index 7a151d9..d599b54 100644
--- a/include/filesystem
+++ b/include/filesystem
@@ -1350,7 +1350,7 @@
void __create_what(int __num_paths);
private:
- struct _Storage {
+ struct _LIBCPP_HIDDEN _Storage {
_LIBCPP_INLINE_VISIBILITY
_Storage(const path& __p1, const path& __p2) : __p1_(__p1), __p2_(__p2) {}
@@ -1934,7 +1934,7 @@
class directory_iterator;
class recursive_directory_iterator;
-class __dir_stream;
+class _LIBCPP_HIDDEN __dir_stream;
class directory_entry {
typedef _VSTD_FS::path _Path;
@@ -2597,7 +2597,7 @@
operator==(const recursive_directory_iterator&,
const recursive_directory_iterator&) noexcept;
- struct __shared_imp;
+ struct _LIBCPP_HIDDEN __shared_imp;
shared_ptr<__shared_imp> __imp_;
bool __rec_;
}; // class recursive_directory_iterator