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 | cd71f447b7d33689b6149e7f5ef2f1f79aaee157 (patch) | |
| tree | e8a05138922cf64bc125a7066e7743225ceb87fa /libcxx/include/__sso_allocator | |
| parent | deaceefc4b7018d98e0d27c66a0e2e063e1f03f0 (diff) | |
| download | bcm5719-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/__sso_allocator')
| -rw-r--r-- | libcxx/include/__sso_allocator | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libcxx/include/__sso_allocator b/libcxx/include/__sso_allocator index ca3b937c013..8147e75ec2c 100644 --- a/libcxx/include/__sso_allocator +++ b/libcxx/include/__sso_allocator @@ -15,8 +15,6 @@ #include <type_traits> #include <new> -#include <__undef___deallocate> - #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif @@ -64,7 +62,7 @@ public: if (__p == (pointer)&buf_) __allocated_ = false; else - _VSTD::__deallocate(__p); + _VSTD::__libcpp_deallocate(__p); } _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);} |

