Browse Source

Eliminate generated symbols for ignored functions

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1261/head
Dimitar Dobrev 6 years ago
parent
commit
ba315702ea
  1. 2
      src/Generator/Driver.cs
  2. 5
      src/Generator/Passes/CheckIgnoredDecls.cs

2
src/Generator/Driver.cs

@ -225,8 +225,8 @@ namespace CppSharp
if (Options.IsCSharpGenerator) if (Options.IsCSharpGenerator)
{ {
TranslationUnitPasses.AddPass(new GenerateSymbolsPass());
TranslationUnitPasses.AddPass(new TrimSpecializationsPass()); TranslationUnitPasses.AddPass(new TrimSpecializationsPass());
TranslationUnitPasses.AddPass(new GenerateSymbolsPass());
TranslationUnitPasses.AddPass(new CheckIgnoredDeclsPass()); TranslationUnitPasses.AddPass(new CheckIgnoredDeclsPass());
} }

5
src/Generator/Passes/CheckIgnoredDecls.cs

@ -93,7 +93,6 @@ namespace CppSharp.Passes
Diagnostics.Debug("Decl '{0}' was ignored due to invalid access", Diagnostics.Debug("Decl '{0}' was ignored due to invalid access",
decl.Name); decl.Name);
decl.GenerationKind = decl is Field ? GenerationKind.Internal : GenerationKind.None; decl.GenerationKind = decl is Field ? GenerationKind.Internal : GenerationKind.None;
return true;
} }
return true; return true;
@ -524,6 +523,10 @@ namespace CppSharp.Passes
return typeMap.IsIgnored; return typeMap.IsIgnored;
} }
if (decl.Ignore)
return true;
decl.Visit(this);
return decl.Ignore; return decl.Ignore;
} }

Loading…
Cancel
Save