mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Use methods that are more explanatory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b38e4fd8b0
commit
66c25ff438
@ -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…
x
Reference in New Issue
Block a user