Skip to content

Commit ba31570

Browse files
committed
Eliminate generated symbols for ignored functions
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 8459cab commit ba31570

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Generator/Driver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ public void SetupPasses(ILibrary library)
225225

226226
if (Options.IsCSharpGenerator)
227227
{
228-
TranslationUnitPasses.AddPass(new GenerateSymbolsPass());
229228
TranslationUnitPasses.AddPass(new TrimSpecializationsPass());
229+
TranslationUnitPasses.AddPass(new GenerateSymbolsPass());
230230
TranslationUnitPasses.AddPass(new CheckIgnoredDeclsPass());
231231
}
232232

src/Generator/Passes/CheckIgnoredDecls.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ public override bool VisitDeclaration(Declaration decl)
9393
Diagnostics.Debug("Decl '{0}' was ignored due to invalid access",
9494
decl.Name);
9595
decl.GenerationKind = decl is Field ? GenerationKind.Internal : GenerationKind.None;
96-
return true;
9796
}
9897

9998
return true;
@@ -524,6 +523,10 @@ private bool IsDeclIgnored(Declaration decl)
524523
return typeMap.IsIgnored;
525524
}
526525

526+
if (decl.Ignore)
527+
return true;
528+
529+
decl.Visit(this);
527530
return decl.Ignore;
528531
}
529532

0 commit comments

Comments
 (0)