Mercurial > projects > ldc
comparison gen/structs.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 | 03d7c4aac654 |
children | 8a70b4381369 |
comparison
equal
deleted
inserted
replaced
946:1714836f2c0b | 947:9a10fa839dc5 |
---|---|
531 bool isunion = sd->isUnionDeclaration(); | 531 bool isunion = sd->isUnionDeclaration(); |
532 | 532 |
533 // set irstruct info | 533 // set irstruct info |
534 irstruct->packed = ispacked; | 534 irstruct->packed = ispacked; |
535 | 535 |
536 // defined in this module? | |
537 bool thisModule = false; | |
538 if (sd->getModule() == gIR->dmodule) | |
539 thisModule = true; | |
540 | |
541 // methods, fields | 536 // methods, fields |
542 Array* arr = sd->members; | 537 Array* arr = sd->members; |
543 for (int k=0; k < arr->dim; k++) { | 538 for (int k=0; k < arr->dim; k++) { |
544 Dsymbol* s = (Dsymbol*)arr->data[k]; | 539 Dsymbol* s = (Dsymbol*)arr->data[k]; |
545 s->toObjFile(0); | 540 s->toObjFile(0); |
645 llvm::cast<llvm::OpaqueType>(irstruct->initOpaque.get())->refineAbstractTypeTo(irstruct->constInit->getType()); | 640 llvm::cast<llvm::OpaqueType>(irstruct->initOpaque.get())->refineAbstractTypeTo(irstruct->constInit->getType()); |
646 | 641 |
647 gIR->structs.pop_back(); | 642 gIR->structs.pop_back(); |
648 | 643 |
649 // emit typeinfo | 644 // emit typeinfo |
650 if (sd->getModule() == gIR->dmodule && sd->llvmInternal != LLVMno_typeinfo) | 645 if (sd->getCompilationModule() == gIR->dmodule && sd->llvmInternal != LLVMno_typeinfo) |
651 DtoTypeInfoOf(sd->type, false); | 646 DtoTypeInfoOf(sd->type, false); |
652 } | 647 } |
653 | 648 |
654 ////////////////////////////////////////////////////////////////////////////////////////// | 649 ////////////////////////////////////////////////////////////////////////////////////////// |
655 | 650 |