Make this MUCH faster by avoiding a linear search in the symbol table code.

llvm-svn: 20479
This commit is contained in:
Chris Lattner 2005-03-06 05:42:36 +00:00
parent bcd8393d50
commit 1b032f59e7
1 changed files with 1 additions and 2 deletions

View File

@ -80,8 +80,7 @@ bool DTE::runOnModule(Module &M) {
// the type is not used, remove it.
const Type *RHS = TI->second;
if (ShouldNukeSymtabEntry(RHS) || !UsedTypes.count(RHS)) {
SymbolTable::type_iterator ToRemove = TI++;
ST.remove(ToRemove->second);
ST.remove(TI++);
++NumKilled;
Changed = true;
} else {