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
This commit is contained in:
John Criswell 2004-05-27 21:16:46 +00:00
parent 1fc3739560
commit e7b9a1a5f2

View File

@ -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 {