From 91a606e6c460e92219266b98302a35662181131a Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 28 Jan 2019 16:44:56 +0000 Subject: [libunwind] Drop the dependency on , add placement new inline We haven't eliminated C++ library dependency altogether in D57251, UnwindCursor.hpp had an unused dependency on 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 --- libunwind/src/libunwind.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libunwind/src/libunwind.cpp') 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 -#ifndef NDEBUG -#include // 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; -- cgit v1.2.3