Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- a/gen/toir.cpp Thu Aug 28 08:37:47 2008 +0200 +++ b/gen/toir.cpp Thu Aug 28 20:15:36 2008 +0200 @@ -130,7 +130,7 @@ vd->toObjFile(0); // TODO: multiobj DtoConstInitGlobal(vd); } - if (!vd->ir.getIrValue() || DtoType(vd->type)->isAbstract()) { + if (!vd->ir.isSet() || !vd->ir.getIrValue() || DtoType(vd->type)->isAbstract()) { error("global variable %s not resolved", vd->toChars()); Logger::cout() << "unresolved global had type: " << *DtoType(vd->type) << '\n'; fatal();