diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-07-21 18:07:47 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-07-21 18:07:47 +0000 |
commit | d520a250b6525be399c732871cdacbfcc335bbc5 (patch) | |
tree | 3c078b81efcb4b50d50befd15b0e8075bcc756ff /clang/lib/Lex/HeaderSearch.cpp | |
parent | bd05101e67f975ef4a42585b732ee03d135645d2 (diff) | |
download | llvm-d520a250b6525be399c732871cdacbfcc335bbc5.zip llvm-d520a250b6525be399c732871cdacbfcc335bbc5.tar.gz llvm-d520a250b6525be399c732871cdacbfcc335bbc5.tar.bz2 |
[modules] Produce an error if -cc1 wants to implicitly build a module and no
module cache has been provided, rather than creating one in the current
directory.
llvm-svn: 242819
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); |