mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[AST] Remove SourceFile::addImports
Temporarily replace with `SourceFile::setImports` until import resolution is requestified. Now imports are only set once for a given SourceFile. Because we're now asserting in more places that import resolution must have run before querying imports, this commit also adds `getCachedUnderlyingType` to TypeAliasDecl to stop the ASTDumper from trying to query imports for a -dump-parse invocation.
This commit is contained in:
@@ -288,7 +288,7 @@ void swift::performImportResolution(SourceFile &SF) {
|
||||
for (auto D : SF.getTopLevelDecls())
|
||||
resolver.visit(D);
|
||||
|
||||
SF.addImports(resolver.getFinishedImports());
|
||||
SF.setImports(resolver.getFinishedImports());
|
||||
|
||||
SF.ASTStage = SourceFile::ImportsResolved;
|
||||
verify(SF);
|
||||
|
||||
Reference in New Issue
Block a user