# HG changeset patch # User Tomas Lindquist Olsen # Date 1239908449 -7200 # Node ID ded6a557220a3b182a92797465a5bfdaf02f91ea # Parent 9201e0d41ee5e0d3507315e496da2ebe229d12f3 Too strict assertion with generating the interfaceInfosZ symbol. Baseclasses might introduce interfaces. diff -r 9201e0d41ee5 -r ded6a557220a ir/irclass.cpp --- a/ir/irclass.cpp Thu Apr 16 20:41:27 2009 +0200 +++ b/ir/irclass.cpp Thu Apr 16 21:00:49 2009 +0200 @@ -81,19 +81,15 @@ ClassDeclaration* cd = aggrdecl->isClassDeclaration(); - // FIXME: - // also happens for mini/s.d :( - assert(cd->vtblInterfaces && cd->vtblInterfaces->dim > 0 && - "should not create interface info array for class with no explicit " - "interface implementations"); + size_t n = type->irtype->isClass()->getNumInterfaceVtbls(); + assert(n > 0 && "getting ClassInfo.interfaces storage symbol, but we " + "don't implement any interfaces"); VarDeclarationIter idx(ClassDeclaration::classinfo->fields, 3); const llvm::Type* InterfaceTy = DtoType(idx->type->next); // create Interface[N] - const llvm::ArrayType* array_type = llvm::ArrayType::get( - InterfaceTy, - type->irtype->isClass()->getNumInterfaceVtbls()); + const llvm::ArrayType* array_type = llvm::ArrayType::get(InterfaceTy,n); // put it in a global std::string name("_D");