From 82aa566795fbcb42b6d606732a395595b54c0486 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20479 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/DeadTypeElimination.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index 9b1a919465c..b3a439e1487 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 { -- 2.34.1