diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-06 07:24:44 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-06 07:24:44 +0000 |
commit | 78d033e086e19e016273de014f9214aa6f3f844b (patch) | |
tree | 3af27ec8e6611c9380be3b8ce3e643138488851c /lib/Transforms/IPO/StripSymbols.cpp | |
parent | f8383def5c31acfab4fd55c9fb395d417fd65c45 (diff) | |
download | llvm-78d033e086e19e016273de014f9214aa6f3f844b.tar.gz llvm-78d033e086e19e016273de014f9214aa6f3f844b.tar.bz2 llvm-78d033e086e19e016273de014f9214aa6f3f844b.tar.xz |
For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/StripSymbols.cpp')
-rw-r--r-- | lib/Transforms/IPO/StripSymbols.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp index 75b24a7282..12cd7fe893 100644 --- a/lib/Transforms/IPO/StripSymbols.cpp +++ b/lib/Transforms/IPO/StripSymbols.cpp @@ -29,6 +29,7 @@ #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/SymbolTable.h" +#include "llvm/TypeSymbolTable.h" using namespace llvm; namespace { @@ -83,13 +84,11 @@ bool StripSymbols::runOnModule(Module &M) { for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { if (I->hasInternalLinkage()) I->setName(""); // Internal symbols can't participate in linkage - I->getSymbolTable().strip(); + I->getValueSymbolTable().strip(); } // Remove all names from types. - SymbolTable &SymTab = M.getSymbolTable(); - while (SymTab.type_begin() != SymTab.type_end()) - SymTab.remove(SymTab.type_begin()); + M.getTypeSymbolTable().strip(); } // Strip debug info in the module if it exists. To do this, we remove |