projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4be1dc
)
If we found a dead global, we should at least delete it...
author
Chris Lattner
<sabre@nondot.org>
Fri, 8 Oct 2004 22:05:31 +0000
(22:05 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 8 Oct 2004 22:05:31 +0000
(22:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16858
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/GlobalOpt.cpp
b/lib/Transforms/IPO/GlobalOpt.cpp
index 5c460539e18fe584b2e6093fcb137471f8c4dc59..dcbd87d566604983513c665fcaef249d54ad6a36 100644
(file)
--- a/
lib/Transforms/IPO/GlobalOpt.cpp
+++ b/
lib/Transforms/IPO/GlobalOpt.cpp
@@
-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;
}