From d8ff0eedbb95b11f58f053994d8fc0ead3da9088 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 2 Apr 2016 19:10:07 +0000 Subject: clang-cl: Don't skip i_group flags other than -include when building pchs. Before this change, e.g. -isystem flags in front of the /FI corresponding to the pch file would be incorrectly ignored. llvm-svn: 265238 --- clang/lib/Driver/Tools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Driver/Tools.cpp') diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index b7981c045e3..824ee72dcd2 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -416,7 +416,8 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, for (const Arg *A : Args.filtered(options::OPT_clang_i_Group)) { ++AI; - if (getToolChain().getDriver().IsCLMode()) { + if (getToolChain().getDriver().IsCLMode() && + A->getOption().matches(options::OPT_include)) { // In clang-cl mode, /Ycfoo.h means that all code up to a foo.h // include is compiled into foo.h, and everything after goes into // the .obj file. /Yufoo.h means that all includes prior to and including -- cgit v1.2.3