diff options
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 3 |
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(); |