[libcxx-commits] [PATCH] D121639: [libc++] Make __dir_stream visibility declaration consistent

Dimitry Andric via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 14 14:08:56 PDT 2022


dim created this revision.
dim added reviewers: ldionne, Quuxplusone, philnik.
Herald added a project: All.
dim requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.

The class __dir_stream is currently declared in two places: as a
top-level forward declaration in directory_iterator.h, and as a friend
declaration in class directory__entry, in directory_entry.h.

The former has a _LIBCPP_HIDDEN attribute, but the latter does not,
causing the Firefox build to complain about the visibility not matching
the previous declaration. This is because Firefox plays games with
pushing and popping visibility.

Work around this by making both __dir_stream declarations consistently
use _LIBCPP_HIDDEN.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121639

Files:
  libcxx/include/__filesystem/directory_entry.h


Index: libcxx/include/__filesystem/directory_entry.h
===================================================================
--- libcxx/include/__filesystem/directory_entry.h
+++ libcxx/include/__filesystem/directory_entry.h
@@ -254,7 +254,7 @@
 private:
   friend class directory_iterator;
   friend class recursive_directory_iterator;
-  friend class __dir_stream;
+  friend class _LIBCPP_HIDDEN __dir_stream;
 
   enum _CacheType : unsigned char {
     _Empty,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121639.415219.patch
Type: text/x-patch
Size: 460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220314/da7312c9/attachment.bin>


More information about the libcxx-commits mailing list