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

Chris Lattner lattner at cs.uiuc.edu
Wed Mar 15 11:22:53 PST 2006



Changes in directory llvm/lib/Transforms/IPO:

StripSymbols.cpp updated: 1.6 -> 1.7
---
Log message:

Teach the strip pass to strip type names in addition to value names.  This
is fallout from the type/value split in the symtab long long ago :)


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

 StripSymbols.cpp |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/lib/Transforms/IPO/StripSymbols.cpp
diff -u llvm/lib/Transforms/IPO/StripSymbols.cpp:1.6 llvm/lib/Transforms/IPO/StripSymbols.cpp:1.7
--- llvm/lib/Transforms/IPO/StripSymbols.cpp:1.6	Mon Mar 13 07:07:37 2006
+++ llvm/lib/Transforms/IPO/StripSymbols.cpp	Wed Mar 15 13:22:41 2006
@@ -84,6 +84,11 @@
         I->setName("");     // Internal symbols can't participate in linkage
       I->getSymbolTable().strip();
     }
+    
+    // Remove all names from types.
+    SymbolTable &SymTab = M.getSymbolTable();
+    while (SymTab.type_begin() != SymTab.type_end())
+      SymTab.remove(SymTab.type_begin());
   }
 
   // Strip debug info in the module if it exists.  To do this, we remove






More information about the llvm-commits mailing list