Add a new scope type "LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN" for the

"linker_private_weak_auto_def" linkage type for LTO.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2010-09-27 20:17:45 +00:00
parent 3b9569e70d
commit 7afea0cfc4
2 changed files with 26 additions and 25 deletions

View File

@@ -327,24 +327,24 @@ void LTOModule::addDefinedSymbol(GlobalValue *def, Mangler &mangler,
// set definition part
if (def->hasWeakLinkage() || def->hasLinkOnceLinkage() ||
def->hasLinkerPrivateWeakLinkage() ||
def->hasLinkerPrivateWeakDefAutoLinkage()) {
def->hasLinkerPrivateWeakDefAutoLinkage())
attr |= LTO_SYMBOL_DEFINITION_WEAK;
}
else if (def->hasCommonLinkage()) {
else if (def->hasCommonLinkage())
attr |= LTO_SYMBOL_DEFINITION_TENTATIVE;
}
else {
else
attr |= LTO_SYMBOL_DEFINITION_REGULAR;
}
// set scope part
if (def->hasHiddenVisibility())
attr |= LTO_SYMBOL_SCOPE_HIDDEN;
else if (def->hasProtectedVisibility())
attr |= LTO_SYMBOL_SCOPE_PROTECTED;
else if (def->hasExternalLinkage() || def->hasWeakLinkage()
|| def->hasLinkOnceLinkage() || def->hasCommonLinkage())
else if (def->hasExternalLinkage() || def->hasWeakLinkage() ||
def->hasLinkOnceLinkage() || def->hasCommonLinkage() ||
def->hasLinkerPrivateWeakLinkage())
attr |= LTO_SYMBOL_SCOPE_DEFAULT;
else if (def->hasLinkerPrivateWeakDefAutoLinkage())
attr |= LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN;
else
attr |= LTO_SYMBOL_SCOPE_INTERNAL;