mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01: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. llvm-svn: 208262
This commit is contained in:
parent
9739ca9e59
commit
bba2550124
@ -604,6 +604,8 @@ bool ModuleLinker::getLinkageResult(GlobalValue *Dest, const GlobalValue *Src,
|
||||
|
||||
// Compute the visibility. We follow the rules in the System V Application
|
||||
// Binary Interface.
|
||||
assert(!GlobalValue::isLocalLinkage(LT) &&
|
||||
"Symbols with local linkage should not be merged");
|
||||
Vis = isLessConstraining(Src->getVisibility(), Dest->getVisibility()) ?
|
||||
Dest->getVisibility() : Src->getVisibility();
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user