comparison gen/aa.cpp @ 1534:8ca25bd765a3

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.
author Benjamin Kramer <benny.kra@gmail.com>
date Mon, 13 Jul 2009 12:17:58 +0200
parents 09734fb929c0
children 61f12f4651b5
comparison
equal deleted inserted replaced
1533:d1652c8fb4f6 1534:8ca25bd765a3
103 if (!lvalue && global.params.useArrayBounds) { 103 if (!lvalue && global.params.useArrayBounds) {
104 llvm::BasicBlock* oldend = gIR->scopeend(); 104 llvm::BasicBlock* oldend = gIR->scopeend();
105 llvm::BasicBlock* failbb = llvm::BasicBlock::Create("aaboundscheckfail", gIR->topfunc(), oldend); 105 llvm::BasicBlock* failbb = llvm::BasicBlock::Create("aaboundscheckfail", gIR->topfunc(), oldend);
106 llvm::BasicBlock* okbb = llvm::BasicBlock::Create("aaboundsok", gIR->topfunc(), oldend); 106 llvm::BasicBlock* okbb = llvm::BasicBlock::Create("aaboundsok", gIR->topfunc(), oldend);
107 107
108 LLValue* nullaa = LLConstant::getNullValue(ret->getType()); 108 LLValue* nullaa = llvm::getGlobalContext().getNullValue(ret->getType());
109 LLValue* cond = gIR->ir->CreateICmpNE(nullaa, ret, "aaboundscheck"); 109 LLValue* cond = gIR->ir->CreateICmpNE(nullaa, ret, "aaboundscheck");
110 gIR->ir->CreateCondBr(cond, okbb, failbb); 110 gIR->ir->CreateCondBr(cond, okbb, failbb);
111 111
112 // set up failbb to call the array bounds error runtime function 112 // set up failbb to call the array bounds error runtime function
113 113