]> granicus.if.org Git - clang/commitdiff
Use the canonical destructor, which fixes the self-host build. Thanks to Eli for...
authorAnders Carlsson <andersca@mac.com>
Tue, 23 Mar 2010 05:15:24 +0000 (05:15 +0000)
committerAnders Carlsson <andersca@mac.com>
Tue, 23 Mar 2010 05:15:24 +0000 (05:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99260 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCXX.cpp

index 3895e75b8ece6d41f527162a12129a87f22c3b61..d007827ee9dbf7f7a22de366d9b6fa026287452c 100644 (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();