diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-02 08:54:30 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-02 08:54:30 +0000 |
| commit | 104bd8179fb5f6551c65c94ebcd0a4918b060189 (patch) | |
| tree | cf5763d092b81cecc168fa28032247ee495d06e2 /lib/VMCore/ValueSymbolTable.cpp | |
| parent | 2f12f10af369d468b14617276446166383d692ed (diff) | |
Notes
Diffstat (limited to 'lib/VMCore/ValueSymbolTable.cpp')
| -rw-r--r-- | lib/VMCore/ValueSymbolTable.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/VMCore/ValueSymbolTable.cpp b/lib/VMCore/ValueSymbolTable.cpp index d30a9d6e37b3..449d61a2cbb1 100644 --- a/lib/VMCore/ValueSymbolTable.cpp +++ b/lib/VMCore/ValueSymbolTable.cpp @@ -55,9 +55,7 @@ void ValueSymbolTable::reinsertValue(Value* V) { raw_svector_ostream(UniqueName) << ++LastUnique; // Try insert the vmap entry with this suffix. - ValueName &NewName = - vmap.GetOrCreateValue(StringRef(UniqueName.data(), - UniqueName.size())); + ValueName &NewName = vmap.GetOrCreateValue(UniqueName); if (NewName.getValue() == 0) { // Newly inserted name. Success! NewName.setValue(V); @@ -88,7 +86,7 @@ ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) { } // Otherwise, there is a naming conflict. Rename this value. - SmallString<128> UniqueName(Name.begin(), Name.end()); + SmallString<256> UniqueName(Name.begin(), Name.end()); while (1) { // Trim any suffix off and append the next number. @@ -96,9 +94,7 @@ ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) { raw_svector_ostream(UniqueName) << ++LastUnique; // Try insert the vmap entry with this suffix. - ValueName &NewName = - vmap.GetOrCreateValue(StringRef(UniqueName.data(), - UniqueName.size())); + ValueName &NewName = vmap.GetOrCreateValue(UniqueName); if (NewName.getValue() == 0) { // Newly inserted name. Success! NewName.setValue(V); |
