llvm.org GIT mirror llvm / c7e175a
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 Duncan P. N. Exon Smith 6 years ago
1 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
603603
604604 // Compute the visibility. We follow the rules in the System V Application
605605 // Binary Interface.
606 assert(!GlobalValue::isLocalLinkage(LT) &&
607 "Symbols with local linkage should not be merged");
606608 Vis = isLessConstraining(Src->getVisibility(), Dest->getVisibility()) ?
607609 Dest->getVisibility() : Src->getVisibility();
608610 return false;