[libcxx] r350649 - [Sema] Teach Clang that aligned allocation is not supported with macosx10.13

Louis Dionne ldionne at apple.com
Tue Jan 8 12:26:57 PST 2019


Author: ldionne
Date: Tue Jan  8 12:26:56 2019
New Revision: 350649

URL: http://llvm.org/viewvc/llvm-project?rev=350649&view=rev
Log:
[Sema] Teach Clang that aligned allocation is not supported with macosx10.13

Summary:
r306722 added diagnostics when aligned allocation is used with deployment
targets that do not support it, but the first macosx supporting aligned
allocation was incorrectly set to 10.13. In reality, the dylib shipped
with macosx10.13 does not support aligned allocation, but the dylib
shipped with macosx10.14 does.

Reviewers: ahatanak

Subscribers: christof, jkorous, dexonsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D56445

Modified:
    libcxx/trunk/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
    libcxx/trunk/test/libcxx/memory/aligned_allocation_macro.pass.cpp

Modified: libcxx/trunk/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp?rev=350649&r1=350648&r2=350649&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp (original)
+++ libcxx/trunk/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp Tue Jan  8 12:26:56 2019
@@ -14,9 +14,15 @@
 // definitions, which does not yet provide aligned allocation
 // XFAIL: LIBCXX-WINDOWS-FIXME
 
-// Clang 10 (and older) will trigger an availability error when the deployment
+// AppleClang 10 (and older) will trigger an availability error when the deployment
 // target does not support aligned allocation, even if we pass `-faligned-allocation`.
+// XFAIL: apple-clang-10 && availability=macosx10.13
 // XFAIL: apple-clang-10 && availability=macosx10.12
+// XFAIL: apple-clang-10 && availability=macosx10.11
+// XFAIL: apple-clang-10 && availability=macosx10.10
+// XFAIL: apple-clang-10 && availability=macosx10.9
+// XFAIL: apple-clang-10 && availability=macosx10.8
+// XFAIL: apple-clang-10 && availability=macosx10.7
 
 // The dylibs shipped before macosx10.14 do not contain the aligned allocation
 // functions, so trying to force using those with -faligned-allocation results

Modified: libcxx/trunk/test/libcxx/memory/aligned_allocation_macro.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/memory/aligned_allocation_macro.pass.cpp?rev=350649&r1=350648&r2=350649&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/memory/aligned_allocation_macro.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/memory/aligned_allocation_macro.pass.cpp Tue Jan  8 12:26:56 2019
@@ -9,14 +9,17 @@
 
 // UNSUPPORTED: c++98, c++03, c++11, c++14
 
-// Aligned allocation functions are not provided prior to macosx10.13, but
-// AppleClang <= 10 does not know about this restriction and always enables them.
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.12
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.11
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.10
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.9
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.8
-// XFAIL: !(apple-clang-9 || apple-clang-10) && availability=macosx10.7
+// AppleClang <= 10 enables aligned allocation regardless of the deployment
+// target, so this test would fail.
+// UNSUPPORTED: apple-clang-9, apple-clang-10
+
+// XFAIL: availability=macosx10.13
+// XFAIL: availability=macosx10.12
+// XFAIL: availability=macosx10.11
+// XFAIL: availability=macosx10.10
+// XFAIL: availability=macosx10.9
+// XFAIL: availability=macosx10.8
+// XFAIL: availability=macosx10.7
 
 #include <new>
 




More information about the libcxx-commits mailing list