]> granicus.if.org Git - clang/commitdiff
Update tests so that we don't test for function-only attributes on call sites.
authorBill Wendling <isanbard@gmail.com>
Fri, 22 Feb 2013 21:12:51 +0000 (21:12 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 22 Feb 2013 21:12:51 +0000 (21:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175921 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/function-attributes.c
test/CodeGen/ms-declspecs.c
test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
test/CodeGenCXX/debug-info-globalinit.cpp
test/CodeGenObjC/arc-no-arc-exceptions.m

index 1d1be90c7ab2f396f8b0fe1d8d9ef90f2808ffce..1398d344fb3b48aeb68f0c6bf11ab3c17793f8fd 100644 (file)
@@ -30,20 +30,20 @@ void f7(unsigned short x) { }
 void __attribute__((always_inline)) f8(void) { }
 
 // CHECK: call void @f9_t()
-// CHECK: #2
+// CHECK: [[F9:#[0-9]+]]
 // CHECK: }
 void __attribute__((noreturn)) f9_t(void);
 void f9(void) { f9_t(); }
 
 // CHECK: call void @f9a()
-// CHECK: #2
+// CHECK: [[F9]]
 // CHECK: }
 _Noreturn void f9a(void);
 void f9b(void) { f9a(); }
 
 // FIXME: We should be setting nounwind on calls.
 // CHECK: call i32 @f10_t()
-// CHECK: #0
+// CHECK: [[F10_T:#[0-9]+]]
 // CHECK: {
 int __attribute__((const)) f10_t(void);
 int f10(void) { return f10_t(); }
@@ -99,7 +99,7 @@ void __attribute__((force_align_arg_pointer)) f16(void) {
 // CHECK: #7
 // CHECK: {
 // CHECK: call void @f17()
-// CHECK: #7
+// CHECK: [[F17:#[0-9]+]]
 // CHECK: ret void
 __attribute__ ((returns_twice)) void f17(void);
 __attribute__ ((returns_twice)) void f18(void) {
@@ -109,7 +109,7 @@ __attribute__ ((returns_twice)) void f18(void) {
 // CHECK: define void @f19()
 // CHECK: {
 // CHECK: call i32 @setjmp(i32* null)
-// CHECK: #7
+// CHECK: [[F17]]
 // CHECK: ret void
 typedef int jmp_buf[((9 * 2) + 3 + 16)];
 int setjmp(jmp_buf);
@@ -126,3 +126,6 @@ void f19(void) {
 // CHECK: attributes #6 = { nounwind optsize readnone alignstack=16 "target-features"={{.*}} }
 // CHECK: attributes #7 = { nounwind optsize returns_twice "target-features"={{.*}} }
 // CHECK: attributes #8 = { optsize returns_twice "target-features"={{.*}}
+// CHECK: attributes [[F9]] = { noreturn nounwind optsize }
+// CHECK: attributes [[F10_T]] = { nounwind optsize readnone }
+// CHECK: attributes [[F17]] = { nounwind optsize returns_twice }
index fea2cf6747c4c4978a7f23c91eee917a82ab11be..c116fbec7aace70ace0f66b43fa822279e942da0 100644 (file)
@@ -25,4 +25,4 @@ void f20(void) { f20_t(); }
 // CHECK: attributes #0 = { naked noinline nounwind "target-features"={{.*}} }
 // CHECK: attributes #1 = { nounwind "target-features"={{.*}} }
 // CHECK: attributes #2 = { noinline nounwind "target-features"={{.*}} }
-// CHECK: attributes [[NR]] = { noreturn "target-features"={{.*}} }
+// CHECK: attributes [[NR]] = { noreturn }
index 06608d7fb126bba4c4ac3a2be02f6d0522bf2bf5..fc0d3f64c6aa79ec59f0094015b33db6053cc94c 100644 (file)
@@ -10,10 +10,12 @@ int f(void) {
   return c() + p() + t();
 }
 
-// CHECK: declare i32 @_Z1cv() [[NUW_RN]]
-// CHECK: declare i32 @_Z1pv() [[NUW_RO]]
+// CHECK: declare i32 @_Z1cv() #1
+// CHECK: declare i32 @_Z1pv() #2
 // CHECK: declare i32 @_Z1tv() #0
 
 // CHECK: attributes #0 = { "target-features"={{.*}} }
-// CHECK: attributes [[NUW_RN]] = { nounwind readnone "target-features"={{.*}} }
-// CHECK: attributes [[NUW_RO]] = { nounwind readonly "target-features"={{.*}} }
+// CHECK: attributes #1 = { nounwind readnone "target-features"={{.*}} }
+// CHECK: attributes #2 = { nounwind readonly "target-features"={{.*}} }
+// CHECK: attributes [[NUW_RN]] = { nounwind readnone }
+// CHECK: attributes [[NUW_RO]] = { nounwind readonly }
index 3cb31879f8e104bc665592365611dcb6e8c1e840..b3891c148e3e4495eb066558f37d31a80da283f1 100644 (file)
@@ -17,7 +17,7 @@ int main(void) {}
 
 // CHECK: define internal void @__cxx_global_var_init()
 // CHECK-NOT: __cxx_global_var_init
-// CHECK: %[[C0:.+]] = call i32 @_Z4testv() [[TF:#[0-9]+]], !dbg ![[LINE:.*]]
+// CHECK: %[[C0:.+]] = call i32 @_Z4testv(), !dbg ![[LINE:.*]]
 // CHECK-NOT: __cxx_global_var_init
 // CHECK: store i32 %[[C0]], i32* @_ZL1i, align 4, !dbg
 // 
@@ -27,6 +27,4 @@ int main(void) {}
 // CHECK-NOT: dbg
 // CHECK: store i32 %[[C1]], i32* @_ZL1j, align 4
 // 
-// CHECK: attributes [[TF]] = { "target-features"={{.*}} }
-// 
 // CHECK: ![[LINE]] = metadata !{i32 13, i32
index ad813cf204053889e869ffd15d5225518f20429f..008c848987e107f90f2cd9176bda718b7d3f34fd 100644 (file)
@@ -9,7 +9,7 @@ void thrower(void);
 void not(void) __attribute__((nothrow));
 
 // CHECK: define void @test0(
-// CHECK: call void @thrower() [[TF:#[0-9]+]], !clang.arc.no_objc_arc_exceptions !
+// CHECK: call void @thrower(), !clang.arc.no_objc_arc_exceptions !
 // CHECK: call void @not() [[NUW:#[0-9]+]], !clang.arc.no_objc_arc_exceptions !
 // NO-METADATA: define void @test0(
 // NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
@@ -20,7 +20,7 @@ void test0(void) {
 }
 
 // CHECK: define void @test1(
-// CHECK: call void @thrower() [[TF]], !clang.arc.no_objc_arc_exceptions !
+// CHECK: call void @thrower(), !clang.arc.no_objc_arc_exceptions !
 // CHECK: call void @not() [[NUW]], !clang.arc.no_objc_arc_exceptions !
 // NO-METADATA: define void @test1(
 // NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
@@ -77,4 +77,4 @@ void test4(void) {
     }
 }
 
-// CHECK: attributes [[NUW]] = { nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { nounwind }