mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 16:35:10 +00:00
LinkOnce definitions have default scope, like weak definitions. Otherwise, the linker may not be able to match LinkOnce definition from one module with an exteranl reference from other module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53580 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5f2f218825
commit
f0d286b77f
@ -224,7 +224,8 @@ void LTOModule::addDefinedSymbol(GlobalValue* def, Mangler &mangler,
|
||||
// set scope part
|
||||
if ( def->hasHiddenVisibility() )
|
||||
attr |= LTO_SYMBOL_SCOPE_HIDDEN;
|
||||
else if ( def->hasExternalLinkage() || def->hasWeakLinkage() )
|
||||
else if ( def->hasExternalLinkage() || def->hasWeakLinkage()
|
||||
|| def->hasLinkOnceLinkage() )
|
||||
attr |= LTO_SYMBOL_SCOPE_DEFAULT;
|
||||
else
|
||||
attr |= LTO_SYMBOL_SCOPE_INTERNAL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user