mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Pull in r203007 from upstream clang trunk:
Don't produce an alias between destructors with different calling conventions. Fixes pr19007. (Please note that is an LLVM PR identifier, not a FreeBSD one.) This should fix Firefox and/or libxul crashes (due to problems with regparm/stdcall calling conventions) on i386. Reported by: multiple users on freebsd-current PR: bin/187103 MFC after: 1 week
This commit is contained in:
parent
256ea2aba9
commit
689f150570
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=262809
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user