forked from OSchip/llvm-project
Fix isDiscardableIfUnused to include available_externally linkage.
AvailableExternally functions are discardable. llvm-svn: 247044
This commit is contained in:
parent
1854927556
commit
80d5569dba
|
@ -236,7 +236,8 @@ public:
|
|||
/// Whether the definition of this global may be discarded if it is not used
|
||||
/// in its compilation unit.
|
||||
static bool isDiscardableIfUnused(LinkageTypes Linkage) {
|
||||
return isLinkOnceLinkage(Linkage) || isLocalLinkage(Linkage);
|
||||
return isLinkOnceLinkage(Linkage) || isLocalLinkage(Linkage) ||
|
||||
isAvailableExternallyLinkage(Linkage);
|
||||
}
|
||||
|
||||
/// Whether the definition of this global may be replaced by something
|
||||
|
|
Loading…
Reference in New Issue