diff options
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index 983dc18..5282e8d 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -127,8 +127,9 @@ std::string HeaderSearch::getModuleFileName(Module *Module) { std::string HeaderSearch::getModuleFileName(StringRef ModuleName, StringRef ModuleMapPath) { - // If we don't have a module cache path, we can't do anything. - if (ModuleCachePath.empty()) + // If we don't have a module cache path or aren't supposed to use one, we + // can't do anything. + if (ModuleCachePath.empty() || !LangOpts.ImplicitModules) return std::string(); SmallString<256> Result(ModuleCachePath); |