Mercurial > projects > ldc
comparison gen/typinf.cpp @ 1452:638d16625da2
LDC 2 compiles again.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sat, 30 May 2009 17:23:32 +0100 |
parents | a0a4d4dac1a4 |
children | a5526b7a5ae6 |
comparison
equal
deleted
inserted
replaced
1423:42bd767ec5a4 | 1452:638d16625da2 |
---|---|
432 } | 432 } |
433 // otherwise emit a void[] with the default initializer | 433 // otherwise emit a void[] with the default initializer |
434 else | 434 else |
435 { | 435 { |
436 const LLType* memty = DtoType(sd->memtype); | 436 const LLType* memty = DtoType(sd->memtype); |
437 #if DMDV2 | |
438 LLConstant* C = llvm::ConstantInt::get(memty, sd->defaultval->toInteger(), !sd->memtype->isunsigned()); | |
439 #else | |
437 LLConstant* C = llvm::ConstantInt::get(memty, sd->defaultval, !sd->memtype->isunsigned()); | 440 LLConstant* C = llvm::ConstantInt::get(memty, sd->defaultval, !sd->memtype->isunsigned()); |
441 #endif | |
438 b.push_void_array(C, sd->memtype, sd); | 442 b.push_void_array(C, sd->memtype, sd); |
439 } | 443 } |
440 | 444 |
441 // finish | 445 // finish |
442 b.finalize(ir.irGlobal); | 446 b.finalize(ir.irGlobal); |