diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-07 23:56:34 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-07 23:56:34 +0000 |
commit | 31bc3ad2759f7ae2e6a2728d03a08c20fcb0a164 (patch) | |
tree | 59f7f5a5fbb3c1b16c7ded7df6b2b6195ff5d239 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 1d849219a5b44aa25008a83fa8fbfbd385f6a3ff (diff) | |
download | bcm5719-llvm-31bc3ad2759f7ae2e6a2728d03a08c20fcb0a164.tar.gz bcm5719-llvm-31bc3ad2759f7ae2e6a2728d03a08c20fcb0a164.zip |
A bunch more thunk fixes from misc testing.
(Yes, I do intend to commit some tests for this.)
llvm-svn: 90818
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 5f822f509f8..6250e6952d3 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -625,7 +625,13 @@ void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) { getVtableInfo().MaybeEmitVtable(GD); if (MD->isVirtual() && MD->isOutOfLine() && (!isa<CXXDestructorDecl>(D) || GD.getDtorType() != Dtor_Base)) { - BuildThunksForVirtual(GD); + if (isa<CXXDestructorDecl>(D)) { + GlobalDecl CanonGD(cast<CXXDestructorDecl>(D->getCanonicalDecl()), + GD.getDtorType()); + BuildThunksForVirtual(CanonGD); + } else { + BuildThunksForVirtual(MD->getCanonicalDecl()); + } } } |