[libcxx-commits] [PATCH] D57262: [libunwind] Drop the dependency on <algorithm>, add placement new inline

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 25 16:27:28 PST 2019


phosek added inline comments.


================
Comment at: libunwind/src/libunwind.cpp:30
 
+inline void* operator new(size_t, void* __p) { return __p; }
+
----------------
phosek wrote:
> ldionne wrote:
> > Why do we need to define this? I thought placement new was handled by Clang directly, without requiring a declaration?
> That's what I assumed but that doesn't seem to be the case, without this definition the compilation fails because Clang cannot find the operator `new`.
Actually I think you're right, if I only provide declaration, Clang handles the definition.


Repository:
  rUNW libunwind

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

https://reviews.llvm.org/D57262





More information about the libcxx-commits mailing list