aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/IPO/DeadTypeElimination.cpp2
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 {