summaryrefslogtreecommitdiffstats
path: root/libcxx/include/new
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-01-07 03:01:24 +0000
committerEric Fiselier <eric@efcs.ca>2017-01-07 03:01:24 +0000
commitcd71f447b7d33689b6149e7f5ef2f1f79aaee157 (patch)
treee8a05138922cf64bc125a7066e7743225ceb87fa /libcxx/include/new
parentdeaceefc4b7018d98e0d27c66a0e2e063e1f03f0 (diff)
downloadbcm5719-llvm-cd71f447b7d33689b6149e7f5ef2f1f79aaee157.tar.gz
bcm5719-llvm-cd71f447b7d33689b6149e7f5ef2f1f79aaee157.zip
[libc++] Tolerate presence of __deallocate macro
Summary: On Windows the identifier `__deallocate` is defined as a macro by one of the Windows system headers. Previously libc++ worked around this by `#undef __deallocate` and generating a warning. However this causes the WIN32 version of `__threading_support` to always generate a warning on Windows. This is not OK. This patch renames all usages of `__deallocate` internally as to not conflict with the macro. Reviewers: mclow.lists, majnemer, rnk, rsmith, smeenai, compnerd Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28426 llvm-svn: 291332
Diffstat (limited to 'libcxx/include/new')
-rw-r--r--libcxx/include/new4
1 files changed, 1 insertions, 3 deletions
diff --git a/libcxx/include/new b/libcxx/include/new
index 442e113665d..6589f16b7a1 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -92,8 +92,6 @@ void operator delete[](void* ptr, void*) noexcept;
#include <cstdlib>
#endif
-#include <__undef___deallocate>
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
@@ -217,7 +215,7 @@ inline _LIBCPP_INLINE_VISIBILITY void *__allocate(size_t __size) {
#endif
}
-inline _LIBCPP_INLINE_VISIBILITY void __deallocate(void *__ptr) {
+inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate(void *__ptr) {
#ifdef _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE
::operator delete(__ptr);
#else
OpenPOWER on IntegriCloud