mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
Minor changes. Switch to a SymbolTable remove that does not take linear time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13874 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eaca89b48e
commit
d06a549384
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user