aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-03-28 01:10:44 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-03-28 01:10:44 +0000
commitff8d943cb8dd059ce1b62dbdef8b209d6d51d454 (patch)
tree64b76c94236027e20eca128254df5ae270e2fef9 /clang/lib/Frontend/CompilerInstance.cpp
parentaedd1117e97fd142147cc7d00e813de334979704 (diff)
downloadllvm-ff8d943cb8dd059ce1b62dbdef8b209d6d51d454.zip
llvm-ff8d943cb8dd059ce1b62dbdef8b209d6d51d454.tar.gz
llvm-ff8d943cb8dd059ce1b62dbdef8b209d6d51d454.tar.bz2
[Modules] Don't compute a modules cache path if we're not using modules!
Notably, this prevents us from doing *tons* of work to compute the modules hash, including trying to read a darwin specific plist file off of the system. There is a lot that needs cleaning up below this layer too. llvm-svn: 233462
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 1c5b322..3492bf1 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();