[libcxx-commits] [libcxx] 60b604a - [libc++][z/OS] Fix shared_ptr control block test when aligned allocation is not available (#109693)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 1 06:57:49 PDT 2024
Author: Zibi Sarbinowski
Date: 2024-10-01T09:57:46-04:00
New Revision: 60b604a1982c309f37af89a75a40c145d3e4cfa4
URL: https://github.com/llvm/llvm-project/commit/60b604a1982c309f37af89a75a40c145d3e4cfa4
DIFF: https://github.com/llvm/llvm-project/commit/60b604a1982c309f37af89a75a40c145d3e4cfa4.diff
LOG: [libc++][z/OS] Fix shared_ptr control block test when aligned allocation is not available (#109693)
This PR fixes the shared_ptr control block layout test that was recently updated in #76756.
When aligned allocation/deallocation is not available, part of the test doesn't work.
Added:
Modified:
libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp
index a298f55ea7cf5c..7488f518c8bae5 100644
--- a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp
+++ b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_layout.pass.cpp
@@ -195,10 +195,12 @@ int main(int, char**) {
test<TrivialEmptyType, FinalEmptyAlloc>();
test<TrivialEmptyType, NonTrivialAlloc>();
+#if !defined(TEST_HAS_NO_ALIGNED_ALLOCATION)
test<OveralignedEmptyType, TrivialEmptyAlloc>();
test<OveralignedEmptyType, TrivialNonEmptyAlloc>();
test<OveralignedEmptyType, FinalEmptyAlloc>();
test<OveralignedEmptyType, NonTrivialAlloc>();
+#endif
test<TrivialNonEmptyType, TrivialEmptyAlloc>();
test<TrivialNonEmptyType, TrivialNonEmptyAlloc>();
More information about the libcxx-commits
mailing list