diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-11-09 19:39:48 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-11-09 19:39:48 +0000 |
| commit | a570f7b6813cc76983ed128b1a645577e5965774 (patch) | |
| tree | 88eff020772226093d1450bc56ccb5d046151a2e /llvm/lib | |
| parent | da8571b464d949a5585de456e65be6300a5204d7 (diff) | |
| download | bcm5719-llvm-a570f7b6813cc76983ed128b1a645577e5965774.tar.gz bcm5719-llvm-a570f7b6813cc76983ed128b1a645577e5965774.zip | |
Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
and wrote it up. Thanks!!
llvm-svn: 9832
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/SymbolTable.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/SymbolTable.cpp b/llvm/lib/VMCore/SymbolTable.cpp index a6b9a0007b2..9452cdfec43 100644 --- a/llvm/lib/VMCore/SymbolTable.cpp +++ b/llvm/lib/VMCore/SymbolTable.cpp @@ -61,11 +61,10 @@ std::string SymbolTable::getUniqueName(const Type *Ty, 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; } |

