Skip to content

Commit 7ab1ab0

Browse files
committed
[libc++] Make __dir_stream visibility declaration consistent
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`. Reviewed By: ldionne, philnik, #libc Differential Revision: https://reviews.llvm.org/D121639
1 parent 2b21fc5 commit 7ab1ab0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/__filesystem/directory_entry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class directory_entry {
254254
private:
255255
friend class directory_iterator;
256256
friend class recursive_directory_iterator;
257-
friend class __dir_stream;
257+
friend class _LIBCPP_HIDDEN __dir_stream;
258258

259259
enum _CacheType : unsigned char {
260260
_Empty,

0 commit comments

Comments
 (0)