[llvm-branch-commits] [libcxx] 5c9eed7 - [libc++] Make __dir_stream visibility declaration consistent
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Apr 14 13:41:03 PDT 2022
Author: Dimitry Andric
Date: 2022-04-14T13:00:36-07:00
New Revision: 5c9eed741dbd32bf3de6ba177a56224822e976bb
URL: https://github.com/llvm/llvm-project/commit/5c9eed741dbd32bf3de6ba177a56224822e976bb
DIFF: https://github.com/llvm/llvm-project/commit/5c9eed741dbd32bf3de6ba177a56224822e976bb.diff
LOG: [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 7ab1ab0db40158e6f0794637054c98376e236a6d)
Added:
Modified:
libcxx/include/__filesystem/directory_entry.h
Removed:
################################################################################
diff --git a/libcxx/include/__filesystem/directory_entry.h b/libcxx/include/__filesystem/directory_entry.h
index 91dd1a2145883..95e45c02307fa 100644
--- a/libcxx/include/__filesystem/directory_entry.h
+++ b/libcxx/include/__filesystem/directory_entry.h
@@ -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,
More information about the llvm-branch-commits
mailing list