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 | 1b032f59e751fceaa67042d364c4f549d3d05a68 (patch) | |
tree | 528fe2b48ce33896ae22f619a8234d2b295019ae /llvm/lib/Transforms | |
parent | bcd8393d50f60165b7b66a8d89eeda0e49734b9e (diff) | |
download | bcm5719-llvm-1b032f59e751fceaa67042d364c4f549d3d05a68.tar.gz bcm5719-llvm-1b032f59e751fceaa67042d364c4f549d3d05a68.zip |
Make this MUCH faster by avoiding a linear search in the symbol table code.
llvm-svn: 20479
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/DeadTypeElimination.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp b/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp index 9b1a919465c..b3a439e1487 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 { |