From e490343dfc412aee1f98d50beb41af0b51428ed7 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sat, 4 Feb 2017 15:01:19 +0200 Subject: [PATCH] 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. --- src/Generator/Passes/FindSymbolsPass.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Generator/Passes/FindSymbolsPass.cs b/src/Generator/Passes/FindSymbolsPass.cs index 912268be..1fed9fdd 100644 --- a/src/Generator/Passes/FindSymbolsPass.cs +++ b/src/Generator/Passes/FindSymbolsPass.cs @@ -27,7 +27,9 @@ namespace CppSharp.Passes var mangledDecl = decl as IMangledDecl; var method = decl as Method; 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)) { decl.ExplicitlyIgnore();