summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint/BreakpointResolverName.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-09-21 16:01:28 +0000
committerZachary Turner <zturner@google.com>2016-09-21 16:01:28 +0000
commit95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5 (patch)
tree0e9d2a42e76e13cf5ed5d6a8f0b935a83e40ea69 /lldb/source/Breakpoint/BreakpointResolverName.cpp
parent07171f21d148d340115ec634be6a7f296799517d (diff)
downloadbcm5719-llvm-95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5.tar.gz
bcm5719-llvm-95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5.zip
Make lldb::Regex use StringRef.
This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
Diffstat (limited to 'lldb/source/Breakpoint/BreakpointResolverName.cpp')
-rw-r--r--lldb/source/Breakpoint/BreakpointResolverName.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp
index 39c9f20d69d..6cc8f60dbc0 100644
--- a/lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -35,7 +35,7 @@ BreakpointResolverName::BreakpointResolverName(
m_class_name(), m_regex(), m_match_type(type), m_language(language),
m_skip_prologue(skip_prologue) {
if (m_match_type == Breakpoint::Regexp) {
- if (!m_regex.Compile(name_cstr)) {
+ if (!m_regex.Compile(llvm::StringRef::withNullAsEmpty(name_cstr))) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
if (log)
@@ -126,7 +126,7 @@ BreakpointResolver *BreakpointResolverName::CreateFromStructuredData(
success = options_dict.GetValueForKeyAsString(
GetKey(OptionNames::RegexString), regex_text);
if (success) {
- RegularExpression regex(regex_text.c_str());
+ RegularExpression regex(regex_text);
return new BreakpointResolverName(bkpt, regex, language, offset,
skip_prologue);
} else {
@@ -395,7 +395,7 @@ Searcher::Depth BreakpointResolverName::GetDepth() {
void BreakpointResolverName::GetDescription(Stream *s) {
if (m_match_type == Breakpoint::Regexp)
- s->Printf("regex = '%s'", m_regex.GetText());
+ s->Printf("regex = '%s'", m_regex.GetText().str().c_str());
else {
size_t num_names = m_lookups.size();
if (num_names == 1)
OpenPOWER on IntegriCloud