diff options
author | John Criswell <criswell@uiuc.edu> | 2004-05-27 21:16:46 +0000 |
---|---|---|
committer | John Criswell <criswell@uiuc.edu> | 2004-05-27 21:16:46 +0000 |
commit | e7b9a1a5f2eeb370e4c642743ffb64230a05c56c (patch) | |
tree | 8d5c21ef2326e78ea7dbea317fd8567d2bf80c75 | |
parent | 1fc37395607e374be50d09a89b63b2b318e653bf (diff) |
Fix a bug in the -deadtypeelim pass. The SymbolTable re-write changed it
to eliminate the wrong type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13855 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/IPO/DeadTypeElimination.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index 28e5dca9f0..cad90f5672 100644 --- a/lib/Transforms/IPO/DeadTypeElimination.cpp +++ b/lib/Transforms/IPO/DeadTypeElimination.cpp @@ -81,7 +81,7 @@ bool DTE::run(Module &M) { const Type *RHS = TI->second; if (ShouldNukeSymtabEntry(RHS) || !UsedTypes.count(RHS)) { SymbolTable::type_iterator ToRemove = TI++; - ST.remove(TI->second); + ST.remove(ToRemove->second); ++NumKilled; Changed = true; } else { |