forked from OSchip/llvm-project
Make this MUCH faster by avoiding a linear search in the symbol table code.
llvm-svn: 20479
This commit is contained in:
parent
bcd8393d50
commit
1b032f59e7
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue