[libcxx-commits] [PATCH] D60717: [libc++] Remove old workaround for buildit

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 15 09:22:26 PDT 2019


ldionne marked an inline comment as done.
ldionne added inline comments.


================
Comment at: libcxx/src/new.cpp:26
-#else
-#   if defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
-#       include <cxxabi.h> // FIXME: remove this once buildit is gone.
----------------
The reasoning here is that for Apple builds, we never define `_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY` (maybe we used to but we don't anymore). Hence, the conditional is equivalent to:

```
#if defined(__APPLE__) && 1
```

Furthermore, we always define `_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS` for Apple builds, and nobody else I'm aware of does it, so this conditional is equivalent to

```
#if defined(_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS) && 1
```

Now we take the `#else` branch and that's the refactor.

The only thing this could break is if someone builds libc++ with `_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS` but their ABI library doesn't provide `get_new_handler`/`set_new_handler`. However, I'm not aware of any such user (and frankly if they exist then they're probably following these reviews).



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60717





More information about the libcxx-commits mailing list