diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2019-08-20 09:24:20 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2019-08-20 09:24:20 +0000 |
commit | f9d90bc5f690de43cbfd8bd15f6f3d3e01471615 (patch) | |
tree | 3c62c4c7ea05d724f34236e40c08bf1526f0d5ac /lldb/source/Core/AddressResolverName.cpp | |
parent | 12d83b427015083f40964c706a5b9e428d9d88df (diff) | |
download | bcm5719-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/Core/AddressResolverName.cpp')
-rw-r--r-- | lldb/source/Core/AddressResolverName.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Core/AddressResolverName.cpp b/lldb/source/Core/AddressResolverName.cpp index 894b7612bb2..089f0da4400 100644 --- a/lldb/source/Core/AddressResolverName.cpp +++ b/lldb/source/Core/AddressResolverName.cpp @@ -36,7 +36,8 @@ AddressResolverName::AddressResolverName(const char *func_name, : AddressResolver(), m_func_name(func_name), m_class_name(nullptr), m_regex(), m_match_type(type) { if (m_match_type == AddressResolver::Regexp) { - if (!m_regex.Compile(m_func_name.GetStringRef())) { + m_regex = RegularExpression(m_func_name.GetStringRef()); + if (!m_regex.IsValid()) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS)); if (log) |