Get rid of a call to GetAddressOfDirectBaseInCompleteClass.

llvm-svn: 102886
This commit is contained in:
Anders Carlsson 2010-05-02 23:57:15 +00:00
parent 859b3064cb
commit e089060fd0
1 changed files with 7 additions and 4 deletions

View File

@ -1020,10 +1020,13 @@ void CodeGenFunction::EmitDtorEpilogue(const CXXDestructorDecl *DD,
// Ignore trivial destructors.
if (BaseClassDecl->hasTrivialDestructor())
continue;
const CXXDestructorDecl *D = BaseClassDecl->getDestructor(getContext());
llvm::Value *V = OldGetAddressOfBaseClass(LoadCXXThis(),
ClassDecl, BaseClassDecl);
const CXXDestructorDecl *D = BaseClassDecl->getDestructor(getContext());
llvm::Value *V =
GetAddressOfDirectBaseInCompleteClass(LoadCXXThis(), ClassDecl,
BaseClassDecl,
/*BaseIsVirtual=*/false);
EmitCXXDestructorCall(D, Dtor_Base, /*ForVirtualBase=*/false, V);
}
}