Skip to content

Commit 71d73eb

Browse files
committed
Fix an iterator invalidation problem in code used by the -strip pass
llvm-svn: 24124
1 parent 09efd4e commit 71d73eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/VMCore/SymbolTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,12 @@ bool SymbolTable::strip() {
269269
value_iterator B = Plane.begin(), Bend = Plane.end();
270270
while (B != Bend) { // Found nonempty type plane!
271271
Value *V = B->second;
272+
++B;
272273
if (!isa<GlobalValue>(V) || cast<GlobalValue>(V)->hasInternalLinkage()) {
273274
// Set name to "", removing from symbol table!
274275
V->setName("");
275276
RemovedSymbol = true;
276277
}
277-
++B;
278278
}
279279
}
280280

0 commit comments

Comments
 (0)