[llvm-commits] [llvm] r53641 - /llvm/branches/Apple/Gaz/tools/lto/LTOModule.cpp
Devang Patel
dpatel at apple.com
Tue Jul 15 13:47:58 PDT 2008
Author: dpatel
Date: Tue Jul 15 15:47:58 2008
New Revision: 53641
URL: http://llvm.org/viewvc/llvm-project?rev=53641&view=rev
Log:
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.
Modified:
llvm/branches/Apple/Gaz/tools/lto/LTOModule.cpp
Modified: llvm/branches/Apple/Gaz/tools/lto/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Gaz/tools/lto/LTOModule.cpp?rev=53641&r1=53640&r2=53641&view=diff
==============================================================================
--- llvm/branches/Apple/Gaz/tools/lto/LTOModule.cpp (original)
+++ llvm/branches/Apple/Gaz/tools/lto/LTOModule.cpp Tue Jul 15 15:47:58 2008
@@ -224,7 +224,8 @@
// 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;
More information about the llvm-commits
mailing list