2013/10/10 Reid Kleckner <[email protected]>: > - // classes with no virtual bases, so try to emit it as an alias. > - if (dtorType == Dtor_Complete && > - !dtor->getParent()->getNumVBases() && > - !TryEmitDefinitionAsAlias(GlobalDecl(dtor, Dtor_Complete), > - GlobalDecl(dtor, Dtor_Base))) > + // classes with no virtual bases, so try to emit it as an alias or just > skip > + // entirely if the ABI doesn't need it. > + if (dtorType == Dtor_Complete && dtor->getParent()->getNumVBases() == 0 > && > + (getCXXABI().useThunkForDtorVariant(dtor, Dtor_Complete) || > + !TryEmitDefinitionAsAlias(GlobalDecl(dtor, Dtor_Complete), > + GlobalDecl(dtor, Dtor_Base)))) > > One thing that worries me about this is, how do we guarantee that Dtor_Base > gets emitted?
EmitCXXDestructor(Dtor_Base) will be called if you define a dtor out-of-line. Are you worried about the in-line case? Another way is to override the type with Base when handling EmitCXXDestructor(Complete) and exit in EmitCXXDestructor(Base). - btw, I've landed the addition of -fno-rtti to sret-and-byval.cpp in r192359. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
