Mercurial > projects > ldc
diff gen/statements.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/statements.cpp Mon Jul 13 12:17:58 2009 +0200 +++ b/gen/statements.cpp Mon Jul 13 20:16:15 2009 +0200 @@ -114,7 +114,7 @@ // and return 0 instead // if we're not in main, just bitcast if (p->topfunc() == p->mainFunc) - v = llvm::getGlobalContext().getNullValue(p->mainFunc->getReturnType()); + v = gIR->context().getNullValue(p->mainFunc->getReturnType()); else v = gIR->ir->CreateBitCast(v, p->topfunc()->getReturnType(), "tmp"); @@ -1380,7 +1380,7 @@ static LLConstant* generate_unique_critical_section() { const LLType* Mty = DtoMutexType(); - return new llvm::GlobalVariable(*gIR->module, Mty, false, llvm::GlobalValue::InternalLinkage, llvm::getGlobalContext().getNullValue(Mty), ".uniqueCS"); + return new llvm::GlobalVariable(*gIR->module, Mty, false, llvm::GlobalValue::InternalLinkage, gIR->context().getNullValue(Mty), ".uniqueCS"); } void SynchronizedStatement::toIR(IRState* p)