@@ -156,30 +156,35 @@ struct ScannerImportStatementInfo {
156156 uint32_t columnNumber;
157157 };
158158
159- ScannerImportStatementInfo (std::string importIdentifier, bool isExported)
160- : importLocations(), importIdentifier(importIdentifier),
161- isExported(isExported) {}
159+ ScannerImportStatementInfo (std::string importIdentifier, bool isExported,
160+ AccessLevel accessLevel)
161+ : importIdentifier(importIdentifier), importLocations(),
162+ isExported(isExported), accessLevel(accessLevel) {}
162163
163164 ScannerImportStatementInfo (std::string importIdentifier, bool isExported,
165+ AccessLevel accessLevel,
164166 ImportDiagnosticLocationInfo location)
165- : importLocations({location} ), importIdentifier(importIdentifier ),
166- isExported(isExported) {}
167+ : importIdentifier(importIdentifier ), importLocations({location} ),
168+ isExported(isExported), accessLevel(accessLevel) {}
167169
168170 ScannerImportStatementInfo (std::string importIdentifier, bool isExported,
171+ AccessLevel accessLevel,
169172 SmallVector<ImportDiagnosticLocationInfo, 4 > locations)
170- : importLocations(locations ), importIdentifier(importIdentifier ),
171- isExported(isExported) {}
173+ : importIdentifier(importIdentifier ), importLocations(locations ),
174+ isExported(isExported), accessLevel(accessLevel) {}
172175
173176 void addImportLocation (ImportDiagnosticLocationInfo location) {
174177 importLocations.push_back (location);
175178 }
176179
177- // / Buffer, line & column number of the import statement
178- SmallVector<ImportDiagnosticLocationInfo, 4 > importLocations;
179180 // / Imported module string. e.g. "Foo.Bar" in 'import Foo.Bar'
180181 std::string importIdentifier;
182+ // / Buffer, line & column number of the import statement
183+ SmallVector<ImportDiagnosticLocationInfo, 4 > importLocations;
181184 // / Is this an @_exported import
182185 bool isExported;
186+ // / Access level of this dependency
187+ AccessLevel accessLevel;
183188};
184189
185190// / Base class for the variant storage of ModuleDependencyInfo.
@@ -942,6 +947,7 @@ class ModuleDependencyInfo {
942947 // / Add a dependency on the given module, if it was not already in the set.
943948 void
944949 addOptionalModuleImport (StringRef module , bool isExported,
950+ AccessLevel accessLevel,
945951 llvm::StringSet<> *alreadyAddedModules = nullptr );
946952
947953 // / Add all of the module imports in the given source
@@ -952,12 +958,14 @@ class ModuleDependencyInfo {
952958
953959 // / Add a dependency on the given module, if it was not already in the set.
954960 void addModuleImport (ImportPath::Module module , bool isExported,
961+ AccessLevel accessLevel,
955962 llvm::StringSet<> *alreadyAddedModules = nullptr ,
956963 const SourceManager *sourceManager = nullptr ,
957964 SourceLoc sourceLocation = SourceLoc());
958965
959966 // / Add a dependency on the given module, if it was not already in the set.
960967 void addModuleImport (StringRef module , bool isExported,
968+ AccessLevel accessLevel,
961969 llvm::StringSet<> *alreadyAddedModules = nullptr ,
962970 const SourceManager *sourceManager = nullptr ,
963971 SourceLoc sourceLocation = SourceLoc());
0 commit comments