aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-22 21:12:51 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-22 21:12:51 +0000
commit5bb033ba5de8f00cea93b061427de92569b45d2d (patch)
tree00ef9ca4287195e1ba3ec1da39c3f4573af8759a
parentefc5b6713e51726ced594bc566d3291ffbf22ae2 (diff)
Update tests so that we don't test for function-only attributes on call sites.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175921 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/function-attributes.c13
-rw-r--r--test/CodeGen/ms-declspecs.c2
-rw-r--r--test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp10
-rw-r--r--test/CodeGenCXX/debug-info-globalinit.cpp4
-rw-r--r--test/CodeGenObjC/arc-no-arc-exceptions.m6
5 files changed, 19 insertions, 16 deletions
diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c
index 1d1be90c7a..1398d344fb 100644
--- a/test/CodeGen/function-attributes.c
+++ b/test/CodeGen/function-attributes.c
@@ -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 }
diff --git a/test/CodeGen/ms-declspecs.c b/test/CodeGen/ms-declspecs.c
index fea2cf6747..c116fbec7a 100644
--- a/test/CodeGen/ms-declspecs.c
+++ b/test/CodeGen/ms-declspecs.c
@@ -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 }
diff --git a/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp b/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
index 06608d7fb1..fc0d3f64c6 100644
--- a/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
+++ b/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
@@ -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 }
diff --git a/test/CodeGenCXX/debug-info-globalinit.cpp b/test/CodeGenCXX/debug-info-globalinit.cpp
index 3cb31879f8..b3891c148e 100644
--- a/test/CodeGenCXX/debug-info-globalinit.cpp
+++ b/test/CodeGenCXX/debug-info-globalinit.cpp
@@ -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
diff --git a/test/CodeGenObjC/arc-no-arc-exceptions.m b/test/CodeGenObjC/arc-no-arc-exceptions.m
index ad813cf204..008c848987 100644
--- a/test/CodeGenObjC/arc-no-arc-exceptions.m
+++ b/test/CodeGenObjC/arc-no-arc-exceptions.m
@@ -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 }