From 1b032f59e751fceaa67042d364c4f549d3d05a68 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 6 Mar 2005 05:42:36 +0000 Subject: [PATCH] Make this MUCH faster by avoiding a linear search in the symbol table code. llvm-svn: 20479 --- llvm/lib/Transforms/IPO/DeadTypeElimination.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp b/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp index 9b1a919465c5..b3a439e14873 100644 --- a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/llvm/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 {