Skip to content

Commit 5c9eed7

Browse files
DimitryAndrictstellar
authored andcommitted
[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 (cherry picked from commit 7ab1ab0)
1 parent c620539 commit 5c9eed7

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
@@ -249,7 +249,7 @@ class directory_entry {
249249
private:
250250
friend class directory_iterator;
251251
friend class recursive_directory_iterator;
252-
friend class __dir_stream;
252+
friend class _LIBCPP_HIDDEN __dir_stream;
253253

254254
enum _CacheType : unsigned char {
255255
_Empty,

0 commit comments

Comments
 (0)