summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-15 19:22:41 +0000
committerChris Lattner <sabre@nondot.org>2006-03-15 19:22:41 +0000
commit6d6084fd04cb3444c4447a6f5bdaec44de0efe05 (patch)
tree8f195fef531622957ccbe1dfe11f45df7e8cb7b6 /llvm/lib/Transforms/IPO
parent09ffafcf541982cc7ffd785562e9a07950569bd6 (diff)
downloadbcm5719-llvm-6d6084fd04cb3444c4447a6f5bdaec44de0efe05.tar.gz
bcm5719-llvm-6d6084fd04cb3444c4447a6f5bdaec44de0efe05.zip
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 :) llvm-svn: 26785
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/StripSymbols.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/StripSymbols.cpp b/llvm/lib/Transforms/IPO/StripSymbols.cpp
index fce787c78b5..1e51b9e84cf 100644
--- a/llvm/lib/Transforms/IPO/StripSymbols.cpp
+++ b/llvm/lib/Transforms/IPO/StripSymbols.cpp
@@ -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
OpenPOWER on IntegriCloud