comparison gen/llvmhelpers.cpp @ 947:9a10fa839dc5

Switch some getModule to getCompilationModule to make sure templates are emitted in the right module.
author Christian Kamm <kamm incasoftware de>
date Sun, 08 Feb 2009 18:51:32 +0100
parents 1714836f2c0b
children 780530d1cad3
comparison
equal deleted inserted replaced
946:1714836f2c0b 947:9a10fa839dc5
1561 return s->getModule() == gIR->dmodule || DtoIsTemplateInstance(s) != NULL; 1561 return s->getModule() == gIR->dmodule || DtoIsTemplateInstance(s) != NULL;
1562 #else 1562 #else
1563 Module* M = DtoIsTemplateInstance(s); 1563 Module* M = DtoIsTemplateInstance(s);
1564 // if it's a template instance, check the instantiating module 1564 // if it's a template instance, check the instantiating module
1565 // not the module that defines the template 1565 // not the module that defines the template
1566 if (M) 1566 if (M) {
1567 return M == gIR->dmodule; 1567 return M == gIR->dmodule;
1568 return s->getModule() == gIR->dmodule; 1568 }
1569 return s->getCompilationModule() == gIR->dmodule;
1569 #endif 1570 #endif
1570 } 1571 }
1571 1572
1572 ////////////////////////////////////////////////////////////////////////////////////////// 1573 //////////////////////////////////////////////////////////////////////////////////////////
1573 1574