Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
1477:6023f65a3aee | 1478:4dca8ed9d8b7 |
---|---|
1407 { | 1407 { |
1408 if (!opts::singleObj) | 1408 if (!opts::singleObj) |
1409 return true; | 1409 return true; |
1410 | 1410 |
1411 if (!tinst->emittedInModule) | 1411 if (!tinst->emittedInModule) |
1412 { | |
1413 gIR->seenTemplateInstances.insert(tinst); | |
1412 tinst->emittedInModule = gIR->dmodule; | 1414 tinst->emittedInModule = gIR->dmodule; |
1415 } | |
1413 return tinst->emittedInModule == gIR->dmodule; | 1416 return tinst->emittedInModule == gIR->dmodule; |
1414 } | 1417 } |
1415 | 1418 |
1416 return s->getModule() == gIR->dmodule; | 1419 return s->getModule() == gIR->dmodule; |
1417 } | 1420 } |