getNullValue is in Constant again

Requires LLVM >= r77721
This commit is contained in:
Benjamin Kramer
2009-07-31 23:01:29 +02:00
parent 0a1d467ac7
commit 4c5457ba61
13 changed files with 35 additions and 35 deletions

View File

@@ -112,7 +112,7 @@ void ReturnStatement::toIR(IRState* p)
// and return 0 instead
// if we're not in main, just bitcast
if (p->topfunc() == p->mainFunc)
v = gIR->context().getNullValue(p->mainFunc->getReturnType());
v = LLConstant::getNullValue(p->mainFunc->getReturnType());
else
v = gIR->ir->CreateBitCast(v, p->topfunc()->getReturnType(), "tmp");
@@ -1378,7 +1378,7 @@ void WithStatement::toIR(IRState* p)
static LLConstant* generate_unique_critical_section()
{
const LLType* Mty = DtoMutexType();
return new llvm::GlobalVariable(*gIR->module, Mty, false, llvm::GlobalValue::InternalLinkage, gIR->context().getNullValue(Mty), ".uniqueCS");
return new llvm::GlobalVariable(*gIR->module, Mty, false, llvm::GlobalValue::InternalLinkage, LLConstant::getNullValue(Mty), ".uniqueCS");
}
void SynchronizedStatement::toIR(IRState* p)