diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-02-08 21:27:45 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-02-08 21:27:45 +0000 |
commit | dadd85dc0c84e183f6c2fc1af86a5c77c3feb3db (patch) | |
tree | 81ffb1ec27faca0e5f7f29a1a55ea11184dcb622 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | dd2721842df7d972e75b308a1af47de889e96f6f (diff) | |
download | bcm5719-llvm-dadd85dc0c84e183f6c2fc1af86a5c77c3feb3db.tar.gz bcm5719-llvm-dadd85dc0c84e183f6c2fc1af86a5c77c3feb3db.zip |
Never cache the result of a module file lookup.
llvm-svn: 174744
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 0c5a1fa70aa..ce6572aa1be 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -996,7 +996,8 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, BuildingModule = true; compileModule(*this, ModuleNameLoc, Module, ModuleFileName); - ModuleFile = FileMgr->getFile(ModuleFileName); + ModuleFile = FileMgr->getFile(ModuleFileName, /*OpenFile=*/false, + /*CacheFailure=*/false); if (!ModuleFile && getPreprocessorOpts().FailedModules) getPreprocessorOpts().FailedModules->addFailed(ModuleName); @@ -1079,14 +1080,14 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, << ModuleName << SourceRange(ImportLoc, ModuleNameLoc); ModuleBuildFailed = true; - return ModuleLoadResult(); } compileModule(*this, ModuleNameLoc, Module, ModuleFileName); // Try loading the module again. - ModuleFile = FileMgr->getFile(ModuleFileName); + ModuleFile = FileMgr->getFile(ModuleFileName, /*OpenFile=*/false, + /*CacheFailure=*/false); if (!ModuleFile || ModuleManager->ReadAST(ModuleFileName, serialization::MK_Module, ImportLoc, |