mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 23:32:58 +00:00
LTO: Assert visibility of local linkage when merging symbols
`ModuleLinker::getLinkageResult()` shouldn't create symbols with local linkage and non-default visibility -- in fact, symbols with local linkage shouldn't be merged at all. Assert to that effect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83533dd617
commit
c7e175a743
@ -604,6 +604,8 @@ bool ModuleLinker::getLinkageResult(GlobalValue *Dest, const GlobalValue *Src,
|
|||||||
|
|
||||||
// Compute the visibility. We follow the rules in the System V Application
|
// Compute the visibility. We follow the rules in the System V Application
|
||||||
// Binary Interface.
|
// Binary Interface.
|
||||||
|
assert(!GlobalValue::isLocalLinkage(LT) &&
|
||||||
|
"Symbols with local linkage should not be merged");
|
||||||
Vis = isLessConstraining(Src->getVisibility(), Dest->getVisibility()) ?
|
Vis = isLessConstraining(Src->getVisibility(), Dest->getVisibility()) ?
|
||||||
Dest->getVisibility() : Src->getVisibility();
|
Dest->getVisibility() : Src->getVisibility();
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user