[llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalDCE.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 13 12:13:09 PDT 2002
Changes in directory llvm/lib/Transforms/IPO:
GlobalDCE.cpp updated: 1.22 -> 1.23
---
Log message:
Use methods that are more explanatory
---
Diffs of the changes:
Index: llvm/lib/Transforms/IPO/GlobalDCE.cpp
diff -u llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.22 llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.23
--- llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.22 Tue Oct 1 17:38:36 2002
+++ llvm/lib/Transforms/IPO/GlobalDCE.cpp Sun Oct 13 12:12:47 2002
@@ -105,7 +105,7 @@
// 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;
More information about the llvm-commits
mailing list