summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/GlobalDCE.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-01-07 18:45:53 +0000
committerDuncan Sands <baldrick@free.fr>2009-01-07 18:45:53 +0000
commit187c5716b6dd20ba96a6725dab9fa893911e522a (patch)
treee788c3a56bb800639d70eadb5f6d7cf4d56659aa /llvm/lib/Transforms/IPO/GlobalDCE.cpp
parent7792e90f83179f6831dff131df3b763e0a298ad7 (diff)
downloadbcm5719-llvm-187c5716b6dd20ba96a6725dab9fa893911e522a.tar.gz
bcm5719-llvm-187c5716b6dd20ba96a6725dab9fa893911e522a.zip
The verifier checks that the aliasee is not null.
llvm-svn: 61870
Diffstat (limited to 'llvm/lib/Transforms/IPO/GlobalDCE.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalDCE.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalDCE.cpp b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
index 654a5095d06..a9c9ec0fd84 100644
--- a/llvm/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
@@ -161,8 +161,7 @@ void GlobalDCE::GlobalIsNeeded(GlobalValue *G) {
MarkUsedGlobalsAsNeeded(GV->getInitializer());
} else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(G)) {
// The target of a global alias is needed.
- if (Constant *Aliasee = GA->getAliasee())
- MarkUsedGlobalsAsNeeded(Aliasee);
+ MarkUsedGlobalsAsNeeded(GA->getAliasee());
} else {
// Otherwise this must be a function object. We have to scan the body of
// the function looking for constants and global values which are used as
OpenPOWER on IntegriCloud