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:
b38e4fd
)
Use methods that are more explanatory
author
Chris Lattner
<sabre@nondot.org>
Sun, 13 Oct 2002 17:12:47 +0000
(17:12 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 13 Oct 2002 17:12:47 +0000
(17:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4142
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/GlobalDCE.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/GlobalDCE.cpp
b/lib/Transforms/IPO/GlobalDCE.cpp
index 7c81f180bb34eeb3a8d938bc7d5f597acda0c231..55ef5d42207ecb2cfb3ae5e60ab108bc5fc728dc 100644
(file)
--- a/
lib/Transforms/IPO/GlobalDCE.cpp
+++ b/
lib/Transforms/IPO/GlobalDCE.cpp
@@
-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;