1
0
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:
Chris Lattner 2002-10-13 17:12:47 +00:00
parent 8447baa002
commit 721a5fac62

View File

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