1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Fix an iterator invalidation problem in code used by the -strip pass

llvm-svn: 24124
This commit is contained in:
Chris Lattner 2005-10-31 18:42:37 +00:00
parent f8e14244c3
commit fd80437e76

View File

@ -269,12 +269,12 @@ bool SymbolTable::strip() {
value_iterator B = Plane.begin(), Bend = Plane.end();
while (B != Bend) { // Found nonempty type plane!
Value *V = B->second;
++B;
if (!isa<GlobalValue>(V) || cast<GlobalValue>(V)->hasInternalLinkage()) {
// Set name to "", removing from symbol table!
V->setName("");
RemovedSymbol = true;
}
++B;
}
}