mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-17 02:38:16 +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.
llvm-svn: 53580
This commit is contained in:
parent
91029f36ff
commit
da53eaaea8
@ -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