Mercurial > projects > ldc
comparison gen/typinf.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 | 259b031f3d22 |
children | ed0cffe895ec |
comparison
equal
deleted
inserted
replaced
1553:f55ca8a1598c | 1554:d6e8d5db259f |
---|---|
431 // otherwise emit a void[] with the default initializer | 431 // otherwise emit a void[] with the default initializer |
432 else | 432 else |
433 { | 433 { |
434 const LLType* memty = DtoType(sd->memtype); | 434 const LLType* memty = DtoType(sd->memtype); |
435 #if DMDV2 | 435 #if DMDV2 |
436 LLConstant* C = gIR->context().getConstantInt(memty, sd->defaultval->toInteger(), !sd->memtype->isunsigned()); | 436 LLConstant* C = LLConstantInt::get(memty, sd->defaultval->toInteger(), !sd->memtype->isunsigned()); |
437 #else | 437 #else |
438 LLConstant* C = gIR->context().getConstantInt(memty, sd->defaultval, !sd->memtype->isunsigned()); | 438 LLConstant* C = LLConstantInt::get(memty, sd->defaultval, !sd->memtype->isunsigned()); |
439 #endif | 439 #endif |
440 b.push_void_array(C, sd->memtype, sd); | 440 b.push_void_array(C, sd->memtype, sd); |
441 } | 441 } |
442 | 442 |
443 // finish | 443 // finish |
732 arrInits.push_back(DtoTypeInfoOf(arg->type, true)); | 732 arrInits.push_back(DtoTypeInfoOf(arg->type, true)); |
733 } | 733 } |
734 | 734 |
735 // build array | 735 // build array |
736 const LLArrayType* arrTy = LLArrayType::get(tiTy, dim); | 736 const LLArrayType* arrTy = LLArrayType::get(tiTy, dim); |
737 LLConstant* arrC = llvm::ConstantArray::get(arrTy, arrInits); | 737 LLConstant* arrC = LLConstantArray::get(arrTy, arrInits); |
738 | 738 |
739 RTTIBuilder b(Type::typeinfotypelist); | 739 RTTIBuilder b(Type::typeinfotypelist); |
740 | 740 |
741 // push TypeInfo[] | 741 // push TypeInfo[] |
742 b.push_array(arrC, dim, Type::typeinfo->type, NULL); | 742 b.push_array(arrC, dim, Type::typeinfo->type, NULL); |