Use the canonical destructor, which fixes the self-host build. Thanks to Eli for noticing.

llvm-svn: 99260
This commit is contained in:
Anders Carlsson 2010-03-23 05:15:24 +00:00
parent 7fffbcc756
commit 995891667f
1 changed files with 2 additions and 1 deletions

View File

@ -492,7 +492,8 @@ void CodeGenModule::BuildThunksForVirtual(GlobalDecl GD) {
const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD))
GD = GlobalDecl(DD, GD.getDtorType());
GD = GlobalDecl(cast<CXXDestructorDecl>(DD->getCanonicalDecl()),
GD.getDtorType());
else
GD = MD->getCanonicalDecl();