summaryrefslogtreecommitdiff
path: root/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-03-07 06:40:32 +0000
committerBen Langmuir <blangmuir@apple.com>2014-03-07 06:40:32 +0000
commit9f36327e3df8d2a4e89109b86eb610d84a13b4b9 (patch)
tree850d8f7a8f7ffbc1ab18cf3be7357efb5a740d48 /lib/Lex/ModuleMap.cpp
parent760c6c756172cb1671d1fc5203e99781914591e3 (diff)
downloadclang-9f36327e3df8d2a4e89109b86eb610d84a13b4b9.tar.gz
clang-9f36327e3df8d2a4e89109b86eb610d84a13b4b9.tar.bz2
clang-9f36327e3df8d2a4e89109b86eb610d84a13b4b9.tar.xz
Add dependencies from imported modules with -MD
Add module dependencies to the dependency files created by -MD/-MMD/etc. by attaching an ASTReaderListener that will call into the dependency file generator when a module input file is seen in the serialized AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/ModuleMap.cpp')
-rw-r--r--lib/Lex/ModuleMap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp
index 14bc3baba6..beb0bcbbd3 100644
--- a/lib/Lex/ModuleMap.cpp
+++ b/lib/Lex/ModuleMap.cpp
@@ -2213,7 +2213,8 @@ bool ModuleMap::parseModuleMapFile(const FileEntry *File, bool IsSystem) {
return Known->second;
assert(Target != 0 && "Missing target information");
- FileID ID = SourceMgr.createFileID(File, SourceLocation(), SrcMgr::C_User);
+ auto FileCharacter = IsSystem ? SrcMgr::C_System : SrcMgr::C_User;
+ FileID ID = SourceMgr.createFileID(File, SourceLocation(), FileCharacter);
const llvm::MemoryBuffer *Buffer = SourceMgr.getBuffer(ID);
if (!Buffer)
return ParsedModuleMap[File] = true;