| Chad Rosier | a7afeb0 | 2012-08-21 16:16:06 +0000 | [diff] [blame] | 1 | // RUN: %clang -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=NOSSP |
| 2 | // NOSSP-NOT: "-stack-protector" "1" |
| 3 | // NOSSP-NOT: "-stack-protector-buffer-size" |
| 4 | |
| 5 | // RUN: %clang -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 -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" |
| Rafael Espindola | 9adba39 | 2013-06-05 04:28:55 +0000 | [diff] [blame^] | 12 | |
| 13 | // RUN: %clang -target i386-pc-openbsd -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD |
| 14 | // OPENBSD: "-stack-protector" "1" |
| 15 | |
| 16 | // RUN: %clang -target i386-pc-openbsd -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD_OFF |
| 17 | // OPENBSD_OFF-NOT: "-stack-protector" |