diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-06 05:42:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-06 05:42:36 +0000 |
commit | 82aa566795fbcb42b6d606732a395595b54c0486 (patch) | |
tree | 459ca3da32af5ec11f28fa4096379bd185565dd5 /lib/Transforms | |
parent | c9a33cefb8437309a7a8762013bad7f4bedb8c48 (diff) | |
download | llvm-82aa566795fbcb42b6d606732a395595b54c0486.tar.gz llvm-82aa566795fbcb42b6d606732a395595b54c0486.tar.bz2 llvm-82aa566795fbcb42b6d606732a395595b54c0486.tar.xz |
Make this MUCH faster by avoiding a linear search in the symbol table code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/DeadTypeElimination.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index 9b1a919465..b3a439e148 100644 --- a/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/lib/Transforms/IPO/DeadTypeElimination.cpp @@ -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 { |