aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-05-10 22:52:27 +0000
committerDouglas Gregor <dgregor@apple.com>2013-05-10 22:52:27 +0000
commit64a1fa5cdaab414c06ef8ca7bd851ade5a34dae6 (patch)
treeab67cde467c81b31f9cd69df6e9178d1ab92f67c /clang/lib/Lex/ModuleMap.cpp
parent783c79446b96d712da9f0bcaaba82481a36b7712 (diff)
downloadllvm-64a1fa5cdaab414c06ef8ca7bd851ade5a34dae6.zip
llvm-64a1fa5cdaab414c06ef8ca7bd851ade5a34dae6.tar.gz
llvm-64a1fa5cdaab414c06ef8ca7bd851ade5a34dae6.tar.bz2
[Modules] Make r180934 more efficient by only loading top-level module maps in system header directories.
llvm-svn: 181643
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r--clang/lib/Lex/ModuleMap.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index de23485..62b1fc7 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -183,8 +183,7 @@ Module *ModuleMap::findModuleForHeader(const FileEntry *File) {
// specific module (e.g., in /usr/include).
if (File->getDir() == BuiltinIncludeDir &&
isBuiltinHeader(llvm::sys::path::filename(File->getName()))) {
- SmallVector<Module *, 4> AllModules;
- HeaderInfo.collectAllModules(AllModules);
+ HeaderInfo.loadTopLevelSystemModules();
// Check again.
Known = Headers.find(File);