1 // RUN: %clang -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=NOSSP
2 // NOSSP-NOT: "-stack-protector"
3 // NOSSP-NOT: "-stack-protector-buffer-size"
4 
5 // RUN: %clang -target i386-unknown-linux -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP
6 // SSP: "-stack-protector" "1"
7 // SSP-NOT: "-stack-protector-buffer-size"
8 
9 // RUN: %clang -target i386-unknown-linux -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-BUF
10 // SSP-BUF: "-stack-protector" "1"
11 // SSP-BUF: "-stack-protector-buffer-size" "16"
12 
13 // RUN: %clang -target i386-pc-openbsd -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD
14 // OPENBSD: "-stack-protector" "2"
15 
16 // RUN: %clang -target i386-pc-openbsd -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD_SPS
17 // OPENBSD_SPS: "-stack-protector" "2"
18 
19 // RUN: %clang -fstack-protector-strong -### %s 2>&1 | FileCheck %s -check-prefix=SSP-STRONG
20 // SSP-STRONG: "-stack-protector" "2"
21 // SSP-STRONG-NOT: "-stack-protector-buffer-size"
22 
23 // RUN: %clang -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SSP-ALL
24 // SSP-ALL: "-stack-protector" "3"
25 // SSP-ALL-NOT: "-stack-protector-buffer-size"
26