Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 0 | FileCheck -check-prefix=NOSSP %s |
Daniel Dunbar | 9e5cc6b | 2009-11-17 08:07:36 +0000 | [diff] [blame] | 2 | // NOSSP: define void @test1(i8* %msg) nounwind { |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 3 | // RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 1 | FileCheck -check-prefix=WITHSSP %s |
Daniel Dunbar | 9e5cc6b | 2009-11-17 08:07:36 +0000 | [diff] [blame] | 4 | // WITHSSP: define void @test1(i8* %msg) nounwind ssp { |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 5 | // RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPREQ %s |
Daniel Dunbar | 9e5cc6b | 2009-11-17 08:07:36 +0000 | [diff] [blame] | 6 | // SSPREQ: define void @test1(i8* %msg) nounwind sspreq { |
Bill Wendling | 45483f7 | 2009-06-28 07:36:13 +0000 | [diff] [blame] | 7 | |
Mike Stump | 76bee4b | 2009-10-08 23:05:06 +0000 | [diff] [blame] | 8 | int printf(const char * _Format, ...); |
Bill Wendling | 45483f7 | 2009-06-28 07:36:13 +0000 | [diff] [blame] | 9 | |
| 10 | void test1(const char *msg) { |
| 11 | char a[strlen(msg) + 1]; |
| 12 | strcpy(a, msg); |
| 13 | printf("%s\n", a); |
| 14 | } |