Skip to content

Commit

Permalink
[libc++] Make __dir_stream visibility declaration consistent
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DimitryAndric committed Mar 15, 2022
1 parent 2b21fc5 commit 7ab1ab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcxx/include/__filesystem/directory_entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class directory_entry {
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,
Expand Down

0 comments on commit 7ab1ab0

Please sign in to comment.