summaryrefslogtreecommitdiff
path: root/lib/Basic/Module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic/Module.cpp')
-rw-r--r--lib/Basic/Module.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Basic/Module.cpp b/lib/Basic/Module.cpp
index f689c733d9..65c8b1b581 100644
--- a/lib/Basic/Module.cpp
+++ b/lib/Basic/Module.cpp
@@ -25,8 +25,8 @@
using namespace clang;
Module::Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent,
- const FileEntry *File, bool IsFramework, bool IsExplicit)
- : Name(Name), DefinitionLoc(DefinitionLoc), Parent(Parent), ModuleMap(File),
+ bool IsFramework, bool IsExplicit)
+ : Name(Name), DefinitionLoc(DefinitionLoc), Parent(Parent),
Umbrella(), ASTFile(nullptr), IsMissingRequirement(false),
IsAvailable(true), IsFromModuleFile(false), IsFramework(IsFramework),
IsExplicit(IsExplicit), IsSystem(false), IsExternC(false),
@@ -361,7 +361,11 @@ void Module::print(raw_ostream &OS, unsigned Indent) const {
for (submodule_const_iterator MI = submodule_begin(), MIEnd = submodule_end();
MI != MIEnd; ++MI)
- if (!(*MI)->IsInferred)
+ // Print inferred subframework modules so that we don't need to re-infer
+ // them (requires expensive directory iteration + stat calls) when we build
+ // the module. Regular inferred submodules are OK, as we need to look at all
+ // those header files anyway.
+ if (!(*MI)->IsInferred || (*MI)->IsFramework)
(*MI)->print(OS, Indent + 2);
for (unsigned I = 0, N = Exports.size(); I != N; ++I) {