summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commit995891667f37fccdd21a8a5a737425e83afcd616 (patch)
tree1e068a01a2e2518897d12a77d99ebcbd74a486da /clang/lib/CodeGen
parent7fffbcc756a7eeb058e132bae41936966d34ecad (diff)
downloadbcm5719-llvm-995891667f37fccdd21a8a5a737425e83afcd616.tar.gz
bcm5719-llvm-995891667f37fccdd21a8a5a737425e83afcd616.zip
Use the canonical destructor, which fixes the self-host build. Thanks to Eli for noticing.
llvm-svn: 99260
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index 3895e75b8ec..d007827ee9d 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud