aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-03-23 05:15:24 +0000
committerAnders Carlsson <andersca@mac.com>2010-03-23 05:15:24 +0000
commit02e245942f3808bfbba5fbd25af9690682cc800d (patch)
treeb25a95dd516bfaff543ceb7b3a5f6817fa4fdd20 /lib/CodeGen/CGCXX.cpp
parent41ca1347c4b5bfea012f08d7eff8636d355762ea (diff)
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
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp3
1 files changed, 2 insertions, 1 deletions
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<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();