Mercurial > projects > ldc
comparison gen/toobj.cpp @ 1148:3d1b16dabd25
Eliminated the need for resolve, declare, const-init and define lists to drive code generation.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Fri, 27 Mar 2009 21:50:32 +0100 |
parents | dbe4af57b240 |
children | f528e55fb32f |
comparison
equal
deleted
inserted
replaced
1147:dbe4af57b240 | 1148:3d1b16dabd25 |
---|---|
142 dsym->codegen(sir); | 142 dsym->codegen(sir); |
143 } | 143 } |
144 | 144 |
145 // generate ModuleInfo | 145 // generate ModuleInfo |
146 genmoduleinfo(); | 146 genmoduleinfo(); |
147 | |
148 // emit function bodies | |
149 sir->emitFunctionBodies(); | |
147 | 150 |
148 // emit usedArray | 151 // emit usedArray |
149 if (!ir.usedArray.empty()) | 152 if (!ir.usedArray.empty()) |
150 { | 153 { |
151 const LLArrayType* usedTy = LLArrayType::get(getVoidPtrType(), ir.usedArray.size()); | 154 const LLArrayType* usedTy = LLArrayType::get(getVoidPtrType(), ir.usedArray.size()); |
597 { | 600 { |
598 error("object.d is missing the ModuleInfo class"); | 601 error("object.d is missing the ModuleInfo class"); |
599 fatal(); | 602 fatal(); |
600 } | 603 } |
601 | 604 |
602 DtoForceConstInitDsymbol(moduleinfo); | 605 moduleinfo->codegen(Type::sir); |
603 | 606 |
604 // check for patch | 607 // check for patch |
605 if (moduleinfo->fields.dim != 9) | 608 if (moduleinfo->fields.dim != 9) |
606 { | 609 { |
607 error("object.d ModuleInfo class is incorrect"); | 610 error("object.d ModuleInfo class is incorrect"); |