summaryrefslogtreecommitdiffstats
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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 9939ce1e315..b18ddd442db 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -428,7 +428,7 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
// FIXME: The code here assumes that /Yc and /Yu refer to the same file.
// cl.exe seems to support both flags with different values, but that
// seems strange (which flag does /Fp now refer to?), so don't implement
- // that until someone needs that.
+ // that until someone needs it.
int PchIndex = YcIndex != -1 ? YcIndex : YuIndex;
if (PchIndex != -1) {
if (isa<PrecompileJobAction>(JA)) {
@@ -438,8 +438,10 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
continue;
} else {
// When using the pch, skip all includes prior to the pch.
- if (AI < PchIndex)
+ if (AI < PchIndex) {
+ A->claim();
continue;
+ }
if (AI == PchIndex) {
A->claim();
CmdArgs.push_back("-include-pch");
OpenPOWER on IntegriCloud