summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint/BreakpointResolverName.cpp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2019-08-20 09:24:20 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2019-08-20 09:24:20 +0000
commitf9d90bc5f690de43cbfd8bd15f6f3d3e01471615 (patch)
tree3c62c4c7ea05d724f34236e40c08bf1526f0d5ac /lldb/source/Breakpoint/BreakpointResolverName.cpp
parent12d83b427015083f40964c706a5b9e428d9d88df (diff)
downloadbcm5719-llvm-f9d90bc5f690de43cbfd8bd15f6f3d3e01471615.tar.gz
bcm5719-llvm-f9d90bc5f690de43cbfd8bd15f6f3d3e01471615.zip
[lldb] D66174 `RegularExpression` cleanup
I find as a good cleanup to drop the Compile method. As I do not find TIMTOWTDI as an advantage and there is already constructor parameter to compile the regex. Differential Revision: https://reviews.llvm.org/D66392 llvm-svn: 369352
Diffstat (limited to 'lldb/source/Breakpoint/BreakpointResolverName.cpp')
-rw-r--r--lldb/source/Breakpoint/BreakpointResolverName.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp b/lldb/source/Breakpoint/BreakpointResolverName.cpp
index b18c1c46be1..e63661d1c01 100644
--- a/lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -31,7 +31,8 @@ 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(llvm::StringRef::withNullAsEmpty(name_cstr))) {
+ m_regex = RegularExpression(llvm::StringRef::withNullAsEmpty(name_cstr));
+ if (!m_regex.IsValid()) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
if (log)
OpenPOWER on IntegriCloud