Skip to content

Commit 17f5686

Browse files
committed
Also visit auxiliary declarations of top-level decls
1 parent 88b76b2 commit 17f5686

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/SIL/IR/SILSymbolVisitor.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,13 @@ class SILSymbolVisitorImpl : public ASTVisitor<SILSymbolVisitorImpl> {
395395
addMainIfNecessary(file);
396396

397397
for (auto D : decls) {
398+
D->visitAuxiliaryDecls([&](Decl *decl) {
399+
if (Ctx.getOpts().LinkerDirectivesOnly && !requiresLinkerDirective(decl))
400+
return;
401+
402+
visit(decl);
403+
});
404+
398405
if (Ctx.getOpts().LinkerDirectivesOnly && !requiresLinkerDirective(D))
399406
continue;
400407

0 commit comments

Comments
 (0)