summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/StripSymbols.cpp
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
commitb2f6c0075cc1aafce3c83a756242f148429ade0f (patch)
tree7360c394e4ff64f900bd654e8c94a795c489f25e /lib/Transforms/IPO/StripSymbols.cpp
parent0da3130a98645c323883faa879c2d6ad42cbee3d (diff)
downloadllvm-b2f6c0075cc1aafce3c83a756242f148429ade0f.tar.gz
llvm-b2f6c0075cc1aafce3c83a756242f148429ade0f.tar.bz2
llvm-b2f6c0075cc1aafce3c83a756242f148429ade0f.tar.xz
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 :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/StripSymbols.cpp')
-rw-r--r--lib/Transforms/IPO/StripSymbols.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp
index fce787c78b..1e51b9e84c 100644
--- a/lib/Transforms/IPO/StripSymbols.cpp
+++ b/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