summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ConstString.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/ConstString.cpp')
-rw-r--r--lldb/source/Core/ConstString.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Core/ConstString.cpp b/lldb/source/Core/ConstString.cpp
index 720514bd52c..d82bc61fa91 100644
--- a/lldb/source/Core/ConstString.cpp
+++ b/lldb/source/Core/ConstString.cpp
@@ -100,6 +100,18 @@ public:
}
const char *
+ GetConstCStringWithStringRef (const llvm::StringRef &string_ref)
+ {
+ if (string_ref.data())
+ {
+ Mutex::Locker locker (m_mutex);
+ StringPoolEntryType& entry = m_string_map.GetOrCreateValue (string_ref, (StringPoolValueType)NULL);
+ return entry.getKeyData();
+ }
+ return NULL;
+ }
+
+ const char *
GetConstCStringAndSetMangledCounterPart (const char *demangled_cstr, const char *mangled_ccstr)
{
if (demangled_cstr)
OpenPOWER on IntegriCloud