[Lldb-commits] [lldb] r222370 - Fix broken build after removing StringMap::GetOrCreateValue in favor of StringMap::insert.
Oleksiy Vyalov
ovyalov at google.com
Wed Nov 19 09:24:58 PST 2014
Author: ovyalov
Date: Wed Nov 19 11:24:58 2014
New Revision: 222370
URL: http://llvm.org/viewvc/llvm-project?rev=222370&view=rev
Log:
Fix broken build after removing StringMap::GetOrCreateValue in favor of StringMap::insert.
Modified:
lldb/trunk/source/Core/ConstString.cpp
Modified: lldb/trunk/source/Core/ConstString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConstString.cpp?rev=222370&r1=222369&r2=222370&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConstString.cpp (original)
+++ lldb/trunk/source/Core/ConstString.cpp Wed Nov 19 11:24:58 2014
@@ -93,7 +93,7 @@ public:
{
Mutex::Locker locker (m_mutex);
llvm::StringRef string_ref (cstr, cstr_len);
- StringPoolEntryType& entry = m_string_map.GetOrCreateValue (string_ref, (StringPoolValueType)NULL);
+ StringPoolEntryType& entry = *m_string_map.insert (std::make_pair (string_ref, (StringPoolValueType)NULL)).first;
return entry.getKeyData();
}
return NULL;
@@ -105,7 +105,7 @@ public:
if (string_ref.data())
{
Mutex::Locker locker (m_mutex);
- StringPoolEntryType& entry = m_string_map.GetOrCreateValue (string_ref, (StringPoolValueType)NULL);
+ StringPoolEntryType& entry = *m_string_map.insert (std::make_pair (string_ref, (StringPoolValueType)NULL)).first;
return entry.getKeyData();
}
return NULL;
@@ -118,7 +118,7 @@ public:
{
Mutex::Locker locker (m_mutex);
// Make string pool entry with the mangled counterpart already set
- StringPoolEntryType& entry = m_string_map.GetOrCreateValue (llvm::StringRef (demangled_cstr), mangled_ccstr);
+ StringPoolEntryType& entry = *m_string_map.insert (std::make_pair (llvm::StringRef (demangled_cstr), mangled_ccstr)).first;
// Extract the const version of the demangled_cstr
const char *demangled_ccstr = entry.getKeyData();
More information about the lldb-commits
mailing list