diff options
author | Chris Lattner <sabre@nondot.org> | 2005-10-31 18:42:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-10-31 18:42:37 +0000 |
commit | 71d73eb4118205de0b9f57f643782ecac9450431 (patch) | |
tree | 0baa3456eea98be4f4ebee9a8fd17232a4fc190e | |
parent | 09efd4e5b657aea065b116171550b5c0e889af18 (diff) | |
download | llvm-71d73eb4118205de0b9f57f643782ecac9450431.zip llvm-71d73eb4118205de0b9f57f643782ecac9450431.tar.gz llvm-71d73eb4118205de0b9f57f643782ecac9450431.tar.bz2 |
Fix an iterator invalidation problem in code used by the -strip pass
llvm-svn: 24124
-rw-r--r-- | llvm/lib/VMCore/SymbolTable.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<GlobalValue>(V) || cast<GlobalValue>(V)->hasInternalLinkage()) { // Set name to "", removing from symbol table! V->setName(""); RemovedSymbol = true; } - ++B; } } |