Index: lib/CodeGen/CGClass.cpp =================================================================== --- lib/CodeGen/CGClass.cpp +++ lib/CodeGen/CGClass.cpp @@ -1293,6 +1293,9 @@ const CXXRecordDecl *BaseClassDecl, const CXXRecordDecl *MostDerivedClassDecl) { + if (!BaseClassDecl->hasSimpleDestructor()) + return false; + // If the destructor is trivial we don't have to check anything else. if (BaseClassDecl->hasTrivialDestructor()) return true;