Mercurial > projects > ldc
comparison gen/structs.cpp @ 1545:7fcb72d518f6
More factory methods moved to LLVMContext
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Wed, 15 Jul 2009 18:09:41 +0200 |
parents | 61f12f4651b5 |
children | d6e8d5db259f |
comparison
equal
deleted
inserted
replaced
1544:8863cf7236e6 | 1545:7fcb72d518f6 |
---|---|
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, LLConstantInt::get(val->getType(), 0, false), "tmp"); | 111 return gIR->ir->CreateICmp(cmpop, val, gIR->context().getConstantInt(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) |