diff gen/llvmhelpers.cpp @ 1478:4dca8ed9d8b7

Fix #318 by making a list of all seen template instances in a module for singleobj compilation and then making sure they get emitted in their entirety.
author Christian Kamm <kamm incasoftware de>
date Sat, 06 Jun 2009 09:47:32 +0200
parents 8bf5fa175555
children 4f7d50c744ed
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Fri Jun 05 02:54:34 2009 +0200
+++ b/gen/llvmhelpers.cpp	Sat Jun 06 09:47:32 2009 +0200
@@ -1409,7 +1409,10 @@
             return true;
     
         if (!tinst->emittedInModule)
+        {
+            gIR->seenTemplateInstances.insert(tinst);
             tinst->emittedInModule = gIR->dmodule;
+        }
         return tinst->emittedInModule == gIR->dmodule;
     }