summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support
diff options
context:
space:
mode:
authorThomas Anderson <thomasanderson@google.com>2019-01-29 23:19:45 +0000
committerThomas Anderson <thomasanderson@google.com>2019-01-29 23:19:45 +0000
commit7f50dfa6fce5a7cc4c74534ea37f6b153ba1d394 (patch)
tree481cd81022d7888d48519d65aa65e524ce7f9d9b /libcxx/test/support
parentd8d193d5e2331da86a436ce39e7adedf4a700015 (diff)
downloadbcm5719-llvm-7f50dfa6fce5a7cc4c74534ea37f6b153ba1d394.tar.gz
bcm5719-llvm-7f50dfa6fce5a7cc4c74534ea37f6b153ba1d394.zip
[libc++] Fix Windows build error in <functional>
On my Windows system, __allocator is defined to nothing. This change fixes build errors of the below form: In file included from algorithm:644: functional(1492,31): error: expected member name or ';' after declaration specifiers const _Alloc& __allocator() const { return __f_.second(); } Differential Revision: https://reviews.llvm.org/D57355 llvm-svn: 352561
Diffstat (limited to 'libcxx/test/support')
-rw-r--r--libcxx/test/support/nasty_macros.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libcxx/test/support/nasty_macros.hpp b/libcxx/test/support/nasty_macros.hpp
index 7bc3f1e6a64..30d0ec003bb 100644
--- a/libcxx/test/support/nasty_macros.hpp
+++ b/libcxx/test/support/nasty_macros.hpp
@@ -54,6 +54,7 @@
// Test that libc++ doesn't use names reserved by WIN32 API Macros.
// NOTE: Obviously we can only define these on non-windows platforms.
#ifndef _WIN32
+#define __allocator NASTY_MACRO
#define __deallocate NASTY_MACRO
#define __out NASTY_MACRO
#endif
OpenPOWER on IntegriCloud