1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

The verifier checks that the aliasee is not null.

llvm-svn: 61870
This commit is contained in:
Duncan Sands 2009-01-07 18:45:53 +00:00
parent 8adf14ea21
commit de5d7e1415

View File

@ -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