summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorXin Tong <trent.xin.tong@gmail.com>2018-09-20 21:16:16 +0000
committerXin Tong <trent.xin.tong@gmail.com>2018-09-20 21:16:16 +0000
commit9b7e45159fca266d2207df694dc62210e658f9cc (patch)
tree185acc3c2369961e9501c5949cee98ab9c7a8bfa /llvm/lib/Transforms
parent18c29b7d7439883fc7237798559ed2230228573c (diff)
downloadbcm5719-llvm-9b7e45159fca266d2207df694dc62210e658f9cc.tar.gz
bcm5719-llvm-9b7e45159fca266d2207df694dc62210e658f9cc.zip
[GlobalDCE] AvailableExternal linkage is checked in isDiscardableIfUnused [NFC].
Summary: AvailableExternal was not handled in isDiscardableIfUnused when isDiscardableIfUnused was added in r158476. Till it was handled in r247044. This is a NFC. Reviewers: pcc, tejohnson Reviewed By: tejohnson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52319 llvm-svn: 342684
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalDCE.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalDCE.cpp b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
index ada9eb80e68..c77ea04102c 100644
--- a/llvm/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
@@ -165,7 +165,7 @@ PreservedAnalyses GlobalDCEPass::run(Module &M, ModuleAnalysisManager &MAM) {
// Functions with external linkage are needed if they have a body.
// Externally visible & appending globals are needed, if they have an
// initializer.
- if (!GO.isDeclaration() && !GO.hasAvailableExternallyLinkage())
+ if (!GO.isDeclaration())
if (!GO.isDiscardableIfUnused())
MarkLive(GO);
OpenPOWER on IntegriCloud