From: Anders Carlsson Date: Tue, 1 Sep 2009 21:12:16 +0000 (+0000) Subject: Assert that we don't have any virtual bases. We can emit dtors for polymorphics class... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de738fe899b5c1d387dbc66a1122032e694d3d6f;p=clang Assert that we don't have any virtual bases. We can emit dtors for polymorphics classes just fune. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80722 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index d71597fd93..8f9147306c 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -1744,8 +1744,8 @@ void CodeGenFunction::EmitCtorPrologue(const CXXConstructorDecl *CD) { /// FIXME: This needs to take a CXXDtorType. void CodeGenFunction::EmitDtorEpilogue(const CXXDestructorDecl *DD) { const CXXRecordDecl *ClassDecl = cast(DD->getDeclContext()); - assert(!ClassDecl->isPolymorphic() && - "FIXME. polymorphic destruction not supported"); + assert(!ClassDecl->getNumVBases() && + "FIXME: Destruction of virtual bases not supported"); (void)ClassDecl; // prevent warning. for (CXXDestructorDecl::destr_const_iterator *B = DD->destr_begin(),