From: Anders Carlsson Date: Tue, 23 Mar 2010 05:15:24 +0000 (+0000) Subject: Use the canonical destructor, which fixes the self-host build. Thanks to Eli for... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02e245942f3808bfbba5fbd25af9690682cc800d;p=clang Use the canonical destructor, which fixes the self-host build. Thanks to Eli for noticing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99260 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index 3895e75b8e..d007827ee9 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -492,7 +492,8 @@ void CodeGenModule::BuildThunksForVirtual(GlobalDecl GD) { const CXXMethodDecl *MD = cast(GD.getDecl()); if (const CXXDestructorDecl *DD = dyn_cast(MD)) - GD = GlobalDecl(DD, GD.getDtorType()); + GD = GlobalDecl(cast(DD->getCanonicalDecl()), + GD.getDtorType()); else GD = MD->getCanonicalDecl();