From 32811bef956e0fae4329e6515420d85f7e510660 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 17 Aug 2012 18:33:14 +0000 Subject: Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' to make it more consistent with its intended semantics. The `linker_private_weak_def_auto' linkage type was meant to automatically hide globals which never had their addresses taken. It has nothing to do with the `linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix among other things. The intended semantic is more like the `linkonce_odr' linkage type. Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore changing the semantics so that it produces the correct output for the linker. Note: The old linkage name `linker_private_weak_def_auto' will still parse but is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162114 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lto/LTOModule.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/lto') diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index c5b3d10db7..fa5f6b78db 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -487,8 +487,7 @@ void LTOModule::addDefinedSymbol(GlobalValue *def, bool isFunction) { // set definition part if (def->hasWeakLinkage() || def->hasLinkOnceLinkage() || - def->hasLinkerPrivateWeakLinkage() || - def->hasLinkerPrivateWeakDefAutoLinkage()) + def->hasLinkerPrivateWeakLinkage()) attr |= LTO_SYMBOL_DEFINITION_WEAK; else if (def->hasCommonLinkage()) attr |= LTO_SYMBOL_DEFINITION_TENTATIVE; @@ -504,7 +503,7 @@ void LTOModule::addDefinedSymbol(GlobalValue *def, bool isFunction) { def->hasLinkOnceLinkage() || def->hasCommonLinkage() || def->hasLinkerPrivateWeakLinkage()) attr |= LTO_SYMBOL_SCOPE_DEFAULT; - else if (def->hasLinkerPrivateWeakDefAutoLinkage()) + else if (def->hasLinkOnceODRAutoHideLinkage()) attr |= LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN; else attr |= LTO_SYMBOL_SCOPE_INTERNAL; -- cgit v1.2.3