From 4b36fb83c13a0aa2fd7e6e9200f70208791be2b3 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Mon, 19 Aug 2013 18:32:59 +0000 Subject: [PATCH] clang-cl: Expose the -Xclang option git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188685 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Options.td | 2 +- test/Driver/cl-options.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index c72622d842..d8d2cd3730 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -264,7 +264,7 @@ def Xassembler : Separate<["-"], "Xassembler">, HelpText<"Pass to the assembler">, MetaVarName<"">; def Xclang : Separate<["-"], "Xclang">, HelpText<"Pass to the clang compiler">, MetaVarName<"">, - Flags<[DriverOption]>; + Flags<[DriverOption, CoreOption]>; def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>, HelpText<"Pass to the linker">, MetaVarName<"">; def Xpreprocessor : Separate<["-"], "Xpreprocessor">, diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 078794c00e..14c3c073cb 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -103,3 +103,9 @@ // 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" -- 2.50.1