comparison gen/structs.cpp @ 940:39519a1ff603

Changed the way LDC determines if a template instantiation needs to get a definition, seems to speed up compile times quite a bit in some cases.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 04 Feb 2009 18:48:03 +0100
parents af7a6faf9406
children 03d7c4aac654
comparison
equal deleted inserted replaced
939:cac9895be400 940:39519a1ff603
605 llvm::GlobalValue::LinkageTypes _linkage = DtoExternalLinkage(sd); 605 llvm::GlobalValue::LinkageTypes _linkage = DtoExternalLinkage(sd);
606 llvm::GlobalVariable* initvar = new llvm::GlobalVariable(sd->ir.irStruct->initOpaque.get(), true, _linkage, NULL, initname, gIR->module); 606 llvm::GlobalVariable* initvar = new llvm::GlobalVariable(sd->ir.irStruct->initOpaque.get(), true, _linkage, NULL, initname, gIR->module);
607 sd->ir.irStruct->init = initvar; 607 sd->ir.irStruct->init = initvar;
608 608
609 gIR->constInitList.push_back(sd); 609 gIR->constInitList.push_back(sd);
610 if (DtoIsTemplateInstance(sd) || sd->getModule() == gIR->dmodule) 610 if (mustDefineSymbol(sd))
611 gIR->defineList.push_back(sd); 611 gIR->defineList.push_back(sd);
612 } 612 }
613 613
614 ////////////////////////////////////////////////////////////////////////////////////////// 614 //////////////////////////////////////////////////////////////////////////////////////////
615 615