mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Dependencies: Add new options to qualified lookup for known dependencies.
Specifically, a qualified lookup can now be treated as: - a known private dependency, which does not affect downstream files - a known non-private dependency, which may affect downstream files - a known non-dependency - unknown, which means the compiler will try to infer whether it's a private dependency from the context This commit also includes some obvious uses of the new flags, but nothing actually too interesting yet; there shouldn't be any observable behavior change here in normal user code. Swift SVN r23483
This commit is contained in:
@@ -1010,7 +1010,8 @@ void ModuleFile::getImportDecls(SmallVectorImpl<Decl *> &Results) {
|
||||
} else {
|
||||
SmallVector<ValueDecl *, 8> Decls;
|
||||
M->lookupQualified(ModuleType::get(M), ScopeID,
|
||||
NL_QualifiedDefault, nullptr, Decls);
|
||||
NL_QualifiedDefault | NL_KnownNoDependency,
|
||||
nullptr, Decls);
|
||||
Optional<ImportKind> FoundKind = ImportDecl::findBestImportKind(Decls);
|
||||
assert(FoundKind.hasValue() &&
|
||||
"deserialized imports should not be ambigous");
|
||||
|
||||
Reference in New Issue
Block a user