From 30a16f1383b56cb71be251999a577b2e37db2ce0 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 10 May 2013 22:52:27 +0000 Subject: [Modules] Make r180934 more efficient by only loading top-level module maps in system header directories. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181643 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/ModuleMap.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/Lex/ModuleMap.cpp') diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp index de234853fb..62b1fc73c8 100644 --- a/lib/Lex/ModuleMap.cpp +++ b/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 AllModules; - HeaderInfo.collectAllModules(AllModules); + HeaderInfo.loadTopLevelSystemModules(); // Check again. Known = Headers.find(File); -- cgit v1.2.3