From e7b9a1a5f2eeb370e4c642743ffb64230a05c56c Mon Sep 17 00:00:00 2001 From: John Criswell Date: Thu, 27 May 2004 21:16:46 +0000 Subject: [PATCH] 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 --- lib/Transforms/IPO/DeadTypeElimination.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp index 28e5dca9f0b..cad90f56729 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 {