From 2a6edb30d9de28dea35dc3dcbce31f1c4ad394b9 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sun, 9 Aug 2015 04:46:57 +0000 Subject: [modules] When building a dependency file, include module maps parsed in the current compilation, not just those from imported modules. llvm-svn: 244413 --- clang/lib/Lex/ModuleMap.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Lex/ModuleMap.cpp') 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; } -- cgit v1.2.3