[llvm-commits] CVS: llvm/lib/VMCore/SymbolTable.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 9 13:40:11 PST 2003
Changes in directory llvm/lib/VMCore:
SymbolTable.cpp updated: 1.37 -> 1.38
---
Log message:
Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
and wrote it up. Thanks!!
---
Diffs of the changes: (+2 -3)
Index: llvm/lib/VMCore/SymbolTable.cpp
diff -u llvm/lib/VMCore/SymbolTable.cpp:1.37 llvm/lib/VMCore/SymbolTable.cpp:1.38
--- llvm/lib/VMCore/SymbolTable.cpp:1.37 Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/SymbolTable.cpp Sun Nov 9 13:39:46 2003
@@ -61,11 +61,10 @@
if (I == end()) return BaseName;
std::string TryName = BaseName;
- unsigned Counter = 0;
type_iterator End = I->second.end();
- while (I->second.find(TryName) != End) // Loop until we find unoccupied
- TryName = BaseName + utostr(++Counter); // Name in the symbol table
+ while (I->second.find(TryName) != End) // Loop until we find a free
+ TryName = BaseName + utostr(++LastUnique); // name in the symbol table
return TryName;
}
More information about the llvm-commits
mailing list