aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-20 07:22:19 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-20 07:22:19 +0000
commitf7a9da053f5bd6c18450c1796d953b42c3b7ad3a (patch)
tree3a4accecdb98419478035c3bf5be57df768e0625
parent5251abea41b446c26e3239c8dd6c7edea6fc335d (diff)
Modify the tests to use attribute group references instead of listing the
function attributes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175606 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CXX/special/class.dtor/p3-0x.cpp9
-rw-r--r--test/CodeGen/2008-04-08-NoExceptions.c7
-rw-r--r--test/CodeGen/address-safety-attr.cpp37
-rw-r--r--test/CodeGen/address-space-field1.c4
-rw-r--r--test/CodeGen/alias.c16
-rw-r--r--test/CodeGen/attr-coldhot.c4
-rw-r--r--test/CodeGen/attr-minsize.cpp33
-rw-r--r--test/CodeGen/attr-naked.c6
-rw-r--r--test/CodeGen/attributes.c24
-rw-r--r--test/CodeGen/code-coverage.c11
-rw-r--r--test/CodeGen/function-attributes.c37
-rw-r--r--test/CodeGen/incomplete-function-type-2.c4
-rw-r--r--test/CodeGen/libcall-declarations.c209
-rw-r--r--test/CodeGen/libcalls.c81
-rw-r--r--test/CodeGen/mips-vector-arg.c13
-rw-r--r--test/CodeGen/mrtd.c5
-rw-r--r--test/CodeGen/ms-declspecs.c14
-rw-r--r--test/CodeGen/ppc64-complex-parms.c34
-rw-r--r--test/CodeGen/ppc64-complex-return.c34
-rw-r--r--test/CodeGen/ppc64-extend.c9
-rw-r--r--test/CodeGen/pragma-weak.c11
-rw-r--r--test/CodeGen/stack-protector.c18
-rw-r--r--test/CodeGen/struct-passing.c8
-rw-r--r--test/CodeGen/unwind-attr.c18
-rw-r--r--test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp10
-rw-r--r--test/CodeGenCXX/attr.cpp15
-rw-r--r--test/CodeGenCXX/cxx11-exception-spec.cpp72
-rw-r--r--test/CodeGenCXX/cxx11-noreturn.cpp6
-rw-r--r--test/CodeGenCXX/default-destructor-synthesis.cpp4
-rw-r--r--test/CodeGenCXX/derived-to-base.cpp7
-rw-r--r--test/CodeGenCXX/dynamic-cast.cpp6
-rw-r--r--test/CodeGenCXX/exceptions.cpp7
-rw-r--r--test/CodeGenCXX/global-dtor-no-atexit.cpp12
-rw-r--r--test/CodeGenCXX/global-init.cpp13
-rw-r--r--test/CodeGenCXX/member-initializers.cpp5
-rw-r--r--test/CodeGenCXX/microsoft-abi-array-cookies.cpp5
-rw-r--r--test/CodeGenCXX/microsoft-abi-static-initializers.cpp11
-rw-r--r--test/CodeGenCXX/no-exceptions.cpp5
-rw-r--r--test/CodeGenCXX/noinline-template.cpp5
-rw-r--r--test/CodeGenCXX/pointers-to-data-members.cpp9
-rw-r--r--test/CodeGenCXX/reference-cast.cpp5
-rw-r--r--test/CodeGenCXX/threadsafe-statics.cpp11
-rw-r--r--test/CodeGenCXX/thunks.cpp7
-rw-r--r--test/CodeGenCXX/typeid.cpp3
-rw-r--r--test/CodeGenCXX/virtual-base-cast.cpp8
-rw-r--r--test/CodeGenObjC/arc.m13
-rw-r--r--test/CodeGenObjC/gnu-exceptions.m5
-rw-r--r--test/CodeGenObjC/nonlazy-msgSend.m7
-rw-r--r--test/CodeGenObjC/objc-literal-debugger-test.m5
-rw-r--r--test/CodeGenObjC/objc-literal-tests.m6
-rw-r--r--test/CodeGenObjCXX/address-safety-attr.mm13
-rw-r--r--test/CodeGenObjCXX/lambda-expressions.mm13
-rw-r--r--test/Driver/darwin-iphone-defaults.m4
-rw-r--r--test/PCH/objc_container.m5
54 files changed, 584 insertions, 359 deletions
diff --git a/test/CXX/special/class.dtor/p3-0x.cpp b/test/CXX/special/class.dtor/p3-0x.cpp
index 291353a823..1006d00c77 100644
--- a/test/CXX/special/class.dtor/p3-0x.cpp
+++ b/test/CXX/special/class.dtor/p3-0x.cpp
@@ -164,14 +164,19 @@ void tsw() {
Sw<int> swi;
Sw<B> swb;
}
-// CHECK-NOT: define linkonce_odr {{.*}} @_ZN2SwI1BED1Ev({{.*}} nounwind
+// CHECK-NOT: define linkonce_odr {{.*}} @_ZN2SwI1BED1Ev({{.*}} #2
// CHECK: define linkonce_odr {{.*}} @_ZN2SwI1BED1Ev({{.*}}
// CHECK: _ZTIi
// CHECK: __cxa_call_unexpected
-// CHECK: define linkonce_odr {{.*}} @_ZN2SwIiED1Ev({{.*}} nounwind
+// CHECK: define linkonce_odr {{.*}} @_ZN2SwIiED1Ev({{.*}} #2
template <typename T>
struct TVC : VX
{ virtual ~TVC(); };
template <typename T>
TVC<T>::~TVC() {}
+
+// CHECK: attributes #0 = { "target-features"="-sse4a,-avx2,-xop,-fma4,-bmi2,-3dnow,-3dnowa,-pclmul,+sse,-avx,-sse41,-ssse3,+mmx,-rtm,-sse42,-lzcnt,-f16c,-popcnt,-bmi,-aes,-fma,-rdrand,+sse2,-sse3" }
+// CHECK: attributes #1 = { noinline noreturn nounwind }
+// CHECK: attributes #2 = { nounwind "target-features"="-sse4a,-avx2,-xop,-fma4,-bmi2,-3dnow,-3dnowa,-pclmul,+sse,-avx,-sse41,-ssse3,+mmx,-rtm,-sse42,-lzcnt,-f16c,-popcnt,-bmi,-aes,-fma,-rdrand,+sse2,-sse3" }
+// CHECK: attributes #3 = { inlinehint nounwind "target-features"="-sse4a,-avx2,-xop,-fma4,-bmi2,-3dnow,-3dnowa,-pclmul,+sse,-avx,-sse41,-ssse3,+mmx,-rtm,-sse42,-lzcnt,-f16c,-popcnt,-bmi,-aes,-fma,-rdrand,+sse2,-sse3" }
diff --git a/test/CodeGen/2008-04-08-NoExceptions.c b/test/CodeGen/2008-04-08-NoExceptions.c
index ab2781b58b..7d533b7a3a 100644
--- a/test/CodeGen/2008-04-08-NoExceptions.c
+++ b/test/CodeGen/2008-04-08-NoExceptions.c
@@ -2,9 +2,12 @@
void f(void);
void g(void) {
- // CHECK: define void @g() nounwind
+ // CHECK: define void @g() #0
// CHECK-NOT: call void @f() nounwind
f();
}
-// CHECK-NOT: declare void @f() nounwind
+// CHECK-NOT: declare void @f() #0
+
+// CHECK: attributes #0 = { nounwind {{.*}} }
+// CHECK: attributes #1 = { "target-features"={{.*}} }
diff --git a/test/CodeGen/address-safety-attr.cpp b/test/CodeGen/address-safety-attr.cpp
index d6832a46d7..aedbbc2bcb 100644
--- a/test/CodeGen/address-safety-attr.cpp
+++ b/test/CodeGen/address-safety-attr.cpp
@@ -10,31 +10,31 @@
// when AddressSanitizer is enabled, unless no_address_safety_analysis attribute
// is present.
-// CHECK-NOT: NoAddressSafety1{{.*}} address_safety
-// ASAN-NOT: NoAddressSafety1{{.*}} address_safety
+// CHECK: NoAddressSafety1{{.*}}#0
+// ASAN: NoAddressSafety1{{.*}}#0
__attribute__((no_address_safety_analysis))
int NoAddressSafety1(int *a) { return *a; }
-// CHECK-NOT: NoAddressSafety2{{.*}} address_safety
-// ASAN-NOT: NoAddressSafety2{{.*}} address_safety
+// CHECK: NoAddressSafety2{{.*}}#0
+// ASAN: NoAddressSafety2{{.*}}#0
__attribute__((no_address_safety_analysis))
int NoAddressSafety2(int *a);
int NoAddressSafety2(int *a) { return *a; }
-// CHECK-NOT: AddressSafetyOk{{.*}} address_safety
-// ASAN: AddressSafetyOk{{.*}} address_safety
+// CHECK: AddressSafetyOk{{.*}}#0
+// ASAN: AddressSafetyOk{{.*}}#1
int AddressSafetyOk(int *a) { return *a; }
-// CHECK-NOT: TemplateNoAddressSafety{{.*}} address_safety
-// ASAN-NOT: TemplateNoAddressSafety{{.*}} address_safety
+// CHECK: TemplateAddressSafetyOk{{.*}}#0
+// ASAN: TemplateAddressSafetyOk{{.*}}#1
template<int i>
-__attribute__((no_address_safety_analysis))
-int TemplateNoAddressSafety() { return i; }
+int TemplateAddressSafetyOk() { return i; }
-// CHECK-NOT: TemplateAddressSafetyOk{{.*}} address_safety
-// ASAN: TemplateAddressSafetyOk{{.*}} address_safety
+// CHECK: TemplateNoAddressSafety{{.*}}#0
+// ASAN: TemplateNoAddressSafety{{.*}}#0
template<int i>
-int TemplateAddressSafetyOk() { return i; }
+__attribute__((no_address_safety_analysis))
+int TemplateNoAddressSafety() { return i; }
int force_instance = TemplateAddressSafetyOk<42>()
+ TemplateNoAddressSafety<42>();
@@ -42,5 +42,12 @@ int force_instance = TemplateAddressSafetyOk<42>()
// Check that __cxx_global_var_init* get the address_safety attribute.
int global1 = 0;
int global2 = *(int*)((char*)&global1+1);
-// CHECK-NOT: @__cxx_global_var_init{{.*}}address_safety
-// ASAN: @__cxx_global_var_init{{.*}}address_safety
+// CHECK: @__cxx_global_var_init{{.*}}#1
+// ASAN: @__cxx_global_var_init{{.*}}#2
+
+// CHECK: attributes #0 = { nounwind "target-features"={{.*}} }
+// CHECK: attributes #1 = { nounwind }
+
+// ASAN: attributes #0 = { nounwind "target-features"={{.*}} }
+// ASAN: attributes #1 = { address_safety nounwind "target-features"={{.*}} }
+// ASAN: attributes #2 = { address_safety nounwind }
diff --git a/test/CodeGen/address-space-field1.c b/test/CodeGen/address-space-field1.c
index e9c18712f2..9f23b24aca 100644
--- a/test/CodeGen/address-space-field1.c
+++ b/test/CodeGen/address-space-field1.c
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 < %s -o - | FileCheck %s
// CHECK:%struct.S = type { i32, i32 }
-// CHECK:define void @test_addrspace(%struct.S addrspace(1)* %p1, %struct.S addrspace(2)* %p2) nounwind
+// CHECK:define void @test_addrspace(%struct.S addrspace(1)* %p1, %struct.S addrspace(2)* %p2) #0
// CHECK: [[p1addr:%.*]] = alloca %struct.S addrspace(1)*
// CHECK: [[p2addr:%.*]] = alloca %struct.S addrspace(2)*
// CHECK: store %struct.S addrspace(1)* %p1, %struct.S addrspace(1)** [[p1addr]]
@@ -36,3 +36,5 @@ void test_addrspace(__addr1 S* p1, __addr2 S*p2) {
p1->a = p2->b;
p1->b = p2->a;
}
+
+// CHECK: attributes #0 = { nounwind "target-features"={{.*}} }
diff --git a/test/CodeGen/alias.c b/test/CodeGen/alias.c
index b90bcc25d8..113b26def2 100644
--- a/test/CodeGen/alias.c
+++ b/test/CodeGen/alias.c
@@ -14,7 +14,7 @@ void f0(void) { }
extern void f1(void);
extern void f1(void) __attribute((alias("f0")));
// CHECKBASIC: @f1 = alias void ()* @f0
-// CHECKBASIC: define void @f0() nounwind{{.*}} {
+// CHECKBASIC: define void @f0() #0 {
// Make sure that aliases cause referenced values to be emitted.
// PR3200
@@ -34,13 +34,19 @@ static int inner_weak(int a) { return 0; }
extern __typeof(inner) inner_a __attribute__((alias("inner")));
static __typeof(inner_weak) inner_weak_a __attribute__((weakref, alias("inner_weak")));
// CHECKCC: @inner_a = alias i32 (i32)* @inner
-// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner(i32 %a) nounwind {
+// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner(i32 %a) #0 {
int outer(int a) { return inner(a); }
-// CHECKCC: define arm_aapcs_vfpcc i32 @outer(i32 %a) nounwind {
+// CHECKCC: define arm_aapcs_vfpcc i32 @outer(i32 %a) #0 {
// CHECKCC: call arm_aapcs_vfpcc i32 @inner(i32 %{{.*}})
int outer_weak(int a) { return inner_weak_a(a); }
-// CHECKCC: define arm_aapcs_vfpcc i32 @outer_weak(i32 %a) nounwind {
+// CHECKCC: define arm_aapcs_vfpcc i32 @outer_weak(i32 %a) #0 {
// CHECKCC: call arm_aapcs_vfpcc i32 @inner_weak(i32 %{{.*}})
-// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner_weak(i32 %a) nounwind{{.*}} {
+// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner_weak(i32 %a) #0 {
+
+// CHECKBASIC: attributes #0 = { nounwind "target-features"={{.*}} }
+// CHECKBASIC: attributes #1 = { inlinehint nounwind "target-features"={{.*}} }
+
+// CHECKCC: attributes #0 = { nounwind }
+// CHECKCC: attributes #1 = { inlinehint nounwind }
diff --git a/test/CodeGen/attr-coldhot.c b/test/CodeGen/attr-coldhot.c
index b9bb299b5e..f553b136eb 100644
--- a/test/CodeGen/attr-coldhot.c
+++ b/test/CodeGen/attr-coldhot.c
@@ -4,6 +4,8 @@ int test1() __attribute__((__cold__)) {
return 42;
// Check that we set the optsize attribute on the function.
-// CHECK: @test1{{.*}}optsize
+// CHECK: @test1{{.*}}#0
// CHECK: ret
}
+
+// CHECK: attributes #0 = { nounwind optsize "target-features"={{.*}} }
diff --git a/test/CodeGen/attr-minsize.cpp b/test/CodeGen/attr-minsize.cpp
index 1b63dd472e..5611916f59 100644
--- a/test/CodeGen/attr-minsize.cpp
+++ b/test/CodeGen/attr-minsize.cpp
@@ -9,27 +9,27 @@
int test1() {
return 42;
-// Oz: @{{.*}}test1{{.*}}minsize
+// Oz: @{{.*}}test1{{.*}}#0
// Oz: ret
// OTHER: @{{.*}}test1
-// OTHER-NOT: minsize
+// OTHER-NOT: #1
// OTHER: ret
}
int test2() {
return 42;
-// Oz: @{{.*}}test2{{.*}}minsize
+// Oz: @{{.*}}test2{{.*}}#0
// Oz: ret
// OTHER: @{{.*}}test2
-// OTHER-NOT: minsize
+// OTHER-NOT: #1
// OTHER: ret
}
__attribute__((minsize))
int test3() {
return 42;
-// Oz: @{{.*}}test3{{.*}}minsize
-// OTHER: @{{.*}}test3{{.*}}minsize
+// Oz: @{{.*}}test3{{.*}}#0
+// OTHER: @{{.*}}test3{{.*}}#1
}
// Check that the minsize attribute is well propagated through
@@ -44,16 +44,16 @@ void test4(T arg) {
template
void test4<int>(int arg);
// Oz: define{{.*}}void @{{.*}}test4
-// Oz: minsize
+// Oz: #0
// OTHER: define{{.*}}void @{{.*}}test4
-// OTHER: minsize
+// OTHER: #1
template
void test4<float>(float arg);
// Oz: define{{.*}}void @{{.*}}test4
-// Oz: minsize
+// Oz: #0
// OTHER: define{{.*}}void @{{.*}}test4
-// OTHER: minsize
+// OTHER: #1
template<typename T>
void test5(T arg) {
@@ -63,13 +63,18 @@ void test5(T arg) {
template
void test5<int>(int arg);
// Oz: define{{.*}}void @{{.*}}test5
-// Oz: minsize
+// Oz: #0
// OTHER: define{{.*}}void @{{.*}}test5
-// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}minsize
+// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}#1
template
void test5<float>(float arg);
// Oz: define{{.*}}void @{{.*}}test5
-// Oz: minsize
+// Oz: #0
// OTHER: define{{.*}}void @{{.*}}test5
-// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}minsize
+// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}#1
+
+// Oz: attributes #0 = { minsize nounwind optsize readnone "target-features"={{.*}} }
+
+// OTHER: attributes #0 = { nounwind {{.*}}"target-features"={{.*}} }
+// OTHER: attributes #1 = { minsize nounwind {{.*}}"target-features"={{.*}} }
diff --git a/test/CodeGen/attr-naked.c b/test/CodeGen/attr-naked.c
index a77e1eed95..8490d463a2 100644
--- a/test/CodeGen/attr-naked.c
+++ b/test/CodeGen/attr-naked.c
@@ -4,13 +4,15 @@ void t1() __attribute__((naked));
// Basic functionality check
// (Note that naked needs to imply noinline to work properly.)
-// CHECK: define void @t1() naked noinline nounwind {{.*}} {
+// CHECK: define void @t1() #0 {
void t1()
{
}
// Make sure this doesn't explode in the verifier.
// (It doesn't really make sense, but it isn't invalid.)
-// CHECK: define void @t2() naked noinline nounwind {{.*}} {
+// CHECK: define void @t2() #0 {
__attribute((naked, always_inline)) void t2() {
}
+
+// CHECK: attributes #0 = { naked noinline nounwind "target-features"={{.*}} }
diff --git a/test/CodeGen/attributes.c b/test/CodeGen/attributes.c
index e21e768649..49746ba523 100644
--- a/test/CodeGen/attributes.c
+++ b/test/CodeGen/attributes.c
@@ -36,39 +36,39 @@ int t17() {
return t15() + t16;
}
-// CHECK: define void @t1() noreturn nounwind {{.*}} {
+// CHECK: define void @t1() #2 {
void t1() __attribute__((noreturn));
void t1() { while (1) {} }
-// CHECK: define void @t2() nounwind {{.*}} {
+// CHECK: define void @t2() #0 {
void t2() __attribute__((nothrow));
void t2() {}
-// CHECK: define weak void @t3() nounwind {{.*}} {
+// CHECK: define weak void @t3() #0 {
void t3() __attribute__((weak));
void t3() {}
-// CHECK: define hidden void @t4() nounwind {{.*}} {
+// CHECK: define hidden void @t4() #0 {
void t4() __attribute__((visibility("hidden")));
void t4() {}
-// CHECK: define void @t7() noreturn nounwind {{.*}} {
+// CHECK: define void @t7() #2 {
void t7() __attribute__((noreturn, nothrow));
void t7() { while (1) {} }
-// CHECK: define void @t10() nounwind {{.*}} section "SECT" {
+// CHECK: define void @t10() #0 section "SECT" {
void t10(void) __attribute__((section("SECT")));
void t10(void) {}
-// CHECK: define void @t11() nounwind {{.*}} section "SECT" {
+// CHECK: define void @t11() #0 section "SECT" {
void __attribute__((section("SECT"))) t11(void) {}
-// CHECK: define i32 @t19() nounwind {{.*}} {
+// CHECK: define i32 @t19() #0 {
extern int t19(void) __attribute__((weak_import));
int t19(void) {
return 10;
}
-// CHECK:define void @t20() nounwind {{.*}} {
+// CHECK:define void @t20() #0 {
// CHECK: call void @abort()
// CHECK-NEXT: unreachable
void t20(void) {
@@ -88,4 +88,8 @@ void t21(void) {
void __attribute__((section(".foo"))) t22(void);
void __attribute__((section(".bar"))) t22(void) {}
-// CHECK: define void @t22() nounwind {{.*}} section ".bar"
+// CHECK: define void @t22() #0 section ".bar"
+
+// CHECK: attributes #0 = { nounwind "target-features"={{.*}} }
+// CHECK: attributes #1 = { "target-features"={{.*}} }
+// CHECK: attributes #2 = { noreturn nounwind "target-features"={{.*}} }
diff --git a/test/CodeGen/code-coverage.c b/test/CodeGen/code-coverage.c
index eacebbddb2..3c9392d1c5 100644
--- a/test/CodeGen/code-coverage.c
+++ b/test/CodeGen/code-coverage.c
@@ -14,7 +14,10 @@ int test1(int a) {
// Check that the noredzone flag is set on the generated functions.
-// CHECK: void @__llvm_gcov_indirect_counter_increment(i32* %{{.*}}, i64** %{{.*}}) unnamed_addr noinline noredzone
-// CHECK: void @__llvm_gcov_writeout() unnamed_addr noinline noredzone
-// CHECK: void @__llvm_gcov_init() unnamed_addr noinline noredzone
-// CHECK: void @__gcov_flush() unnamed_addr noinline noredzone
+// CHECK: void @__llvm_gcov_indirect_counter_increment(i32* %{{.*}}, i64** %{{.*}}) unnamed_addr #1
+// CHECK: void @__llvm_gcov_writeout() unnamed_addr #1
+// CHECK: void @__llvm_gcov_init() unnamed_addr #1
+// CHECK: void @__gcov_flush() unnamed_addr #1
+
+// CHECK: attributes #0 = { noredzone nounwind "target-features"={{.*}} }
+// CHECK: attributes #1 = { noinline noredzone }
diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c
index ab3447641d..1d685c2465 100644
--- a/test/CodeGen/function-attributes.c
+++ b/test/CodeGen/function-attributes.c
@@ -1,12 +1,12 @@
// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -Os -o - %s | FileCheck %s
-// CHECK: define signext i8 @f0(i32 %x) nounwind
-// CHECK: define zeroext i8 @f1(i32 %x) nounwind
-// CHECK: define void @f2(i8 signext %x) nounwind
-// CHECK: define void @f3(i8 zeroext %x) nounwind
-// CHECK: define signext i16 @f4(i32 %x) nounwind
-// CHECK: define zeroext i16 @f5(i32 %x) nounwind
-// CHECK: define void @f6(i16 signext %x) nounwind
-// CHECK: define void @f7(i16 zeroext %x) nounwind
+// CHECK: define signext i8 @f0(i32 %x) #0
+// CHECK: define zeroext i8 @f1(i32 %x) #0
+// CHECK: define void @f2(i8 signext %x) #0
+// CHECK: define void @f3(i8 zeroext %x) #0
+// CHECK: define signext i16 @f4(i32 %x) #0
+// CHECK: define zeroext i16 @f5(i32 %x) #0
+// CHECK: define void @f6(i16 signext %x) #0
+// CHECK: define void @f7(i16 zeroext %x) #0
signed char f0(int x) { return x; }
@@ -25,8 +25,7 @@ void f6(signed short x) { }
void f7(unsigned short x) { }
// CHECK: define void @f8()
-// CHECK: alwaysinline
-// CHECK: nounwind
+// CHECK: #1
// CHECK: {
void __attribute__((always_inline)) f8(void) { }
@@ -56,7 +55,7 @@ int f12(int arg) {
return arg ? 0 : f10_t();
}
-// CHECK: define void @f13() nounwind optsize readnone
+// CHECK: define void @f13() #0
void f13(void) __attribute__((pure)) __attribute__((const));
void f13(void){}
@@ -83,21 +82,21 @@ void f14(int a) {
// <rdar://problem/7102668> [irgen] clang isn't setting the optsize bit on functions
// CHECK: define void @f15
-// CHECK: optsize
+// CHECK: #0
// CHECK: {
void f15(void) {
}
// PR5254
// CHECK: define void @f16
-// CHECK: alignstack(16)
+// CHECK: #6
// CHECK: {
void __attribute__((force_align_arg_pointer)) f16(void) {
}
// PR11038
// CHECK: define void @f18()
-// CHECK: returns_twice
+// CHECK: #7
// CHECK: {
// CHECK: call void @f17()
// CHECK: returns_twice
@@ -117,3 +116,13 @@ int setjmp(jmp_buf);
void f19(void) {
setjmp(0);
}
+
+// CHECK: attributes #0 = { nounwind optsize readnone "target-features"={{.*}} }
+// CHECK: attributes #1 = { alwaysinline nounwind optsize readnone "target-features"={{.*}} }
+// CHECK: attributes #2 = { noreturn nounwind optsize "target-features"={{.*}} }
+// CHECK: attributes #3 = { noreturn optsize "target-features"={{.*}} }
+// CHECK: attributes #4 = { nounwind optsize "target-features"={{.*}} }
+// CHECK: attributes #5 = { optsize "target-features"={{.*}} }
+// 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"={{.*}}
diff --git a/test/CodeGen/incomplete-function-type-2.c b/test/CodeGen/incomplete-function-type-2.c
index 16c1d9b2a9..b696f77765 100644
--- a/test/CodeGen/incomplete-function-type-2.c
+++ b/test/CodeGen/incomplete-function-type-2.c
@@ -2,7 +2,7 @@
// PR14355: don't crash
// Keep this test in its own file because CodeGenTypes has global state.
-// CHECK: define void @test10_foo({}* %p1.coerce) nounwind {{.*}} {
+// CHECK: define void @test10_foo({}* %p1.coerce) #0 {
struct test10_B;
typedef struct test10_B test10_F3(double);
void test10_foo(test10_F3 p1);
@@ -15,3 +15,5 @@ void test10_foo(test10_F3 p1)
{
p1(0.0);
}
+
+// CHECK: attributes #0 = { nounwind "target-features"={{.*}} }
diff --git a/test/CodeGen/libcall-declarations.c b/test/CodeGen/libcall-declarations.c
index 4517643e4c..c24839a7ee 100644
--- a/test/CodeGen/libcall-declarations.c
+++ b/test/CodeGen/libcall-declarations.c
@@ -86,106 +86,111 @@ void *use[] = {
sqrtf, tan, tanl, tanf, trunc, truncl, truncf
};
-// CHECK-NOERRNO: declare double @acos(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @acosl(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @acosf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @asin(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @asinl(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @asinf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @atan(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @atanl(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @atanf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @atan2(double, double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @atan2l(x86_fp80, x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @atan2f(float, float) nounwind readnone
-// CHECK-NOERRNO: declare double @ceil(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @ceill(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @ceilf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @copysign(double, double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @copysignl(x86_fp80, x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @copysignf(float, float) nounwind readnone
-// CHECK-NOERRNO: declare double @cos(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @cosl(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @cosf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @exp(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @expl(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @expf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @exp2(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @exp2l(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @exp2f(float) nounwind readnone
-// CHECK-NOERRNO: declare double @fabs(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @fabsl(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @fabsf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @floor(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @floorl(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @floorf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @fma(double, double, double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @fmal(x86_fp80, x86_fp80, x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @fmaf(float, float, float) nounwind readnone
-// CHECK-NOERRNO: declare double @fmax(double, double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @fmaxl(x86_fp80, x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @fmaxf(float, float) nounwind readnone
-// CHECK-NOERRNO: declare double @fmin(double, double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @fminl(x86_fp80, x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @fminf(float, float) nounwind readnone
-// CHECK-NOERRNO: declare double @log(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @logl(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @logf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @log2(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @log2l(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @log2f(float) nounwind readnone
-// CHECK-NOERRNO: declare double @nearbyint(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @nearbyintl(x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @nearbyintf(float) nounwind readnone
-// CHECK-NOERRNO: declare double @pow(double, double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @powl(x86_fp80, x86_fp80) nounwind readnone
-// CHECK-NOERRNO: declare float @powf(float, float) nounwind readnone
-// CHECK-NOERRNO: declare double @rint(double) nounwind readnone
-// CHECK-NOERRNO: declare x86_fp80 @rintl(x86_fp80) nounwind readnone
-// CHECK-