Apply libc++ fix for firefox visibility push/pop issue

Merge commit 7ab1ab0db401 from llvm git (by Dimitry Andric):

  [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
This commit is contained in:
Dimitry Andric 2022-03-15 21:32:06 +01:00
parent d781ede639
commit a1f13cbcbb

View File

@ -249,7 +249,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,