summaryrefslogtreecommitdiff
path: root/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-04-23 21:10:46 +0000
committerBen Langmuir <blangmuir@apple.com>2014-04-23 21:10:46 +0000
commit1cd8e7dad6c61280604722593ad3d36a017f7851 (patch)
treebb8137285611a51a746ae2bb75cdc39360deb2da /lib/Lex/ModuleMap.cpp
parentf035b1e0f6b37a2abe56ab36d2ac8683d845bf6a (diff)
downloadclang-1cd8e7dad6c61280604722593ad3d36a017f7851.tar.gz
clang-1cd8e7dad6c61280604722593ad3d36a017f7851.tar.bz2
clang-1cd8e7dad6c61280604722593ad3d36a017f7851.tar.xz
Do not print inferred submodules explicitly in __inferred_module.map
Otherwise including a header in your source file that is not included by framework's umbrella header will silently add an empty submodule with that name. is automatically translated to @import Foo.NotInModule; which then would have succeeded because the inferred module map contained an empty submodule called NotInModule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/ModuleMap.cpp')
-rw-r--r--lib/Lex/ModuleMap.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp
index 068e16d043..39c1121011 100644
--- a/lib/Lex/ModuleMap.cpp
+++ b/lib/Lex/ModuleMap.cpp
@@ -365,6 +365,7 @@ ModuleMap::findModuleForHeader(const FileEntry *File,
llvm::sys::path::stem(SkippedDirs[I-1]->getName()), NameBuf);
Result = findOrCreateModule(Name, Result, UmbrellaModule->ModuleMap,
/*IsFramework=*/false, Explicit).first;
+ Result->IsInferred = true;
// Associate the module and the directory.
UmbrellaDirs[SkippedDirs[I-1]] = Result;
@@ -381,6 +382,7 @@ ModuleMap::findModuleForHeader(const FileEntry *File,
llvm::sys::path::stem(File->getName()), NameBuf);
Result = findOrCreateModule(Name, Result, UmbrellaModule->ModuleMap,
/*IsFramework=*/false, Explicit).first;
+ Result->IsInferred = true;
Result->addTopHeader(File);
// If inferred submodules export everything they import, add a