Swift: Mangle AssociatedTypeDecl.

This commit is contained in:
Alexandre Boulgakov
2023-06-28 13:09:09 +01:00
parent b807d005ec
commit 30615308b4
2 changed files with 5 additions and 0 deletions

View File

@@ -141,6 +141,10 @@ SwiftMangledName SwiftMangler::visitGenericTypeParamDecl(const swift::GenericTyp
return visitValueDecl(decl, /*force=*/true) << '_' << decl->getDepth() << '_' << decl->getIndex();
}
SwiftMangledName SwiftMangler::visitAssociatedTypeDecl(const swift::AssociatedTypeDecl* decl) {
return visitValueDecl(decl, /*force=*/true);
}
SwiftMangledName SwiftMangler::visitModuleType(const swift::ModuleType* type) {
return initMangled(type) << fetch(type->getModule());
}

View File

@@ -62,6 +62,7 @@ class SwiftMangler : private swift::TypeVisitor<SwiftMangler, SwiftMangledName>,
SwiftMangledName visitSubscriptDecl(const swift::SubscriptDecl* decl);
SwiftMangledName visitVarDecl(const swift::VarDecl* decl);
SwiftMangledName visitGenericTypeParamDecl(const swift::GenericTypeParamDecl* decl);
SwiftMangledName visitAssociatedTypeDecl(const swift::AssociatedTypeDecl* decl);
// default fallback for non mangled types. This covers types that should not appear in normal
// successful extractor runs, like ErrorType