Mercurial > projects > ldc
comparison ir/irclass.cpp @ 1231:212ec2d9d176
Fixed some minitest regressions.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Thu, 16 Apr 2009 19:21:30 +0200 |
parents | e67c85d6e680 |
children | ded6a557220a |
comparison
equal
deleted
inserted
replaced
1230:e67c85d6e680 | 1231:212ec2d9d176 |
---|---|
79 if (classInterfacesArray) | 79 if (classInterfacesArray) |
80 return classInterfacesArray; | 80 return classInterfacesArray; |
81 | 81 |
82 ClassDeclaration* cd = aggrdecl->isClassDeclaration(); | 82 ClassDeclaration* cd = aggrdecl->isClassDeclaration(); |
83 | 83 |
84 // FIXME: | |
85 // also happens for mini/s.d :( | |
84 assert(cd->vtblInterfaces && cd->vtblInterfaces->dim > 0 && | 86 assert(cd->vtblInterfaces && cd->vtblInterfaces->dim > 0 && |
85 "should not create interface info array for class with no explicit " | 87 "should not create interface info array for class with no explicit " |
86 "interface implementations"); | 88 "interface implementations"); |
87 | 89 |
88 VarDeclarationIter idx(ClassDeclaration::classinfo->fields, 3); | 90 VarDeclarationIter idx(ClassDeclaration::classinfo->fields, 3); |
322 // add virtual function pointers | 324 // add virtual function pointers |
323 size_t n = vtbl_array.dim; | 325 size_t n = vtbl_array.dim; |
324 for (size_t i = 1; i < n; i++) | 326 for (size_t i = 1; i < n; i++) |
325 { | 327 { |
326 Dsymbol* dsym = (Dsymbol*)vtbl_array.data[i]; | 328 Dsymbol* dsym = (Dsymbol*)vtbl_array.data[i]; |
327 assert(dsym && "null vtbl member"); | 329 if (dsym == NULL) |
330 { | |
331 // FIXME | |
332 // why is this null? | |
333 // happens for mini/s.d | |
334 constants.push_back(getNullValue(getVoidPtrType())); | |
335 continue; | |
336 } | |
328 | 337 |
329 FuncDeclaration* fd = dsym->isFuncDeclaration(); | 338 FuncDeclaration* fd = dsym->isFuncDeclaration(); |
330 assert(fd && "vtbl entry not a function"); | 339 assert(fd && "vtbl entry not a function"); |
331 | 340 |
332 assert(!(fd->isAbstract() && !fd->fbody) && | 341 assert(!(fd->isAbstract() && !fd->fbody) && |