[llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Oct 8 15:05:45 PDT 2004



Changes in directory llvm/lib/Transforms/IPO:

GlobalOpt.cpp updated: 1.15 -> 1.16
---
Log message:

If we found a dead global, we should at least delete it...


---
Diffs of the changes:  (+1 -0)

Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.15 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.16
--- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.15	Fri Oct  8 15:59:28 2004
+++ llvm/lib/Transforms/IPO/GlobalOpt.cpp	Fri Oct  8 17:05:31 2004
@@ -364,6 +364,7 @@
 
   if (GV->use_empty()) {
     DEBUG(std::cerr << "GLOBAL DEAD: " << *GV);
+    GV->getParent()->getGlobalList().erase(GV);
     ++NumDeleted;
     return true;
   }






More information about the llvm-commits mailing list