From 306f6fefc949c210f1d6594061e34a0d910ba716 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 31 Oct 2005 18:42:37 +0000 Subject: [PATCH] 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 --- lib/VMCore/SymbolTable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/VMCore/SymbolTable.cpp b/lib/VMCore/SymbolTable.cpp index 3290fbd37a7..3ac8ddfc6ad 100644 --- a/lib/VMCore/SymbolTable.cpp +++ b/lib/VMCore/SymbolTable.cpp @@ -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(V) || cast(V)->hasInternalLinkage()) { // Set name to "", removing from symbol table! V->setName(""); RemovedSymbol = true; } - ++B; } }