1 // https://github.com/llvm/llvm-project/issues/59765
2 // FIXME: Since the signature of the constructors/destructors is
3 // different in different targets. The current CHECK can't work
4 // well when targeting or running on AIX.
5 // It would be better to add the corresponding test for other test.
6 // UNSUPPORTED: system-aix
10 // RUN: split-file %s %t
12 // RUN: %clang_cc1 -std=c++20 %t/M.cppm -triple %itanium_abi_triple -emit-module-interface -o %t/M.pcm
13 // RUN: %clang_cc1 -std=c++20 %t/M.pcm -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/M.cppm
14 // RUN: %clang_cc1 -std=c++20 %t/Use.cpp -fprebuilt-module-path=%t -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/Use.cpp
16 // Check that the behavior of header units is normal as headers.
17 // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple -xc++-user-header %t/foo.h -emit-header-unit -o %t/foo.pcm
18 // RUN: %clang_cc1 -std=c++20 %t/UseHU.cpp -fmodule-file=%t/foo.pcm -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/UseHU.cpp
30 // CHECK: @_ZW1M1a = {{.*}}global %class.A zeroinitializer
31 // CHECK: define{{.*}}void @__cxx_global_var_init()
33 // CHECK-NEXT: call{{.*}}@_ZNW1M1AC1Ev({{.*}}@_ZW1M1a
34 // CHECK-NEXT: call{{.*}}@__cxa_atexit(ptr @_ZNW1M1AD1Ev, ptr @_ZW1M1a
42 // CHECK-NOT: @_ZNW1M1AC1Ev
43 // CHECK-NOT: @_ZNW1M1AD1Ev
60 // CHECK: @a = {{.*}}global %class.A zeroinitializer
61 // CHECK: define{{.*}}void @__cxx_global_var_init()
63 // CHECK-NEXT: call{{.*}}@_ZN1AC1Ev({{.*}}@a
64 // CHECK-NEXT: call{{.*}}@__cxa_atexit(ptr @_ZN1AD1Ev, ptr @a