diff options
author | Jordan Rose <jordan_rose@apple.com> | 2018-04-20 17:16:04 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2018-04-20 17:16:04 +0000 |
commit | b55a60fc58fee669587a69c7ada747e88cc59c14 (patch) | |
tree | d534bdee6da522900a636d6c03c2898ab8ce619b /lib/Basic/Module.cpp | |
parent | 052902970a47baaef8ff1732b0e10bcd0433ae8a (diff) |
Record whether a module came from a private module map
Right now we only use this information in one place, immediately after
we calculate it, but it's still nice information to have. The Swift
project is going to use this to tidy up its "API notes" feature (see
past discussion on cfe-dev that never quite converged).
Reviewed by Bruno Cardoso Lopes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Module.cpp')
-rw-r--r-- | lib/Basic/Module.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Basic/Module.cpp b/lib/Basic/Module.cpp index c990b27941..bf85157746 100644 --- a/lib/Basic/Module.cpp +++ b/lib/Basic/Module.cpp @@ -44,7 +44,8 @@ Module::Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent, IsSystem(false), IsExternC(false), IsInferred(false), InferSubmodules(false), InferExplicitSubmodules(false), InferExportWildcard(false), ConfigMacrosExhaustive(false), - NoUndeclaredIncludes(false), NameVisibility(Hidden) { + NoUndeclaredIncludes(false), ModuleMapIsPrivate(false), + NameVisibility(Hidden) { if (Parent) { if (!Parent->isAvailable()) IsAvailable = false; @@ -54,6 +55,8 @@ Module::Module(StringRef Name, SourceLocation DefinitionLoc, Module *Parent, IsExternC = true; if (Parent->NoUndeclaredIncludes) NoUndeclaredIncludes = true; + if (Parent->ModuleMapIsPrivate) + ModuleMapIsPrivate = true; IsMissingRequirement = Parent->IsMissingRequirement; Parent->SubModuleIndex[Name] = Parent->SubModules.size(); |