diff options
Diffstat (limited to 'test/CodeGen/stack-protector.c')
-rw-r--r-- | test/CodeGen/stack-protector.c | 18 |
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 } |