Update tests so that we don't test for function-only attributes on call sites.

llvm-svn: 175921
This commit is contained in:
Bill Wendling
2013-02-22 21:12:51 +00:00
parent 02b0e48f6a
commit 19457e282e
5 changed files with 19 additions and 16 deletions

View 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 }

View 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 }

View 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 }

View 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

View 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 }