diff options
| author | Petr Hosek <phosek@chromium.org> | 2019-01-28 16:44:56 +0000 |
|---|---|---|
| committer | Petr Hosek <phosek@chromium.org> | 2019-01-28 16:44:56 +0000 |
| commit | 91a606e6c460e92219266b98302a35662181131a (patch) | |
| tree | e2c1d4ba189b19a581c3a0821371cf54d09cb694 /libunwind/src/libunwind.cpp | |
| parent | 4463ebe4a75dfcf6633bbda8f4b6a466750e6da3 (diff) | |
| download | bcm5719-llvm-91a606e6c460e92219266b98302a35662181131a.tar.gz bcm5719-llvm-91a606e6c460e92219266b98302a35662181131a.zip | |
[libunwind] Drop the dependency on <algorithm>, add placement new inline
We haven't eliminated C++ library dependency altogether in D57251,
UnwindCursor.hpp had an unused dependency on <algorithm> which was
pulling in other C++ headers. Removing that dependency also revealed
(correctly) that we need our own global placement new declaration. Now
libunwind should be independent of the C++ library.
Differential Revision: https://reviews.llvm.org/D57262
llvm-svn: 352384
Diffstat (limited to 'libunwind/src/libunwind.cpp')
| -rw-r--r-- | libunwind/src/libunwind.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp index a2496a06de9..cfa9112a633 100644 --- a/libunwind/src/libunwind.cpp +++ b/libunwind/src/libunwind.cpp @@ -11,10 +11,6 @@ #include <libunwind.h> -#ifndef NDEBUG -#include <cstdlib> // getenv -#endif - #include "libunwind_ext.h" #include "config.h" @@ -27,6 +23,10 @@ using namespace libunwind; +// libunwind does not and should not depend on C++ library which means that we +// need our own declaration of global placement new. +void *operator new(size_t, void*); + /// internal object to represent this processes address space LocalAddressSpace LocalAddressSpace::sThisAddressSpace; |

