Sfoglia il codice sorgente

[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
Louis Dionne 6 anni fa
parent
commit
5ac0b8f250
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      include/filesystem

+ 3 - 3
include/filesystem

@@ -1350,7 +1350,7 @@ public:
   void __create_what(int __num_paths);
   void __create_what(int __num_paths);
 
 
 private:
 private:
-  struct _Storage {
+  struct _LIBCPP_HIDDEN _Storage {
     _LIBCPP_INLINE_VISIBILITY
     _LIBCPP_INLINE_VISIBILITY
     _Storage(const path& __p1, const path& __p2) : __p1_(__p1), __p2_(__p2) {}
     _Storage(const path& __p1, const path& __p2) : __p1_(__p1), __p2_(__p2) {}
 
 
@@ -1934,7 +1934,7 @@ inline _LIBCPP_INLINE_VISIBILITY path weakly_canonical(path const& __p,
 
 
 class directory_iterator;
 class directory_iterator;
 class recursive_directory_iterator;
 class recursive_directory_iterator;
-class __dir_stream;
+class _LIBCPP_HIDDEN __dir_stream;
 
 
 class directory_entry {
 class directory_entry {
   typedef _VSTD_FS::path _Path;
   typedef _VSTD_FS::path _Path;
@@ -2597,7 +2597,7 @@ private:
   operator==(const recursive_directory_iterator&,
   operator==(const recursive_directory_iterator&,
              const recursive_directory_iterator&) noexcept;
              const recursive_directory_iterator&) noexcept;
 
 
-  struct __shared_imp;
+  struct _LIBCPP_HIDDEN __shared_imp;
   shared_ptr<__shared_imp> __imp_;
   shared_ptr<__shared_imp> __imp_;
   bool __rec_;
   bool __rec_;
 }; // class recursive_directory_iterator
 }; // class recursive_directory_iterator