diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Driver/Driver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 4698999cb77..d4c03130ba8 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1303,7 +1303,8 @@ Action *Driver::ConstructPhaseAction(const ArgList &Args, phases::ID Phase, } else { OutputTy = Input->getType(); if (!Args.hasFlag(options::OPT_frewrite_includes, - options::OPT_fno_rewrite_includes, false)) + options::OPT_fno_rewrite_includes, false) && + !CCGenDiagnostics) OutputTy = types::getPreprocessedType(OutputTy); assert(OutputTy != types::TY_INVALID && "Cannot preprocess this input type!"); |

