Fix a bug in the -deadtypeelim pass. The SymbolTable re-write changed it

to eliminate the wrong type.

llvm-svn: 13855
This commit is contained in:
John Criswell 2004-05-27 21:16:46 +00:00
parent 91633c1b92
commit e56868d266

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 {