Swift: Work around assertion failures in mangler

This commit is contained in:
Jeroen Ketema
2025-09-25 13:02:24 +02:00
parent 4d9827ff77
commit 06d0d48416
5 changed files with 49 additions and 12 deletions

View File

@@ -170,7 +170,7 @@ static std::unordered_set<swift::ModuleDecl*> extractDeclarations(
bodyEmissionStrategy);
auto topLevelDecls = getTopLevelDecls(module, primaryFile, lazyDeclaration);
for (auto decl : topLevelDecls) {
if (decl->isUnavailable()) {
if (decl->isUnavailable() && !llvm::isa<swift::NominalTypeDecl>(decl)) {
continue;
}
visitor.extract(decl);