diff options
Diffstat (limited to 'lldb/source/Core/ConstString.cpp')
-rw-r--r-- | lldb/source/Core/ConstString.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Core/ConstString.cpp b/lldb/source/Core/ConstString.cpp index ea8443467e5..720514bd52c 100644 --- a/lldb/source/Core/ConstString.cpp +++ b/lldb/source/Core/ConstString.cpp @@ -205,6 +205,11 @@ ConstString::ConstString (const char *cstr, size_t cstr_len) : { } +ConstString::ConstString (const llvm::StringRef &s) : + m_string (StringPool().GetConstCStringWithLength (s.data(), s.size())) +{ +} + bool ConstString::operator < (const ConstString& rhs) const { @@ -284,6 +289,12 @@ ConstString::SetCString (const char *cstr) } void +ConstString::SetString (const llvm::StringRef &s) +{ + m_string = StringPool().GetConstCStringWithLength (s.data(), s.size()); +} + +void ConstString::SetCStringWithMangledCounterpart (const char *demangled, const ConstString &mangled) { m_string = StringPool().GetConstCStringAndSetMangledCounterPart (demangled, mangled.m_string); |