Fixed class default initializers and type generation. Bug #260 is fixed.

This commit is contained in:
Tomas Lindquist Olsen
2009-04-27 03:40:40 +02:00
parent 3bd5cf70c2
commit ba38e15f0d
9 changed files with 169 additions and 44 deletions

View File

@@ -64,10 +64,15 @@ size_t add_zeros(std::vector<const llvm::Type*>& defaultTypes, size_t diff)
bool var_offset_sort_cb(const VarDeclaration* v1, const VarDeclaration* v2)
{
if (v1 && v2) return v1->offset < v2->offset;
else return false;
if (v1 && v2)
return v1->offset < v2->offset;
else
return false;
}
// this is pretty much the exact same thing we need to do for fields in each
// base class of a class
const llvm::Type* IrTypeStruct::buildType()
{
IF_LOG Logger::println("Building struct type %s @ %s",