[libc++] Make __dir_stream visibility declaration consistent
authorDimitry Andric <dimitry@andric.com>
Mon, 14 Mar 2022 21:05:35 +0000 (22:05 +0100)
committerDimitry Andric <dimitry@andric.com>
Tue, 15 Mar 2022 18:30:35 +0000 (19:30 +0100)
commit7ab1ab0db40158e6f0794637054c98376e236a6d
tree9d2e3813afdca54b0fa9abea4bb6f278264cedd3
parent2b21fc5520b39fba555f4e5f2480a5651056be84
[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
libcxx/include/__filesystem/directory_entry.h