[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 21 08:26:23 PDT 2023


ldionne marked 3 inline comments as done.
ldionne added a comment.

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

> In D152378#4414017 <https://reviews.llvm.org/D152378#4414017>, @ldionne wrote:
>
>> In D152378#4404281 <https://reviews.llvm.org/D152378#4404281>, @philnik wrote:
>>
>>> How would users end up with multiple versions of a function? All the functions are exclusively in `libc++.a`, and linking against multiple versions or that will definitely blow up.
>>
>> Why would linking against multiple versions of `libc++.a` blow up? I know it's not a good idea but I'm curious if you know of specific concerns, except e.g. global stream initialization.
>
> You have multiple strong definitions of lots of symbols. How would that //not// blow up?

Right, obviously, not sure what I was thinking. This means we could just drop the anonymous namespace instead and it would work as well. I'd prefer using `HIDE_FROM_ABI` because it makes this clearer and more consistent with the rest of the code base, but let's start with just dropping anonymous namespaces.


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