diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-05-11 18:26:10 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-05-11 18:26:10 +0000 |
| commit | f73d5f23a889b93d89ddef61ac0995df40286bb8 (patch) | |
| tree | c89fa0adefb99f464eba263b447f84c2ceb663ce /lib/CodeGen/CGCXX.cpp | |
| parent | 33fa48314f06936f83859852feb3c0ce68b08c0c (diff) | |
Vendor import of clang RELEASE_34/dot1-final tag r208032 (effectively, 3.4.1 release):vendor/clang/clang-release_34-r208032
Notes
svn path=/vendor/clang/dist/; revision=265891
svn path=/vendor/clang/clang-release_34-r208032/; revision=265892; tag=vendor/clang/clang-release_34-r208032
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
| -rw-r--r-- | lib/CodeGen/CGCXX.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index cfb2d6291b8a..2f8a17afbcd1 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -92,7 +92,13 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) { if (!ClassLayout.getBaseClassOffset(UniqueBase).isZero()) return true; + // Give up if the calling conventions don't match. We could update the call, + // but it is probably not worth it. const CXXDestructorDecl *BaseD = UniqueBase->getDestructor(); + if (BaseD->getType()->getAs<FunctionType>()->getCallConv() != + D->getType()->getAs<FunctionType>()->getCallConv()) + return true; + return TryEmitDefinitionAsAlias(GlobalDecl(D, Dtor_Base), GlobalDecl(BaseD, Dtor_Base), false); |
