diff options
| author | Petr Hosek <phosek@chromium.org> | 2019-01-28 20:55:12 +0000 |
|---|---|---|
| committer | Petr Hosek <phosek@chromium.org> | 2019-01-28 20:55:12 +0000 |
| commit | 4ecdb70424a7c057bf6858027abc3a0f59454210 (patch) | |
| tree | cfa2a5c62198e6868bdece0afc1507c63867e0e3 /libunwind/src | |
| parent | 4155e789120b764911d7da5ec1ac7dc37069889b (diff) | |
| download | bcm5719-llvm-4ecdb70424a7c057bf6858027abc3a0f59454210.tar.gz bcm5719-llvm-4ecdb70424a7c057bf6858027abc3a0f59454210.zip | |
Revert "[libunwind] Drop the dependency on <algorithm>, add placement new inline"
This reverts commit r352384: this broke on ARM as UnwindCursor.hpp
still has some C++ library dependencies.
llvm-svn: 352427
Diffstat (limited to 'libunwind/src')
| -rw-r--r-- | libunwind/src/Unwind-seh.cpp | 4 | ||||
| -rw-r--r-- | libunwind/src/UnwindCursor.hpp | 1 | ||||
| -rw-r--r-- | libunwind/src/libunwind.cpp | 8 |
3 files changed, 5 insertions, 8 deletions
diff --git a/libunwind/src/Unwind-seh.cpp b/libunwind/src/Unwind-seh.cpp index 26eb0ef262b..f55d62423a6 100644 --- a/libunwind/src/Unwind-seh.cpp +++ b/libunwind/src/Unwind-seh.cpp @@ -49,10 +49,6 @@ using namespace libunwind; /// Class of foreign exceptions based on unrecognized SEH exceptions. static const uint64_t kSEHExceptionClass = 0x434C4E4753454800; // CLNGSEH\0 -// 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*); - /// Exception cleanup routine used by \c _GCC_specific_handler to /// free foreign exceptions. static void seh_exc_cleanup(_Unwind_Reason_Code urc, _Unwind_Exception *exc) { diff --git a/libunwind/src/UnwindCursor.hpp b/libunwind/src/UnwindCursor.hpp index 62efe771bab..497ff84552d 100644 --- a/libunwind/src/UnwindCursor.hpp +++ b/libunwind/src/UnwindCursor.hpp @@ -11,6 +11,7 @@ #ifndef __UNWINDCURSOR_HPP__ #define __UNWINDCURSOR_HPP__ +#include <algorithm> #include <stdint.h> #include <stdio.h> #include <stdlib.h> diff --git a/libunwind/src/libunwind.cpp b/libunwind/src/libunwind.cpp index cfa9112a633..a2496a06de9 100644 --- a/libunwind/src/libunwind.cpp +++ b/libunwind/src/libunwind.cpp @@ -11,6 +11,10 @@ #include <libunwind.h> +#ifndef NDEBUG +#include <cstdlib> // getenv +#endif + #include "libunwind_ext.h" #include "config.h" @@ -23,10 +27,6 @@ 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; |

