diff options
| author | Tom Stellard <tstellar@redhat.com> | 2018-10-25 20:41:01 +0000 |
|---|---|---|
| committer | Tom Stellard <tstellar@redhat.com> | 2018-10-25 20:41:01 +0000 |
| commit | 1696eef2ac42bb2b8183f8912caa5c1bb51e3a37 (patch) | |
| tree | 1ea1f9ae9e619e897f19f239b10832ac9ad37b0c /clang/lib/Driver | |
| parent | ccf7f5115ee8af18c287d6396542f02ad2329a6f (diff) | |
| download | bcm5719-llvm-1696eef2ac42bb2b8183f8912caa5c1bb51e3a37.tar.gz bcm5719-llvm-1696eef2ac42bb2b8183f8912caa5c1bb51e3a37.zip | |
Merging r340025:
------------------------------------------------------------------------
r340025 | erichkeane | 2018-08-17 06:43:39 -0700 (Fri, 17 Aug 2018) | 8 lines
Fix for bug 38508 - Don't do PCH processing when only generating preprocessor output
This clang-cl driver change removes the PCH options when we are only generating
preprocessed output. This is similar to the behavior of Y-.
Patch by: mikerice
Differential Revision: https://reviews.llvm.org/D50640
------------------------------------------------------------------------
llvm-svn: 345311
Diffstat (limited to 'clang/lib/Driver')
| -rw-r--r-- | clang/lib/Driver/Driver.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 952a716cb6e..b69d65ea907 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -2998,9 +2998,10 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args, Args.eraseArg(options::OPT__SLASH_Yc); YcArg = nullptr; } - if (Args.hasArg(options::OPT__SLASH_Y_)) { - // /Y- disables all pch handling. Rather than check for it everywhere, - // just remove clang-cl pch-related flags here. + if (FinalPhase == phases::Preprocess || Args.hasArg(options::OPT__SLASH_Y_)) { + // If only preprocessing or /Y- is used, all pch handling is disabled. + // Rather than check for it everywhere, just remove clang-cl pch-related + // flags here. Args.eraseArg(options::OPT__SLASH_Fp); Args.eraseArg(options::OPT__SLASH_Yc); Args.eraseArg(options::OPT__SLASH_Yu); |

