diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-09 04:46:57 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-08-09 04:46:57 +0000 |
commit | 2a6edb30d9de28dea35dc3dcbce31f1c4ad394b9 (patch) | |
tree | 2a8d238f19f2e771ec7d176bc976d22cfc8d5475 /clang/lib/Lex/ModuleMap.cpp | |
parent | 2d7fbbc7be6c78370d2d7cc37fe7a8277ac0ff10 (diff) | |
download | bcm5719-llvm-2a6edb30d9de28dea35dc3dcbce31f1c4ad394b9.tar.gz bcm5719-llvm-2a6edb30d9de28dea35dc3dcbce31f1c4ad394b9.zip |
[modules] When building a dependency file, include module maps parsed in the
current compilation, not just those from imported modules.
llvm-svn: 244413
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r-- | clang/lib/Lex/ModuleMap.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 96d3e4b8fe6..995e1370ede 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -2335,9 +2335,14 @@ bool ModuleMap::parseModuleMapFile(const FileEntry *File, bool IsSystem, // Parse this module map file. Lexer L(ID, SourceMgr.getBuffer(ID), SourceMgr, MMapLangOpts); + SourceLocation Start = L.getSourceLocation(); ModuleMapParser Parser(L, SourceMgr, Target, Diags, *this, File, Dir, BuiltinIncludeDir, IsSystem); bool Result = Parser.parseModuleMapFile(); ParsedModuleMap[File] = Result; + + // Notify callbacks that we parsed it. + for (const auto &Cb : Callbacks) + Cb->moduleMapFileRead(Start, *File, IsSystem); return Result; } |