[PATCH] D28426: [libc++] Tolerate presence of __deallocate macro

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 6 17:21:28 PST 2017


EricWF created this revision.
EricWF added reviewers: compnerd, smeenai, mclow.lists, majnemer, rnk, rsmith.
EricWF added a subscriber: cfe-commits.

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.


https://reviews.llvm.org/D28426

Files:
  include/__hash_table
  include/__sso_allocator
  include/__undef___deallocate
  include/experimental/dynarray
  include/memory
  include/module.modulemap
  include/new
  include/valarray
  src/experimental/memory_resource.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28426.83472.patch
Type: text/x-patch
Size: 9061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170107/3c2b08a6/attachment.bin>


More information about the cfe-commits mailing list