summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2004-05-27 21:16:46 +0000
committerJohn Criswell <criswell@uiuc.edu>2004-05-27 21:16:46 +0000
commit37d2ae92a78974144afea580593bbdc7cfec6e9e (patch)
tree94616b238c36de7dea12d218087c115deb51c5dc /llvm/lib/Transforms
parentfc7509b7d4561abb9a3aa124473d09506b500a87 (diff)
downloadbcm5719-llvm-37d2ae92a78974144afea580593bbdc7cfec6e9e.tar.gz
bcm5719-llvm-37d2ae92a78974144afea580593bbdc7cfec6e9e.zip
Fix a bug in the -deadtypeelim pass. The SymbolTable re-write changed it
to eliminate the wrong type. llvm-svn: 13855
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/DeadTypeElimination.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp b/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp
index 28e5dca9f0b..cad90f56729 100644
--- a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp
+++ b/llvm/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 {
OpenPOWER on IntegriCloud