1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s -std=c++2a | FileCheck %s --implicit-check-not=cxx_global_var_init --implicit-check-not=cxa_atexit
3 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-pch -o %t.pch %s -std=c++2a
4 // RUN: %clang_cc1 -triple x86_64-linux-gnu -include-pch %t.pch -x c++ /dev/null -emit-llvm -o - -std=c++2a | FileCheck %s --implicit-check-not=cxx_global_var_init --implicit-check-not=cxa_atexit
6 // CHECK: @a ={{.*}} global i32 123,
7 int a
= (delete new int, 123);
11 constexpr ~B() { n
*= 5; }
14 // CHECK: @b ={{.*}} constant {{.*}} i32 123
15 extern constexpr B b
= B();
17 // CHECK: @_ZL1c = internal constant {{.*}} i32 123
19 int use_c() { return c
.n
; }
26 // CHECK: @d ={{.*}} global {{.*}} zeroinitializer
29 // CHECK: @d_arr ={{.*}} global {{.*}} zeroinitializer
32 // CHECK: @d_tl ={{.*}} thread_local global {{.*}} zeroinitializer
34 // CHECK-NOT: @llvm.global_ctors
36 // CHECK-LABEL: define {{.*}} @_Z1fv(
39 // CHECK: call {{.*}}memcpy
41 // CHECK: call {{.*}}memset
48 // CHECK-LABEL: define {{.*}} @_Z1gv(
51 // CHECK-NOT: cxa_guard
54 static constexpr B b1
;