Minor changes. Switch to a SymbolTable remove that does not take linear time

llvm-svn: 13874
This commit is contained in:
Chris Lattner 2004-05-28 05:30:51 +00:00
parent 5b7b6bbd38
commit c7e2ff2980
1 changed files with 2 additions and 2 deletions

View File

@ -226,7 +226,7 @@ bool CBackendNameAllUsedStructs::run(Module &M) {
// If this is not used, remove it from the symbol table.
std::set<const Type *>::iterator UTI = UT.find(STy);
if (UTI == UT.end())
MST.remove(I->first, (Type*)I->second);
MST.remove(I);
else
UT.erase(UTI);
}
@ -239,7 +239,7 @@ bool CBackendNameAllUsedStructs::run(Module &M) {
for (std::set<const Type *>::const_iterator I = UT.begin(), E = UT.end();
I != E; ++I)
if (const StructType *ST = dyn_cast<StructType>(*I)) {
((Value*)ST)->setName("unnamed", &MST);
const_cast<StructType*>(ST)->setName("unnamed", &MST);
Changed = true;
}
return Changed;