summaryrefslogtreecommitdiff
path: root/lldb/bindings
diff options
context:
space:
mode:
authorJorge Gorbe Moya <jgorbe@google.com>2022-09-02 16:13:13 -0700
committerJorge Gorbe Moya <jgorbe@google.com>2022-09-13 12:50:55 -0700
commitef3fa232b338fd73475656ed61847295b0beef24 (patch)
treeee0681d912ea64977cde42a66f6208a01869be60 /lldb/bindings
parent2e8863b6a11f12d31490bc054da4d47c6adc8143 (diff)
downloadllvm-ef3fa232b338fd73475656ed61847295b0beef24.tar.gz
[Formatters][NFCI] Replace 'is_regex' arguments with an enum.
Modify `SBTypeNameSpecifier` and `lldb_private::TypeMatcher` so they have an enum value for the type of matching to perform instead of an `m_is_regex` boolean value. This change paves the way for introducing formatter matching based on the result of a python callback in addition to the existing name-based matching. See the RFC thread at https://discourse.llvm.org/t/rfc-python-callback-for-data-formatters-type-matching/64204 for more details. Differential Revision: https://reviews.llvm.org/D133240
Diffstat (limited to 'lldb/bindings')
-rw-r--r--lldb/bindings/interface/SBTypeNameSpecifier.i6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/bindings/interface/SBTypeNameSpecifier.i b/lldb/bindings/interface/SBTypeNameSpecifier.i
index 772f7c174093..4bd5f205cfbc 100644
--- a/lldb/bindings/interface/SBTypeNameSpecifier.i
+++ b/lldb/bindings/interface/SBTypeNameSpecifier.i
@@ -20,6 +20,9 @@ namespace lldb {
SBTypeNameSpecifier (const char* name,
bool is_regex = false);
+ SBTypeNameSpecifier (const char* name,
+ lldb::FormatterMatchType match_type);
+
SBTypeNameSpecifier (SBType type);
SBTypeNameSpecifier (const lldb::SBTypeNameSpecifier &rhs);
@@ -40,6 +43,9 @@ namespace lldb {
lldb::SBType
GetType ();
+ lldb::FormatterMatchType
+ GetMatchType();
+
bool
IsRegex();