mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +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:
@@ -105,7 +105,7 @@ bool GlobalDCE::RemoveIfDead(GlobalValue *GV) {
|
|||||||
// Eliminate all global variables that are unused, and that are internal, or
|
// Eliminate all global variables that are unused, and that are internal, or
|
||||||
// do not have an initializer.
|
// do not have an initializer.
|
||||||
//
|
//
|
||||||
if (!GVar->hasExternalLinkage() || !GVar->hasInitializer()) {
|
if (GVar->hasInternalLinkage() || GVar->isExternal()) {
|
||||||
Constant *Init = GVar->hasInitializer() ? GVar->getInitializer() : 0;
|
Constant *Init = GVar->hasInitializer() ? GVar->getInitializer() : 0;
|
||||||
GV->getParent()->getGlobalList().erase(GVar);
|
GV->getParent()->getGlobalList().erase(GVar);
|
||||||
++NumVariables;
|
++NumVariables;
|
||||||
|
Reference in New Issue
Block a user