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
5470e0c7e1
commit
7688bed4ff
|
@ -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…
Reference in New Issue