clang-cl: Expose the -Xclang option
authorHans Wennborg <hans@hanshq.net>
Mon, 19 Aug 2013 18:32:59 +0000 (18:32 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 19 Aug 2013 18:32:59 +0000 (18:32 +0000)
llvm-svn: 188685

clang/include/clang/Driver/Options.td
clang/test/Driver/cl-options.c

index c72622d..d8d2cd3 100644 (file)
@@ -264,7 +264,7 @@ def Xassembler : Separate<["-"], "Xassembler">,
   HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">;
 def Xclang : Separate<["-"], "Xclang">,
   HelpText<"Pass <arg> to the clang compiler">, MetaVarName<"<arg>">,
-  Flags<[DriverOption]>;
+  Flags<[DriverOption, CoreOption]>;
 def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
   HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">;
 def Xpreprocessor : Separate<["-"], "Xpreprocessor">,
index 078794c..14c3c07 100644 (file)
 // RUN: %clang_cl /Zs /Gm /Gm- /GS /Gy /Gy- /GZ -- %s 2>&1
 // RUN: %clang_cl /Zs /RTC1 /wfoo /Zc:wchar_t- -- %s 2>&1
 // RUN: %clang_cl /Zs /ZI /Zi -- %s 2>&1
+
+
+// We support -Xclang for forwarding options to cc1.
+// RUN: %clang_cl -Xclang hellocc1 -### -- %s 2>&1 | FileCheck -check-prefix=Xclang %s
+// Xclang: "-cc1"
+// Xclang: "hellocc1"