mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -631,7 +631,7 @@ namespace {
|
||||
void visitTypeAliasDecl(TypeAliasDecl *TAD) {
|
||||
printCommon(TAD, "typealias");
|
||||
PrintWithColorRAII(OS, TypeColor) << " type='";
|
||||
if (auto underlying = TAD->getUnderlyingType()) {
|
||||
if (auto underlying = TAD->getCachedUnderlyingType()) {
|
||||
PrintWithColorRAII(OS, TypeColor)
|
||||
<< underlying.getString();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user