Fix the clang-wpa example.
[clang.git] / test / CodeGen / stack-protector.c
blobeb4cea211779c5a34696f73f38b6bbc2eb0c5be1
1 // RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 0 | FileCheck -check-prefix=NOSSP %s
2 // NOSSP: define void @test1(i8* %msg) nounwind {
3 // RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 1 | FileCheck -check-prefix=WITHSSP %s
4 // WITHSSP: define void @test1(i8* %msg) nounwind ssp {
5 // RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPREQ %s
6 // SSPREQ: define void @test1(i8* %msg) nounwind sspreq {
8 int printf(const char * _Format, ...);
10 void test1(const char *msg) {
11 char a[strlen(msg) + 1];
12 strcpy(a, msg);
13 printf("%s\n", a);