aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/stack-protector.c
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 /test/CodeGen/stack-protector.c
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
Diffstat (limited to 'test/CodeGen/stack-protector.c')
-rw-r--r--test/CodeGen/stack-protector.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/CodeGen/stack-protector.c b/test/CodeGen/stack-protector.c
index 741fb75505..b4e20cd15d 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 @@ void test1(const char *msg) {
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 }