comparison gen/structs.cpp @ 1554:d6e8d5db259f

LLVMContext changes up to r77366
author Benjamin Kramer <benny.kra@gmail.com>
date Thu, 30 Jul 2009 15:25:10 +0200
parents 7fcb72d518f6
children 1d5c3354b3c2
comparison
equal deleted inserted replaced
1553:f55ca8a1598c 1554:d6e8d5db259f
106 cmpop = llvm::ICmpInst::ICMP_NE; 106 cmpop = llvm::ICmpInst::ICMP_NE;
107 107
108 // call memcmp 108 // call memcmp
109 size_t sz = getTypePaddedSize(DtoType(t)); 109 size_t sz = getTypePaddedSize(DtoType(t));
110 LLValue* val = DtoMemCmp(lhs->getRVal(), rhs->getRVal(), DtoConstSize_t(sz)); 110 LLValue* val = DtoMemCmp(lhs->getRVal(), rhs->getRVal(), DtoConstSize_t(sz));
111 return gIR->ir->CreateICmp(cmpop, val, gIR->context().getConstantInt(val->getType(), 0, false), "tmp"); 111 return gIR->ir->CreateICmp(cmpop, val, LLConstantInt::get(val->getType(), 0, false), "tmp");
112 } 112 }
113 113
114 ////////////////////////////////////////////////////////////////////////////////////////// 114 //////////////////////////////////////////////////////////////////////////////////////////
115 115
116 LLValue* DtoIndexStruct(LLValue* src, StructDeclaration* sd, VarDeclaration* vd) 116 LLValue* DtoIndexStruct(LLValue* src, StructDeclaration* sd, VarDeclaration* vd)