[libcxx-commits] [PATCH] D57455: [libunwind] Provide inline placement new definition

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 1 13:31:15 PST 2019


ldionne added a comment.

In D57455#1381424 <https://reviews.llvm.org/D57455#1381424>, @mclow.lists wrote:

> My problem with declaring our own placement new is that I think we're just kicking the can down the road; that the problem might (will) come back to bite us in the future.
>  It would certainly be conforming for clang to reject this code at compile time.
>
> But it's ok as a short-term fix.   Who is going to figure out what we want to do long term?


I see a couple of options:

1. Don't use anything that requires the Standard library inside libunwind (basically use C)
2. The classical solution to resolve circular dependencies: split the Standard library into a part that does not require libunwind and a part that does. The part that does not require libunwind can be used inside libunwind, and should include things like this placement new operator.
3. Just give up on eliminating the circular dependency, use `#include <new>` and be done with it. Then we need to add `_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS ` when building a hermetic static library and the reply to my comment on D57107 <https://reviews.llvm.org/D57107?id=183154#inline-506254> just becomes "though luck".


Repository:
  rUNW libunwind

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

https://reviews.llvm.org/D57455





More information about the libcxx-commits mailing list