Mercurial > projects > ldc
diff gen/toir.cpp @ 1535:61f12f4651b5
Don't use llvm::getGlobalContext() anymore
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Mon, 13 Jul 2009 20:16:15 +0200 |
parents | 8ca25bd765a3 |
children | 7fcb72d518f6 |
line wrap: on
line diff
--- a/gen/toir.cpp Mon Jul 13 12:17:58 2009 +0200 +++ b/gen/toir.cpp Mon Jul 13 20:16:15 2009 +0200 @@ -341,7 +341,7 @@ return llvm::ConstantAggregateZero::get(t); } else { - return llvm::getGlobalContext().getNullValue(t); + return gIR->context().getNullValue(t); } assert(0); return NULL; @@ -1656,7 +1656,7 @@ LLValue* rval = dval->getRVal(); DtoDeleteMemory(rval); if (dval->isVar()) - DtoStore(llvm::getGlobalContext().getNullValue(rval->getType()), dval->getLVal()); + DtoStore(gIR->context().getNullValue(rval->getType()), dval->getLVal()); } // class else if (et->ty == Tclass) @@ -1680,7 +1680,7 @@ } if (dval->isVar()) { LLValue* lval = dval->getLVal(); - DtoStore(llvm::getGlobalContext().getNullValue(lval->getType()->getContainedType(0)), lval); + DtoStore(gIR->context().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(llvm::getGlobalContext().getNullValue(DtoType(type)), tmp); + DtoStore(gIR->context().getNullValue(DtoType(type)), tmp); const size_t n = keys->dim; for (size_t i=0; i<n; ++i)