[all-commits] [llvm/llvm-project] 7ab1ab: [libc++] Make __dir_stream visibility declaration ...

Dimitry Andric via All-commits all-commits at lists.llvm.org
Tue Mar 15 11:31:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ab1ab0db40158e6f0794637054c98376e236a6d
      https://github.com/llvm/llvm-project/commit/7ab1ab0db40158e6f0794637054c98376e236a6d
  Author: Dimitry Andric <dimitry at andric.com>
  Date:   2022-03-15 (Tue, 15 Mar 2022)

  Changed paths:
    M libcxx/include/__filesystem/directory_entry.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list