comparison ir/irtypestruct.cpp @ 1270:dd135ff697fa

Fixed class default initializers and type generation. Bug #260 is fixed.
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Mon, 27 Apr 2009 03:40:40 +0200
parents b8a51aa44d4c
children 8fb39f7f1a7c
comparison
equal deleted inserted replaced
1269:b8a51aa44d4c 1270:dd135ff697fa
62 return defaultTypes.size() - n; 62 return defaultTypes.size() - n;
63 } 63 }
64 64
65 bool var_offset_sort_cb(const VarDeclaration* v1, const VarDeclaration* v2) 65 bool var_offset_sort_cb(const VarDeclaration* v1, const VarDeclaration* v2)
66 { 66 {
67 if (v1 && v2) return v1->offset < v2->offset; 67 if (v1 && v2)
68 else return false; 68 return v1->offset < v2->offset;
69 } 69 else
70 return false;
71 }
72
73 // this is pretty much the exact same thing we need to do for fields in each
74 // base class of a class
70 75
71 const llvm::Type* IrTypeStruct::buildType() 76 const llvm::Type* IrTypeStruct::buildType()
72 { 77 {
73 IF_LOG Logger::println("Building struct type %s @ %s", 78 IF_LOG Logger::println("Building struct type %s @ %s",
74 sd->toPrettyChars(), sd->locToChars()); 79 sd->toPrettyChars(), sd->locToChars());