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