[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 15:35:38 PST 2019
phosek updated this revision to Diff 183639.
phosek added a comment.
Comment added.
Repository:
rUNW libunwind
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57262/new/
https://reviews.llvm.org/D57262
Files:
libunwind/src/UnwindCursor.hpp
libunwind/src/libunwind.cpp
Index: libunwind/src/libunwind.cpp
===================================================================
--- libunwind/src/libunwind.cpp
+++ libunwind/src/libunwind.cpp
@@ -27,6 +27,10 @@
using namespace libunwind;
+// libunwind does not and should not dependent on C++ library which means that
+// we need our own definition of inline placement new that's used in this file.
+inline void* operator new(size_t, void* __p) { return __p; }
+
/// internal object to represent this processes address space
LocalAddressSpace LocalAddressSpace::sThisAddressSpace;
Index: libunwind/src/UnwindCursor.hpp
===================================================================
--- libunwind/src/UnwindCursor.hpp
+++ libunwind/src/UnwindCursor.hpp
@@ -11,7 +11,6 @@
#ifndef __UNWINDCURSOR_HPP__
#define __UNWINDCURSOR_HPP__
-#include <algorithm>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57262.183639.patch
Type: text/x-patch
Size: 905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190125/1e1508c9/attachment.bin>
More information about the libcxx-commits
mailing list