diff options
author | Zachary Turner <zturner@google.com> | 2016-09-21 16:01:28 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-09-21 16:01:28 +0000 |
commit | 95eae4235d4cfa5cee67ab6c4e686baf8a57e9e5 (patch) | |
tree | 0e9d2a42e76e13cf5ed5d6a8f0b935a83e40ea69 /lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp | |
parent | 07171f21d148d340115ec634be6a7f296799517d (diff) | |
download | bcm5719-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/BreakpointResolverFileRegex.cpp')
-rw-r--r-- | lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp index 780817d2c24..86552969b95 100644 --- a/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp +++ b/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp @@ -1,5 +1,4 @@ -//===-- BreakpointResolverFileRegex.cpp --------------------------*- C++ -//-*-===// +//===-- BreakpointResolverFileRegex.cpp -------------------------*- C++-*-===// // // The LLVM Compiler Infrastructure // @@ -48,7 +47,7 @@ BreakpointResolver *BreakpointResolverFileRegex::CreateFromStructuredData( error.SetErrorString("BRFR::CFSD: Couldn't find regex entry."); return nullptr; } - RegularExpression regex(regex_string.c_str()); + RegularExpression regex(regex_string); bool exact_match; success = options_dict.GetValueForKeyAsBoolean( @@ -163,8 +162,8 @@ Searcher::Depth BreakpointResolverFileRegex::GetDepth() { } void BreakpointResolverFileRegex::GetDescription(Stream *s) { - s->Printf("source regex = \"%s\", exact_match = %d", m_regex.GetText(), - m_exact_match); + s->Printf("source regex = \"%s\", exact_match = %d", + m_regex.GetText().str().c_str(), m_exact_match); } void BreakpointResolverFileRegex::Dump(Stream *s) const {} |