We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 821d13c commit 52e5deeCopy full SHA for 52e5dee
llvm/lib/Transforms/IPO/GlobalDCE.cpp
@@ -161,7 +161,8 @@ void GlobalDCE::GlobalIsNeeded(GlobalValue *G) {
161
MarkUsedGlobalsAsNeeded(GV->getInitializer());
162
} else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(G)) {
163
// The target of a global alias is needed.
164
- MarkUsedGlobalsAsNeeded(GA->getAliasee());
+ if (Constant *Aliasee = GA->getAliasee())
165
+ MarkUsedGlobalsAsNeeded(Aliasee);
166
} else {
167
// Otherwise this must be a function object. We have to scan the body of
168
// the function looking for constants and global values which are used as
0 commit comments