[PATCH] D50205: [libc++] Add availability markup for aligned new/delete

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 2 15:46:01 PDT 2018


ldionne created this revision.
ldionne added reviewers: EricWF, vsapsai.
Herald added subscribers: cfe-commits, dexonsmith, christof.

The aligned allocation and deallocation functions were added in the dylib
in Mac OSX 10.13. This commit does two things: first, it adds availability
markup to those functions such that clients targetting older OSes get a
compiler error instead of a link error if they try to use these functions.

Secondly, it makes sure that the library itself does not use these functions
when targetting older OSes.

rdar://problem/34223934
rdar://problem/42826941


Repository:
  rCXX libc++

https://reviews.llvm.org/D50205

Files:
  libcxx/include/__config
  libcxx/include/memory
  libcxx/include/new
  libcxx/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_replace.pass.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp
  libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_replace.pass.cpp
  libcxx/test/support/test_macros.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50205.158854.patch
Type: text/x-patch
Size: 15905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180802/be3153cf/attachment-0001.bin>


More information about the cfe-commits mailing list