Browse Source

Skipped checking for symbols of virtual functions as we call those through the v-table.

Note: in certain cases of optimisation the compiler can, however, remove the whole virtual table, so we need to bear in mind that some day we'll hit trouble here.
pull/742/head
Dimitar Dobrev 9 years ago
parent
commit
e490343dfc
  1. 4
      src/Generator/Passes/FindSymbolsPass.cs

4
src/Generator/Passes/FindSymbolsPass.cs

@ -27,7 +27,9 @@ namespace CppSharp.Passes
var mangledDecl = decl as IMangledDecl; var mangledDecl = decl as IMangledDecl;
var method = decl as Method; var method = decl as Method;
if (decl.IsGenerated && mangledDecl != null && if (decl.IsGenerated && mangledDecl != null &&
!(method != null && (method.IsPure || method.IsSynthetized)) && // virtual functions cannot really be inlined and
// we don't need their symbols anyway as we call them through the v-table
!(method != null && (method.IsVirtual || method.IsSynthetized)) &&
!VisitMangledDeclaration(mangledDecl)) !VisitMangledDeclaration(mangledDecl))
{ {
decl.ExplicitlyIgnore(); decl.ExplicitlyIgnore();

Loading…
Cancel
Save