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:
parent
f8e14244c3
commit
fd80437e76
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user