Mercurial > projects > ldc
comparison gen/structs.cpp @ 812:6c2ff06c4201
Fixed a nasty bug with how interface vtables for class initializers were output, causing some class fields to be skipped.
Fixed a problem in definition of ClassInfos where an invalid constant was potentially used. This needs to be looked into proper as it might happen again in the future.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 01 Dec 2008 04:37:54 +0100 |
parents | 69a5e4a6fc0f |
children | a125ada7fd95 |
comparison
equal
deleted
inserted
replaced
811:8e6135be6999 | 812:6c2ff06c4201 |
---|---|
465 gIR->structs.push_back(irstruct); | 465 gIR->structs.push_back(irstruct); |
466 | 466 |
467 const llvm::StructType* structtype = isaStruct(sd->type->ir.type->get()); | 467 const llvm::StructType* structtype = isaStruct(sd->type->ir.type->get()); |
468 | 468 |
469 // always generate the constant initalizer | 469 // always generate the constant initalizer |
470 assert(!irstruct->constInit); | |
470 if (sd->zeroInit) | 471 if (sd->zeroInit) |
471 { | 472 { |
472 Logger::println("Zero initialized"); | 473 Logger::println("Zero initialized"); |
473 irstruct->constInit = llvm::ConstantAggregateZero::get(structtype); | 474 irstruct->constInit = llvm::ConstantAggregateZero::get(structtype); |
474 } | 475 } |