aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-13 21:13:43 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-13 21:13:43 +0000
commit3c5305c15ed6dd0413a83675d482263e125f18ac (patch)
tree07d4ef68b8edd6009cc9df4791428e67f92fd893 /clang/lib/Lex/ModuleMap.cpp
parent6b72269b3dd8978816a12080b4314317801f7d70 (diff)
downloadllvm-3c5305c15ed6dd0413a83675d482263e125f18ac.zip
llvm-3c5305c15ed6dd0413a83675d482263e125f18ac.tar.gz
llvm-3c5305c15ed6dd0413a83675d482263e125f18ac.tar.bz2
[Modules] Resolve top-headers of modules lazily.
This allows resolving top-header filenames of modules to FileEntries when we need them, not eagerly. Note that that this breaks ABI for libclang functions clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders but this is fine because they are experimental and not widely used yet. llvm-svn: 176975
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r--clang/lib/Lex/ModuleMap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 81cb94d..f9b4e2c 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -202,7 +202,7 @@ Module *ModuleMap::findModuleForHeader(const FileEntry *File) {
llvm::sys::path::stem(File->getName()), NameBuf);
Result = findOrCreateModule(Name, Result, /*IsFramework=*/false,
Explicit).first;
- Result->TopHeaders.insert(File);
+ Result->addTopHeader(File);
// If inferred submodules export everything they import, add a
// wildcard to the set of exports.