From 71d73eb4118205de0b9f57f643782ecac9450431 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 31 Oct 2005 18:42:37 +0000 Subject: Fix an iterator invalidation problem in code used by the -strip pass llvm-svn: 24124 --- llvm/lib/VMCore/SymbolTable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/VMCore/SymbolTable.cpp b/llvm/lib/VMCore/SymbolTable.cpp index 3290fbd..3ac8ddf 100644 --- a/llvm/lib/VMCore/SymbolTable.cpp +++ b/llvm/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; } } -- cgit v1.1