Build fix for the latest LLVMContext changes (LLVM r75445)

This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
This commit is contained in:
Benjamin Kramer
2009-07-13 12:17:58 +02:00
parent 8576788245
commit 331319dab1
16 changed files with 36 additions and 38 deletions

View File

@@ -114,7 +114,7 @@ void ReturnStatement::toIR(IRState* p)
// and return 0 instead
// if we're not in main, just bitcast
if (p->topfunc() == p->mainFunc)
v = llvm::Constant::getNullValue(p->mainFunc->getReturnType());
v = llvm::getGlobalContext().getNullValue(p->mainFunc->getReturnType());
else
v = gIR->ir->CreateBitCast(v, p->topfunc()->getReturnType(), "tmp");
@@ -1380,7 +1380,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, LLConstant::getNullValue(Mty), ".uniqueCS");
return new llvm::GlobalVariable(*gIR->module, Mty, false, llvm::GlobalValue::InternalLinkage, llvm::getGlobalContext().getNullValue(Mty), ".uniqueCS");
}
void SynchronizedStatement::toIR(IRState* p)