diff options
| -rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 1c5b3222304..3492bf184d3 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -329,7 +329,8 @@ void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) {    PP->setPreprocessedOutput(getPreprocessorOutputOpts().ShowCPP); -  PP->getHeaderSearchInfo().setModuleCachePath(getSpecificModuleCachePath()); +  if (PP->getLangOpts().Modules) +    PP->getHeaderSearchInfo().setModuleCachePath(getSpecificModuleCachePath());    // Handle generating dependencies, if requested.    const DependencyOutputOptions &DepOpts = getDependencyOutputOpts();  | 

