mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Fix an iterator invalidation problem in code used by the -strip pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
76ff2c7504
commit
306f6fefc9
@ -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…
Reference in New Issue
Block a user