summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/debug-options.c
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-11-04 19:28:44 +0000
committerChad Rosier <mcrosier@apple.com>2011-11-04 19:28:44 +0000
commitc2bf338d35cfccc64451b0921028c2353e8c7015 (patch)
tree7e9f3bcad77b069b97a1c9a9e8ee71b2cd07370f /clang/test/Driver/debug-options.c
parent4a2eab0dac2fe8d9a940283de8c4eecc8204647b (diff)
downloadbcm5719-llvm-c2bf338d35cfccc64451b0921028c2353e8c7015.tar.gz
bcm5719-llvm-c2bf338d35cfccc64451b0921028c2353e8c7015.zip
[driver] Don't blindly accept all -g options.
rdar://10383444 llvm-svn: 143732
Diffstat (limited to 'clang/test/Driver/debug-options.c')
-rw-r--r--clang/test/Driver/debug-options.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c
new file mode 100644
index 00000000000..867251971d2
--- /dev/null
+++ b/clang/test/Driver/debug-options.c
@@ -0,0 +1,19 @@
+// Check to make sure clang is somewhat picky about -g options.
+// rdar://10383444
+
+// RUN: %clang -### -c -g %s 2>&1 | FileCheck -check-prefix=G %s
+// RUN: %clang -### -c -g3 %s 2>&1 | FileCheck -check-prefix=G3 %s
+// RUN: %clang -### -c -ganything %s 2>&1 | FileCheck -check-prefix=GANY %s
+// RUN: %clang -### -c -gfoo %s 2>&1 | FileCheck -check-prefix=GFOO %s
+//
+// G: "-cc1"
+// G: "-g"
+//
+// G3: "-cc1"
+// G3: "-g"
+//
+// GANY: "-cc1"
+// GANY-NOT: "-g"
+//
+// GFOO: "-cc1"
+// GFOO-NOT: "-g"
OpenPOWER on IntegriCloud