summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-06 05:42:36 +0000
committerChris Lattner <sabre@nondot.org>2005-03-06 05:42:36 +0000
commit82aa566795fbcb42b6d606732a395595b54c0486 (patch)
tree459ca3da32af5ec11f28fa4096379bd185565dd5 /lib/Transforms
parentc9a33cefb8437309a7a8762013bad7f4bedb8c48 (diff)
downloadllvm-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.cpp3
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 {