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:
Chris Lattner 2004-10-08 22:05:31 +00:00
parent a4be1dc0a1
commit 8f57e9c083

View File

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