aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/stack-protector.c
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-08-21 16:16:06 +0000
committerChad Rosier <mcrosier@apple.com>2012-08-21 16:16:06 +0000
commita7afeb040416c0eaac19b92db914913a788044f5 (patch)
tree4baf595ec629f9c340df9055ec6641ba21121653 /test/Driver/stack-protector.c
parent05c5ebc9bafe5613204eefb59a47ab878e4fbd0b (diff)
[driver] Add support for the --param ssp-buffer-size= driver option.
PR9673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/stack-protector.c')
-rw-r--r--test/Driver/stack-protector.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Driver/stack-protector.c b/test/Driver/stack-protector.c
new file mode 100644
index 0000000000..5f3d679c1a
--- /dev/null
+++ b/test/Driver/stack-protector.c
@@ -0,0 +1,11 @@
+// RUN: %clang -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=NOSSP
+// NOSSP-NOT: "-stack-protector" "1"
+// NOSSP-NOT: "-stack-protector-buffer-size"
+
+// RUN: %clang -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP
+// SSP: "-stack-protector" "1"
+// SSP-NOT: "-stack-protector-buffer-size"
+
+// RUN: %clang -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-BUF
+// SSP-BUF: "-stack-protector" "1"
+// SSP-BUF: "-stack-protector-buffer-size" "16"