mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Use methods that are more explanatory
llvm-svn: 4142
This commit is contained in:
parent
8447baa002
commit
721a5fac62
@ -105,7 +105,7 @@ bool GlobalDCE::RemoveIfDead(GlobalValue *GV) {
|
||||
// Eliminate all global variables that are unused, and that are internal, or
|
||||
// do not have an initializer.
|
||||
//
|
||||
if (!GVar->hasExternalLinkage() || !GVar->hasInitializer()) {
|
||||
if (GVar->hasInternalLinkage() || GVar->isExternal()) {
|
||||
Constant *Init = GVar->hasInitializer() ? GVar->getInitializer() : 0;
|
||||
GV->getParent()->getGlobalList().erase(GVar);
|
||||
++NumVariables;
|
||||
|
Loading…
Reference in New Issue
Block a user