comparison gen/toir.cpp @ 553:d19e29194c13

Do not assert on non-existing supposed globals. (see nocompile/union_12,14)
author Christian Kamm <kamm incasoftware de>
date Thu, 28 Aug 2008 20:15:36 +0200
parents d30c40f1128d
children 1b702422451c
comparison
equal deleted inserted replaced
552:648409a7fb0c 553:d19e29194c13
128 // take care of forward references of global variables 128 // take care of forward references of global variables
129 if (vd->isDataseg() || (vd->storage_class & STCextern)) { 129 if (vd->isDataseg() || (vd->storage_class & STCextern)) {
130 vd->toObjFile(0); // TODO: multiobj 130 vd->toObjFile(0); // TODO: multiobj
131 DtoConstInitGlobal(vd); 131 DtoConstInitGlobal(vd);
132 } 132 }
133 if (!vd->ir.getIrValue() || DtoType(vd->type)->isAbstract()) { 133 if (!vd->ir.isSet() || !vd->ir.getIrValue() || DtoType(vd->type)->isAbstract()) {
134 error("global variable %s not resolved", vd->toChars()); 134 error("global variable %s not resolved", vd->toChars());
135 Logger::cout() << "unresolved global had type: " << *DtoType(vd->type) << '\n'; 135 Logger::cout() << "unresolved global had type: " << *DtoType(vd->type) << '\n';
136 fatal(); 136 fatal();
137 } 137 }
138 return new DVarValue(type, vd, vd->ir.getIrValue(), true); 138 return new DVarValue(type, vd, vd->ir.getIrValue(), true);