Mercurial > projects > ldc
diff gen/toir.cpp @ 1560:1d5c3354b3c2
getNullValue is in Constant again
Requires LLVM >= r77721
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Fri, 31 Jul 2009 23:01:29 +0200 |
parents | 06d5cc873350 |
children | f1f33c8dcd90 |
line wrap: on
line diff
--- a/gen/toir.cpp Fri Jul 31 19:11:07 2009 +0200 +++ b/gen/toir.cpp Fri Jul 31 23:01:29 2009 +0200 @@ -341,7 +341,7 @@ return llvm::ConstantAggregateZero::get(t); } else { - return gIR->context().getNullValue(t); + return LLConstant::getNullValue(t); } assert(0); return NULL; @@ -1656,7 +1656,7 @@ LLValue* rval = dval->getRVal(); DtoDeleteMemory(rval); if (dval->isVar()) - DtoStore(gIR->context().getNullValue(rval->getType()), dval->getLVal()); + DtoStore(LLConstant::getNullValue(rval->getType()), dval->getLVal()); } // class else if (et->ty == Tclass) @@ -1680,7 +1680,7 @@ } if (dval->isVar()) { LLValue* lval = dval->getLVal(); - DtoStore(gIR->context().getNullValue(lval->getType()->getContainedType(0)), lval); + DtoStore(LLConstant::getNullValue(lval->getType()->getContainedType(0)), lval); } } // dyn array @@ -2547,7 +2547,7 @@ // it should be possible to avoid the temporary in some cases LLValue* tmp = DtoAlloca(type,"aaliteral"); DValue* aa = new DVarValue(type, tmp); - DtoStore(gIR->context().getNullValue(DtoType(type)), tmp); + DtoStore(LLConstant::getNullValue(DtoType(type)), tmp); const size_t n = keys->dim; for (size_t i=0; i<n; ++i)