comparison gen/tollvm.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 c88b16d4a13c
children 61f12f4651b5
comparison
equal deleted inserted replaced
1533:d1652c8fb4f6 1534:8ca25bd765a3
211 { 211 {
212 Logger::println("Doing delegate equality"); 212 Logger::println("Doing delegate equality");
213 llvm::Value *b1, *b2; 213 llvm::Value *b1, *b2;
214 if (rhs == NULL) 214 if (rhs == NULL)
215 { 215 {
216 rhs = LLConstant::getNullValue(lhs->getType()); 216 rhs = llvm::getGlobalContext().getNullValue(lhs->getType());
217 } 217 }
218 218
219 LLValue* l = gIR->ir->CreateExtractValue(lhs, 0); 219 LLValue* l = gIR->ir->CreateExtractValue(lhs, 0);
220 LLValue* r = gIR->ir->CreateExtractValue(rhs, 0); 220 LLValue* r = gIR->ir->CreateExtractValue(rhs, 0);
221 b1 = gIR->ir->CreateICmp(llvm::ICmpInst::ICMP_EQ,l,r,"tmp"); 221 b1 = gIR->ir->CreateICmp(llvm::ICmpInst::ICMP_EQ,l,r,"tmp");
739 return llvm::ConstantPointerNull::get(pt); 739 return llvm::ConstantPointerNull::get(pt);
740 } 740 }
741 741
742 LLConstant* getNullValue(const LLType* t) 742 LLConstant* getNullValue(const LLType* t)
743 { 743 {
744 return LLConstant::getNullValue(t); 744 return llvm::getGlobalContext().getNullValue(t);
745 } 745 }
746 746
747 ////////////////////////////////////////////////////////////////////////////////////////// 747 //////////////////////////////////////////////////////////////////////////////////////////
748 748
749 size_t getTypeBitSize(const LLType* t) 749 size_t getTypeBitSize(const LLType* t)