aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index b7981c0..824ee72 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