summaryrefslogtreecommitdiff
path: root/lib
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
commitb18715acb5fbc00f6662718f219cdb94c060efb5 (patch)
treee437e65a51cd8505bc957e6c31a62dafb7ff082a /lib
parentd2fa781169175b827e50953a1d0b7edc6b0c4801 (diff)
downloadllvm-b18715acb5fbc00f6662718f219cdb94c060efb5.tar.gz
llvm-b18715acb5fbc00f6662718f219cdb94c060efb5.tar.bz2
llvm-b18715acb5fbc00f6662718f219cdb94c060efb5.tar.xz
The verifier checks that the aliasee is not null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp
index 654a5095d0..a9c9ec0fd8 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/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