[libcxx-commits] [PATCH] D152378: [libc++][filesystem] Use _LIBCPP_HIDE_FROM_ABI in common headers

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 7 09:31:49 PDT 2023


ldionne added a comment.

In D152378#4403616 <https://reviews.llvm.org/D152378#4403616>, @philnik wrote:

> I don't think there is any need to mark the functions as `_LIBCPP_HIDE_FROM_ABI`. These are all implementation details of the dylib, which is built with `-fvisibility=hidden`, so these symbols can never escape the dylib, making this pure noise.

These functions live in headers and they are included in multiple `.cpp` files that are linked together to create the dylib. Without `HIDE_FROM_ABI` and with the anonymous namespace, we get duplicate definitions in each `.o` file created using these headers. Also, the compiler complains about internal-linkage functions being unused in some of the `.cpp` files.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152378/new/

https://reviews.llvm.org/D152378



More information about the libcxx-commits mailing list