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
diff --git a/test/CodeGen/stack-protector.c b/test/CodeGen/stack-protector.c
index 741fb75..b4e20cd 100644
--- a/test/CodeGen/stack-protector.c
+++ b/test/CodeGen/stack-protector.c
@@ -1,9 +1,9 @@
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 0 | FileCheck -check-prefix=NOSSP %s
-// NOSSP: define void @test1(i8* %msg) nounwind {{.*}}{
+// NOSSP: define void @test1(i8* %msg) #0 {
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 1 | FileCheck -check-prefix=WITHSSP %s
-// WITHSSP: define void @test1(i8* %msg) nounwind ssp {{.*}}{
+// WITHSSP: define void @test1(i8* %msg) #0 {
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPREQ %s
-// SSPREQ: define void @test1(i8* %msg) nounwind sspreq {{.*}}{
+// SSPREQ: define void @test1(i8* %msg) #0 {
typedef __SIZE_TYPE__ size_t;
@@ -16,3 +16,15 @@
strcpy(a, msg);
printf("%s\n", a);
}
+
+// NOSSP: attributes #0 = { nounwind "target-features"={{.*}} }
+// NOSSP: attributes #1 = { "target-features"={{.*}} }
+// NOSSP: attributes #2 = { nounwind }
+
+// WITHSSP: attributes #0 = { nounwind ssp "target-features"={{.*}} }
+// WITHSSP: attributes #1 = { "target-features"={{.*}} }
+// WITHSSP: attributes #2 = { nounwind }
+
+// SSPREQ: attributes #0 = { nounwind sspreq "target-features"={{.*}} }
+// SSPREQ: attributes #1 = { "target-features"={{.*}} }
+// SSPREQ: attributes #2 = { nounwind }