From 7854d9075882c27e464d942a4a72251e9c00def1 Mon Sep 17 00:00:00 2001 From: Artur Gainullin Date: Tue, 16 Jul 2024 11:49:23 -0700 Subject: [PATCH 1/3] [SYCL][Test] Update ABI test after moving handler members to impl --- .../abi/sycl_classes_abi_neutral_test.cpp | 325 +----------------- 1 file changed, 4 insertions(+), 321 deletions(-) diff --git a/sycl/test/abi/sycl_classes_abi_neutral_test.cpp b/sycl/test/abi/sycl_classes_abi_neutral_test.cpp index c16bdc756a3e0..c9cc00ece4461 100644 --- a/sycl/test/abi/sycl_classes_abi_neutral_test.cpp +++ b/sycl/test/abi/sycl_classes_abi_neutral_test.cpp @@ -12,326 +12,9 @@ // default. All such data members can potentially cross ABI boundaries and // that's why we need to be sure that we use only ABI-neutral data members. -// New exclusions are NOT ALLOWED to this file unless it is guaranteed that data -// member is not crossing ABI boundary. All current exclusions are listed below. - - - -// CHECK: 0 | class sycl::detail::CG -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGAdviseUSM -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGBarrier -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGCopy -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGCopy2DUSM -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGCopyFromDeviceGlobal -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGCopyImage -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGCopyToDeviceGlobal -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGCopyUSM -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGExecCommandBuffer -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGExecKernel -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 408 | class std::basic_string MKernelName -// CHECK-NEXT: 408 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 424 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGFill -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGFill2DUSM -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGFillUSM -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGHostTask -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGMemset2DUSM -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGPrefetchUSM -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGProfilingTag -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGReadWriteHostPipe -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 208 | class std::basic_string PipeName -// CHECK-NEXT: 208 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 224 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGSemaphoreSignal -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGSemaphoreWait -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at - -// CHECK: 0 | class sycl::detail::CGUpdateHost -// CHECK-NEXT: 0 | class sycl::detail::CG (primary base) -// CHECK-NEXT: 0 | (CG vtable pointer) -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 136 | class std::basic_string MFunctionName -// CHECK-NEXT: 136 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 152 | union std::basic_string::(anonymous at -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 168 | class std::basic_string MFileName -// CHECK-NEXT: 168 | struct std::basic_string::_Alloc_hider _M_dataplus -// CHECK-NOT: {{^0 \| class|std::basic_string|std::list}} -// CHECK: 184 | union std::basic_string::(anonymous at +// Exclusions are NOT ALLOWED to this file unless it is guaranteed that data +// member is not crossing ABI boundary. If there is a std::string/std::list +// data member which is guaranteed to not cross ABI boundary then it must be +// matched in this test explicitly. #include From f8aaab5cf35adbe73767df407ed57bff71c07c83 Mon Sep 17 00:00:00 2001 From: Artur Gainullin Date: Tue, 16 Jul 2024 13:08:02 -0700 Subject: [PATCH 2/3] Match "struct" as well, not only "class" --- .../abi/sycl_classes_abi_neutral_test.cpp | 42 ++++++++++++++++--- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/sycl/test/abi/sycl_classes_abi_neutral_test.cpp b/sycl/test/abi/sycl_classes_abi_neutral_test.cpp index c9cc00ece4461..3043ab100add7 100644 --- a/sycl/test/abi/sycl_classes_abi_neutral_test.cpp +++ b/sycl/test/abi/sycl_classes_abi_neutral_test.cpp @@ -1,5 +1,5 @@ -// RUN: %clangxx -std=c++17 -I %sycl_include -I %sycl_include/sycl -fsycl-device-only -c -fno-color-diagnostics -Xclang -fdump-record-layouts-complete %s -o %t.out | grep -Pzo "0 \| class sycl::.*\n([^\n].*\n)*" | sort -z | FileCheck --implicit-check-not "{{std::basic_string|std::list}}" %s -// RUN: %clangxx -std=c++17 -I %sycl_include -I %sycl_include/sycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts-complete %s -o %t.out | grep -Pzo "0 \| class sycl::.*\n([^\n].*\n)*" | sort -z | FileCheck --implicit-check-not "{{std::basic_string|std::list}}" %s +// RUN: %clangxx -std=c++17 -I %sycl_include -I %sycl_include/sycl -fsycl-device-only -c -fno-color-diagnostics -Xclang -fdump-record-layouts-complete %s -o %t.out | grep -Pzo "0 \| (class|struct) sycl::.*\n([^\n].*\n)*" | sort -z | FileCheck --implicit-check-not "{{std::basic_string|std::list}}" %s +// RUN: %clangxx -std=c++17 -I %sycl_include -I %sycl_include/sycl -c -fno-color-diagnostics -Xclang -fdump-record-layouts-complete %s -o %t.out | grep -Pzo "0 \| (class|struct) sycl::.*\n([^\n].*\n)*" | sort -z | FileCheck --implicit-check-not "{{std::basic_string|std::list}}" %s // REQUIRES: linux // UNSUPPORTED: libcxx @@ -12,9 +12,39 @@ // default. All such data members can potentially cross ABI boundaries and // that's why we need to be sure that we use only ABI-neutral data members. -// Exclusions are NOT ALLOWED to this file unless it is guaranteed that data -// member is not crossing ABI boundary. If there is a std::string/std::list -// data member which is guaranteed to not cross ABI boundary then it must be -// matched in this test explicitly. +// New exclusions are NOT ALLOWED to this file unless it is guaranteed that data +// member is not crossing ABI boundary. All current exclusions are listed below. + +// CHECK: 0 | struct sycl::ext::oneapi::experimental::build_options +// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::run_time_property_key (base) (empty) +// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::property_key_base_tag (base) (empty) +// CHECK-NEXT: 0 | class std::vector > opts +// CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > > (base) +// CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > >::_Vector_impl _M_impl +// CHECK-NEXT: 0 | class std::allocator > (base) (empty) +// CHECK-NEXT: 0 | class {{(std|__gnu_cxx)}}::__new_allocator > (base) (empty) +// CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > >::_Vector_impl_data (base) + + +// CHECK: 0 | struct sycl::ext::oneapi::experimental::include_files +// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::run_time_property_key (base) (empty) +// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::property_key_base_tag (base) (empty) +// CHECK-NEXT: 0 | class std::vector, class std::basic_string > > record +// CHECK-NEXT: 0 | struct std::_Vector_base, class std::basic_string >, class std::allocator, class std::basic_string > > > (base) +// CHECK-NEXT: 0 | struct std::_Vector_base, class std::basic_string >, class std::allocator, class std::basic_string > > >::_Vector_impl _M_impl +// CHECK-NEXT: 0 | class std::allocator, class std::basic_string > > (base) (empty) +// CHECK-NEXT: 0 | class {{(std|__gnu_cxx)}}::__new_allocator, class std::basic_string > > (base) (empty) +// CHECK-NEXT: 0 | struct std::_Vector_base, class std::basic_string >, class std::allocator, class std::basic_string > > >::_Vector_impl_data (base) + + +// CHECK: 0 | struct sycl::ext::oneapi::experimental::registered_kernel_names +// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::run_time_property_key (base) (empty) +// CHECK-NEXT: 0 | struct sycl::ext::oneapi::experimental::detail::property_key_base_tag (base) (empty) +// CHECK-NEXT: 0 | class std::vector > kernel_names +// CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > > (base) +// CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > >::_Vector_impl _M_impl +// CHECK-NEXT: 0 | class std::allocator > (base) (empty) +// CHECK-NEXT: 0 | class {{(std|__gnu_cxx)}}::__new_allocator > (base) (empty) +// CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > >::_Vector_impl_data (base) #include From e0e73f6f9fa4e9dcd35138346811fdb8cdc6120c Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Wed, 17 Jul 2024 03:39:16 -0700 Subject: [PATCH 3/3] Fix new_allocator naming Signed-off-by: Larsen, Steffen --- sycl/test/abi/sycl_classes_abi_neutral_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/test/abi/sycl_classes_abi_neutral_test.cpp b/sycl/test/abi/sycl_classes_abi_neutral_test.cpp index 3043ab100add7..1caa98419c033 100644 --- a/sycl/test/abi/sycl_classes_abi_neutral_test.cpp +++ b/sycl/test/abi/sycl_classes_abi_neutral_test.cpp @@ -22,7 +22,7 @@ // CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > > (base) // CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > >::_Vector_impl _M_impl // CHECK-NEXT: 0 | class std::allocator > (base) (empty) -// CHECK-NEXT: 0 | class {{(std|__gnu_cxx)}}::__new_allocator > (base) (empty) +// CHECK-NEXT: 0 | class {{(std::__new_allocator|__gnu_cxx::new_allocator)}} > (base) (empty) // CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > >::_Vector_impl_data (base) @@ -33,7 +33,7 @@ // CHECK-NEXT: 0 | struct std::_Vector_base, class std::basic_string >, class std::allocator, class std::basic_string > > > (base) // CHECK-NEXT: 0 | struct std::_Vector_base, class std::basic_string >, class std::allocator, class std::basic_string > > >::_Vector_impl _M_impl // CHECK-NEXT: 0 | class std::allocator, class std::basic_string > > (base) (empty) -// CHECK-NEXT: 0 | class {{(std|__gnu_cxx)}}::__new_allocator, class std::basic_string > > (base) (empty) +// CHECK-NEXT: 0 | class {{(std::__new_allocator|__gnu_cxx::new_allocator)}}, class std::basic_string > > (base) (empty) // CHECK-NEXT: 0 | struct std::_Vector_base, class std::basic_string >, class std::allocator, class std::basic_string > > >::_Vector_impl_data (base) @@ -44,7 +44,7 @@ // CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > > (base) // CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > >::_Vector_impl _M_impl // CHECK-NEXT: 0 | class std::allocator > (base) (empty) -// CHECK-NEXT: 0 | class {{(std|__gnu_cxx)}}::__new_allocator > (base) (empty) +// CHECK-NEXT: 0 | class {{(std::__new_allocator|__gnu_cxx::new_allocator)}} > (base) (empty) // CHECK-NEXT: 0 | struct std::_Vector_base, class std::allocator > >::_Vector_impl_data (base) #include