mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Correctly merge available_externally and regular definitions when they have
different visibilities. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124650 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -434,8 +434,10 @@ static bool GetLinkageResult(GlobalValue *Dest, const GlobalValue *Src,
|
||||
}
|
||||
|
||||
// Check visibility
|
||||
if (Dest && Src->getVisibility() != Dest->getVisibility())
|
||||
if (!Src->isDeclaration() && !Dest->isDeclaration())
|
||||
if (Dest && Src->getVisibility() != Dest->getVisibility() &&
|
||||
!Src->isDeclaration() && !Dest->isDeclaration() &&
|
||||
!Src->hasAvailableExternallyLinkage() &&
|
||||
!Dest->hasAvailableExternallyLinkage())
|
||||
return Error(Err, "Linking globals named '" + Src->getName() +
|
||||
"': symbols have different visibilities!");
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user