Assert that we don't have any virtual bases. We can emit dtors for polymorphics classes just fune.

llvm-svn: 80722
This commit is contained in:
Anders Carlsson 2009-09-01 21:12:16 +00:00
parent a3a3f6fecd
commit 783ab50b33
1 changed files with 2 additions and 2 deletions

View File

@ -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<CXXRecordDecl>(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(),