diff options
Diffstat (limited to 'test/CodeGenCXX')
-rw-r--r-- | test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp | 19 | ||||
-rw-r--r-- | test/CodeGenCXX/attr.cpp | 2 | ||||
-rw-r--r-- | test/CodeGenCXX/cxx11-exception-spec.cpp | 13 | ||||
-rw-r--r-- | test/CodeGenCXX/default-destructor-synthesis.cpp | 4 | ||||
-rw-r--r-- | test/CodeGenCXX/derived-to-base.cpp | 6 | ||||
-rw-r--r-- | test/CodeGenCXX/exceptions.cpp | 2 | ||||
-rw-r--r-- | test/CodeGenCXX/global-dtor-no-atexit.cpp | 10 | ||||
-rw-r--r-- | test/CodeGenCXX/member-initializers.cpp | 4 | ||||
-rw-r--r-- | test/CodeGenCXX/microsoft-abi-array-cookies.cpp | 4 | ||||
-rw-r--r-- | test/CodeGenCXX/no-exceptions.cpp | 2 | ||||
-rw-r--r-- | test/CodeGenCXX/pointers-to-data-members.cpp | 6 | ||||
-rw-r--r-- | test/CodeGenCXX/reference-cast.cpp | 2 | ||||
-rw-r--r-- | test/CodeGenCXX/threadsafe-statics.cpp | 4 |
13 files changed, 40 insertions, 38 deletions
diff --git a/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp b/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp index 6b61d92580..3828388d48 100644 --- a/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp +++ b/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp @@ -3,16 +3,19 @@ int c(void) __attribute__((const)); int p(void) __attribute__((pure)); int t(void); -// CHECK: define i32 @_Z1fv() { +// CHECK: define i32 @_Z1fv() [[TF:#[0-9]+]] { int f(void) { - // CHECK: call i32 @_Z1cv() [[NUW_RN:#[0-9]+]] - // CHECK: call i32 @_Z1pv() [[NUW_RO:#[0-9]+]] + // CHECK: call i32 @_Z1cv() [[NUW_RN_CALL:#[0-9]+]] + // CHECK: call i32 @_Z1pv() [[NUW_RO_CALL:#[0-9]+]] return c() + p() + t(); } -// CHECK: declare i32 @_Z1cv() #0 -// CHECK: declare i32 @_Z1pv() #1 -// CHECK: declare i32 @_Z1tv() +// CHECK: declare i32 @_Z1cv() [[NUW_RN:#[0-9]+]] +// CHECK: declare i32 @_Z1pv() [[NUW_RO:#[0-9]+]] +// CHECK: declare i32 @_Z1tv() [[TF]] -// CHECK: attributes [[NUW_RN]] = { nounwind readnone } -// CHECK: attributes [[NUW_RO]] = { nounwind readonly } +// CHECK: attributes [[TF]] = { {{.*}} } +// CHECK: attributes [[NUW_RN]] = { nounwind readnone{{.*}} } +// CHECK: attributes [[NUW_RO]] = { nounwind readonly{{.*}} } +// CHECK: attributes [[NUW_RN_CALL]] = { nounwind readnone } +// CHECK: attributes [[NUW_RO_CALL]] = { nounwind readonly } diff --git a/test/CodeGenCXX/attr.cpp b/test/CodeGenCXX/attr.cpp index 6db214e327..4748cda8cc 100644 --- a/test/CodeGenCXX/attr.cpp +++ b/test/CodeGenCXX/attr.cpp @@ -31,4 +31,4 @@ int test1() { return 10; } // CHECK at top of file extern "C" int test2() __attribute__((alias("_Z5test1v"))); -// CHECK: attributes [[NUW]] = { nounwind } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGenCXX/cxx11-exception-spec.cpp b/test/CodeGenCXX/cxx11-exception-spec.cpp index 5fd1fd8f14..49ca8610f2 100644 --- a/test/CodeGenCXX/cxx11-exception-spec.cpp +++ b/test/CodeGenCXX/cxx11-exception-spec.cpp @@ -10,7 +10,7 @@ template<typename T> struct S { static void g() noexcept(sizeof(T) == 4); }; -// CHECK: define {{.*}} @_Z1fIsEvv() { +// CHECK: define {{.*}} @_Z1fIsEvv() [[NONE:#[0-9]+]] { template<> void f<short>() { h(); } // CHECK: define {{.*}} @_Z1fIA2_sEvv() [[NUW:#[0-9]+]] { template<> void f<short[2]>() noexcept { h(); } @@ -21,7 +21,7 @@ template<> void S<short>::f() { h(); } // CHECK: define {{.*}} @_ZN1SIA2_sE1fEv() [[NUW]] template<> void S<short[2]>::f() noexcept { h(); } -// CHECK: define {{.*}} @_Z1fIDsEvv() { +// CHECK: define {{.*}} @_Z1fIDsEvv() [[NONE]] { template void f<char16_t>(); // CHECK: define {{.*}} @_Z1fIA2_DsEvv() [[NUW]] { template void f<char16_t[2]>(); @@ -35,7 +35,7 @@ template void S<char16_t[2]>::f(); void h() { // CHECK: define {{.*}} @_Z1fIiEvv() [[NUW]] { f<int>(); - // CHECK: define {{.*}} @_Z1fIA2_iEvv() { + // CHECK: define {{.*}} @_Z1fIA2_iEvv() [[NONE]] { f<int[2]>(); // CHECK: define {{.*}} @_ZN1SIiE1fEv() [[NUW]] @@ -46,7 +46,7 @@ void h() { // CHECK: define {{.*}} @_Z1fIfEvv() [[NUW]] { void (*f1)() = &f<float>; - // CHECK: define {{.*}} @_Z1fIdEvv() { + // CHECK: define {{.*}} @_Z1fIdEvv() [[NONE]] { void (*f2)() = &f<double>; // CHECK: define {{.*}} @_ZN1SIfE1fEv() [[NUW]] @@ -57,7 +57,7 @@ void h() { // CHECK: define {{.*}} @_Z1fIA4_cEvv() [[NUW]] { (void)&f<char[4]>; - // CHECK: define {{.*}} @_Z1fIcEvv() { + // CHECK: define {{.*}} @_Z1fIcEvv() [[NONE]] { (void)&f<char>; // CHECK: define {{.*}} @_ZN1SIA4_cE1fEv() [[NUW]] @@ -119,4 +119,5 @@ void j() { Nested<long>().f<false, long>(); } -// CHECK: attributes [[NUW]] = { nounwind } +// CHECK: attributes [[NONE]] = { {{.*}} } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGenCXX/default-destructor-synthesis.cpp b/test/CodeGenCXX/default-destructor-synthesis.cpp index f9e13eb526..af780044d1 100644 --- a/test/CodeGenCXX/default-destructor-synthesis.cpp +++ b/test/CodeGenCXX/default-destructor-synthesis.cpp @@ -24,7 +24,7 @@ struct M : Q, P { Q q_arr[2][3]; }; -// CHECK: define i32 @_Z1fv() #0 +// CHECK: define i32 @_Z1fv() [[NUW:#[0-9]+]] int f() { { count = 1; @@ -35,4 +35,4 @@ int f() { return count; } -// CHECK: attributes #0 = { nounwind{{.*}} } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGenCXX/derived-to-base.cpp b/test/CodeGenCXX/derived-to-base.cpp index fa03fee8d6..c69b45630e 100644 --- a/test/CodeGenCXX/derived-to-base.cpp +++ b/test/CodeGenCXX/derived-to-base.cpp @@ -15,7 +15,7 @@ void f() { b.f(); } -// CHECK: define %struct.B* @_Z1fP1A(%struct.A* %a) #0 +// CHECK: define %struct.B* @_Z1fP1A(%struct.A* %a) [[NUW:#[0-9]+]] B *f(A *a) { // CHECK-NOT: br label // CHECK: ret %struct.B* @@ -25,7 +25,7 @@ B *f(A *a) { // PR5965 namespace PR5965 { -// CHECK: define %struct.A* @_ZN6PR59651fEP1B(%struct.B* %b) #0 +// CHECK: define %struct.A* @_ZN6PR59651fEP1B(%struct.B* %b) [[NUW]] A *f(B* b) { // CHECK-NOT: br label // CHECK: ret %struct.A* @@ -46,4 +46,4 @@ namespace test3 { } } -// CHECK: attributes #0 = { nounwind{{.*}} } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGenCXX/exceptions.cpp b/test/CodeGenCXX/exceptions.cpp index fb0a9b2e5e..f6f5079791 100644 --- a/test/CodeGenCXX/exceptions.cpp +++ b/test/CodeGenCXX/exceptions.cpp @@ -526,6 +526,4 @@ namespace test11 { // (After this is a terminate landingpad.) } -// CHECK: attributes [[NUW]] = { nounwind } // CHECK: attributes [[NI_NR_NUW]] = { noinline noreturn nounwind } -// CHECK: attributes [[NR_NUW]] = { noreturn nounwind } diff --git a/test/CodeGenCXX/global-dtor-no-atexit.cpp b/test/CodeGenCXX/global-dtor-no-atexit.cpp index 0b323e9a42..7c4b6aa1e0 100644 --- a/test/CodeGenCXX/global-dtor-no-atexit.cpp +++ b/test/CodeGenCXX/global-dtor-no-atexit.cpp @@ -5,12 +5,12 @@ // CHECK: call void @_ZN1AC1Ev([[A:%.*]]* @a) // CHECK-NEXT: call i32 @atexit(void ()* @__dtor_a) -// CHECK: define internal void @__dtor_a() #0 +// CHECK: define internal void @__dtor_a() [[NUW:#[0-9]+]] // CHECK: call void @_ZN1AD1Ev([[A]]* @a) // CHECK: call void @_ZN1AC1Ev([[A]]* @b) // CHECK-NEXT: call i32 @atexit(void ()* @__dtor_b) -// CHECK: define internal void @__dtor_b() #0 +// CHECK: define internal void @__dtor_b() [[NUW]] // CHECK: call void @_ZN1AD1Ev([[A]]* @b) class A { @@ -33,14 +33,14 @@ A a, b; // CHECK-NEXT: call i32 @atexit(void ()* @__dtor__ZZ4funcvE2a2) // CHECK-NEXT: call void @__cxa_guard_release(i64* @_ZGVZ4funcvE2a2) -// CHECK: define internal void @__dtor__ZZ4funcvE2a1() #0 +// CHECK: define internal void @__dtor__ZZ4funcvE2a1() [[NUW]] // CHECK: call void @_ZN1AD1Ev([[A]]* @_ZZ4funcvE2a1) -// CHECK: define internal void @__dtor__ZZ4funcvE2a2() #0 +// CHECK: define internal void @__dtor__ZZ4funcvE2a2() [[NUW]] // CHECK: call void @_ZN1AD1Ev([[A]]* @_ZZ4funcvE2a2) void func() { static A a1, a2; } -// CHECK: attributes #0 = { nounwind } +// CHECK: attributes [[NUW]] = { nounwind } diff --git a/test/CodeGenCXX/member-initializers.cpp b/test/CodeGenCXX/member-initializers.cpp index 69a63b2e44..c22b99d606 100644 --- a/test/CodeGenCXX/member-initializers.cpp +++ b/test/CodeGenCXX/member-initializers.cpp @@ -21,7 +21,7 @@ int f() { } // Test that we don't try to fold the default value of j when initializing i. -// CHECK: define i32 @_Z9test_foldv() #0 +// CHECK: define i32 @_Z9test_foldv() [[NUW_RN:#[0-9]+]] int test_fold() { struct A { A(const int j = 1) : i(j) { } @@ -32,4 +32,4 @@ int test_fold() { return A(2).i; } -// CHECK: attributes #0 = { nounwind readnone{{.*}} } +// CHECK: attributes [[NUW_RN]] = { nounwind readnone{{.*}} } diff --git a/test/CodeGenCXX/microsoft-abi-array-cookies.cpp b/test/CodeGenCXX/microsoft-abi-array-cookies.cpp index c0bbbaf2f8..1ba1f6a5f2 100644 --- a/test/CodeGenCXX/microsoft-abi-array-cookies.cpp +++ b/test/CodeGenCXX/microsoft-abi-array-cookies.cpp @@ -5,7 +5,7 @@ struct ClassWithoutDtor { }; void check_array_no_cookies() { -// CHECK: define void @"\01?check_array_no_cookies@@YAXXZ"() #0 +// CHECK: define void @"\01?check_array_no_cookies@@YAXXZ"() [[NUW:#[0-9]+]] // CHECK: call noalias i8* @"\01??_U@YAPAXI@Z"(i32 42) ClassWithoutDtor *array = new ClassWithoutDtor[42]; @@ -58,4 +58,4 @@ void check_array_cookies_aligned() { // CHECK: getelementptr inbounds i8* [[ARRAY_AS_CHAR]], i64 -8 } -// CHECK: attributes #0 = { nounwind{{.*}} } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGenCXX/no-exceptions.cpp b/test/CodeGenCXX/no-exceptions.cpp index ecc5201138..ceb3b8e803 100644 --- a/test/CodeGenCXX/no-exceptions.cpp +++ b/test/CodeGenCXX/no-exceptions.cpp @@ -11,4 +11,4 @@ void f() throw (int) { // CHECK: ret void } -// CHECK: attributes [[NUW]] = { nounwind } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGenCXX/pointers-to-data-members.cpp b/test/CodeGenCXX/pointers-to-data-members.cpp index 841209e84e..7335c97dd9 100644 --- a/test/CodeGenCXX/pointers-to-data-members.cpp +++ b/test/CodeGenCXX/pointers-to-data-members.cpp @@ -151,13 +151,13 @@ struct A { A() : a() {} }; -// CHECK-O3: define zeroext i1 @_ZN6PR71395checkEv() [[NUW_RO:#[0-9]+]] +// CHECK-O3: define zeroext i1 @_ZN6PR71395checkEv() [[NUW:#[0-9]+]] bool check() { // CHECK-O3: ret i1 true return A().a.data == 0; } -// CHECK-O3: define zeroext i1 @_ZN6PR71396check2Ev() [[NUW_RO]] +// CHECK-O3: define zeroext i1 @_ZN6PR71396check2Ev() [[NUW]] bool check2() { // CHECK-O3: ret i1 true return ptr_to_member_type() == 0; @@ -255,4 +255,4 @@ namespace PR13097 { // CHECK: call void @_ZN7PR130971XC1ERKS0_ } -// CHECK-O3: attributes [[NUW_RO]] = { nounwind readnone{{.*}} } +// CHECK-O3: attributes [[NUW]] = { nounwind readnone{{.*}} } diff --git a/test/CodeGenCXX/reference-cast.cpp b/test/CodeGenCXX/reference-cast.cpp index f440cf5a47..f157ae99f9 100644 --- a/test/CodeGenCXX/reference-cast.cpp +++ b/test/CodeGenCXX/reference-cast.cpp @@ -193,4 +193,4 @@ namespace PR10650 { // CHECK: store i64 } -// CHECK: attributes [[NUW]] = { nounwind } +// CHECK: attributes [[NUW]] = { nounwind{{.*}} } diff --git a/test/CodeGenCXX/threadsafe-statics.cpp b/test/CodeGenCXX/threadsafe-statics.cpp index 9e6550d094..9aecc2d0db 100644 --- a/test/CodeGenCXX/threadsafe-statics.cpp +++ b/test/CodeGenCXX/threadsafe-statics.cpp @@ -22,6 +22,6 @@ void g() { // NO-TSS-NOT: call void @__cxa_guard_release // NO-TSS: ret void -// WITH-TSS: attributes [[NUW]] = { nounwind } +// WITH-TSS: attributes [[NUW]] = { nounwind{{.*}} } -// NO-TSS: attributes [[NUW]] = { nounwind } +// NO-TSS: attributes [[NUW]] = { nounwind{{.*}} } |