diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-01-07 03:01:24 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-01-07 03:01:24 +0000 |
commit | 32b19c3d9fdde3d93288593ae7492ec837e87967 (patch) | |
tree | 712d7a27e7eff4afe9c05a716f4b118fff043f94 /include/valarray | |
parent | cc1d780758e3759212d452e7d71da75bb3b2c076 (diff) | |
download | external_libcxx-32b19c3d9fdde3d93288593ae7492ec837e87967.tar.gz external_libcxx-32b19c3d9fdde3d93288593ae7492ec837e87967.tar.bz2 external_libcxx-32b19c3d9fdde3d93288593ae7492ec837e87967.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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291332 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/valarray')
-rw-r--r-- | include/valarray | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/valarray b/include/valarray index f70304bbd..f0f1f62a1 100644 --- a/include/valarray +++ b/include/valarray @@ -348,7 +348,6 @@ template <class T> unspecified2 end(const valarray<T>& v); #include <new> #include <__undef_min_max> -#include <__undef___deallocate> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -3697,7 +3696,7 @@ valarray<_Tp>::resize(size_t __n, value_type __x) { while (__end_ != __begin_) (--__end_)->~value_type(); - _VSTD::__deallocate(__begin_); + _VSTD::__libcpp_deallocate(__begin_); __begin_ = __end_ = nullptr; } if (__n) |