summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/cl.c
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-07-27 00:23:45 +0000
committerHans Wennborg <hans@hanshq.net>2013-07-27 00:23:45 +0000
commit6ddc6901ef18ee4463cb4981d3a520ce3f8e2c36 (patch)
tree80b8822e9c06afc9fa83c6ab1563bf9e5aaeec53 /clang/test/Driver/cl.c
parent568cb2783345a972dabb7290ff38db8e522d0ec7 (diff)
downloadbcm5719-llvm-6ddc6901ef18ee4463cb4981d3a520ce3f8e2c36.tar.gz
bcm5719-llvm-6ddc6901ef18ee4463cb4981d3a520ce3f8e2c36.zip
clang-cl: add support for the /? and /help options
This establishes a new Flag in Options.td, which can be assigned to options that should be made available in clang's cl.exe compatible mode, and updates the Driver to make use of the flag. (The whitespace change to CMakeLists forces the build to re-run CMake and pick up the include dependency on the new .td file. This makes the build work if someone moves backwards in commit history after this change.) Differential Revision: http://llvm-reviews.chandlerc.com/D1215 llvm-svn: 187280
Diffstat (limited to 'clang/test/Driver/cl.c')
-rw-r--r--clang/test/Driver/cl.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/clang/test/Driver/cl.c b/clang/test/Driver/cl.c
index c5273135e94..c141c2f8c0f 100644
--- a/clang/test/Driver/cl.c
+++ b/clang/test/Driver/cl.c
@@ -1,3 +1,21 @@
-// RUN: %clang_cl -fsyntax-only -c %s
+// Check that clang-cl options are not available by default.
+// RUN: %clang -help | FileCheck %s -check-prefix=DEFAULT
+// DEFAULT-NOT: CL.EXE COMPATIBILITY OPTIONS
+// DEFAULT-NOT: {{/[?]}}
+// DEFAULT-NOT: /help
+// RUN: not %clang /?
+// RUN: not %clang -?
+// RUN: not %clang /help
-void f();
+// Check that /? and /help are available as clang-cl options.
+// RUN: %clang_cl /? | FileCheck %s -check-prefix=CL
+// RUN: %clang_cl /help | FileCheck %s -check-prefix=CL
+// RUN: %clang_cl -help | FileCheck %s -check-prefix=CL
+// CL: CL.EXE COMPATIBILITY OPTIONS
+// CL: {{/[?]}}
+// CL: /help
+
+// Options which are not "core" clang options nor cl.exe compatible options
+// are not available in clang-cl.
+// DEFAULT: -fapple-kext
+// CL-NOT: -fapple-kext
OpenPOWER on IntegriCloud