mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-20 11:29:24 +00:00
If we found a dead global, we should at least delete it...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a4be1dc0a1
commit
8f57e9c083
@ -364,6 +364,7 @@ static bool ProcessInternalGlobal(GlobalVariable *GV, Module::giterator &GVI) {
|
||||
|
||||
if (GV->use_empty()) {
|
||||
DEBUG(std::cerr << "GLOBAL DEAD: " << *GV);
|
||||
GV->getParent()->getGlobalList().erase(GV);
|
||||
++NumDeleted;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user