Browse Source

Fixed a regression causing a crash as some functions with no symbols are allowed to reach code generation.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/43/head
Dimitar Dobrev 12 years ago
parent
commit
43d01854a2
  1. 7
      src/Generator/Passes/FindSymbolsPass.cs

7
src/Generator/Passes/FindSymbolsPass.cs

@ -6,15 +6,12 @@ namespace CppSharp.Passes @@ -6,15 +6,12 @@ namespace CppSharp.Passes
{
public override bool VisitDeclaration(Declaration decl)
{
var mangledDecl = decl as IMangledDecl;
if (mangledDecl == null)
return false;
var options = Driver.Options;
if (!options.CheckSymbols || options.IsCLIGenerator)
return false;
if (!VisitMangledDeclaration(mangledDecl))
var mangledDecl = decl as IMangledDecl;
if (mangledDecl != null && !VisitMangledDeclaration(mangledDecl))
{
decl.ExplicityIgnored = true;
return false;

Loading…
Cancel
Save