Teach the strip pass to strip type names in addition to value names. This
authorChris Lattner <sabre@nondot.org>
Wed, 15 Mar 2006 19:22:41 +0000 (19:22 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 15 Mar 2006 19:22:41 +0000 (19:22 +0000)
is fallout from the type/value split in the symtab long long ago :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26785 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/StripSymbols.cpp

index fce787c78b56c308ed99083d3764e2f7ce1916c5..1e51b9e84cf60cd8cb2a67cbecf13eec6c4160f9 100644 (file)
@@ -84,6 +84,11 @@ bool StripSymbols::runOnModule(Module &M) {
         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