Mercurial > projects > ldc
comparison gen/toobj.cpp @ 919:c76f74d09fb1
Fixed assertion failure when object.d is missing the ModuleInfo class
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 02 Feb 2009 02:35:44 +0100 |
parents | 893d72ab95d0 |
children | 545f54041d91 |
comparison
equal
deleted
inserted
replaced
918:a4fcc13da3cd | 919:c76f74d09fb1 |
---|---|
614 // void* xgetMembers; | 614 // void* xgetMembers; |
615 // void function() ictor; | 615 // void function() ictor; |
616 // } | 616 // } |
617 | 617 |
618 // resolve ModuleInfo | 618 // resolve ModuleInfo |
619 assert(moduleinfo); | 619 if (!moduleinfo) |
620 { | |
621 error("object.d is missing the ModuleInfo class"); | |
622 fatal(); | |
623 } | |
624 | |
620 DtoForceConstInitDsymbol(moduleinfo); | 625 DtoForceConstInitDsymbol(moduleinfo); |
621 | 626 |
622 // check for patch | 627 // check for patch |
623 if (moduleinfo->fields.dim != 9) | 628 if (moduleinfo->fields.dim != 9) |
624 { | 629 { |
625 error("unpatched object.d detected, ModuleInfo incorrect"); | 630 error("object.d ModuleInfo class is incorrect"); |
626 fatal(); | 631 fatal(); |
627 } | 632 } |
628 | 633 |
629 // moduleinfo llvm struct type | 634 // moduleinfo llvm struct type |
630 const llvm::StructType* moduleinfoTy = isaStruct(moduleinfo->type->ir.type->get()); | 635 const llvm::StructType* moduleinfoTy = isaStruct(moduleinfo->type->ir.type->get()); |