[Lldb-commits] [PATCH] D88910: [lldb][NFC] Remove property predicate matcher
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 13 08:09:49 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4cd873c4bd7f: [lldb][NFC] Remove property predicate matcher (authored by teemperor).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88910/new/
https://reviews.llvm.org/D88910
Files:
lldb/include/lldb/Interpreter/OptionValueProperties.h
lldb/source/Interpreter/OptionValueProperties.cpp
Index: lldb/source/Interpreter/OptionValueProperties.cpp
===================================================================
--- lldb/source/Interpreter/OptionValueProperties.cpp
+++ lldb/source/Interpreter/OptionValueProperties.cpp
@@ -147,38 +147,6 @@
}
return return_val_sp;
}
- case '{':
- // Predicate matching for predicates like
- // "<setting-name>{<predicate>}"
- // strings are parsed by the current OptionValueProperties subclass to mean
- // whatever they want to. For instance a subclass of OptionValueProperties
- // for a lldb_private::Target might implement: "target.run-
- // args{arch==i386}" -- only set run args if the arch is i386 "target
- // .run-args{path=/tmp/a/b/c/a.out}" -- only set run args if the path
- // matches "target.run-args{basename==test&&arch==x86_64}" -- only set run
- // args if executable basename is "test" and arch is "x86_64"
- if (sub_name[1]) {
- llvm::StringRef predicate_start = sub_name.drop_front();
- size_t pos = predicate_start.find('}');
- if (pos != llvm::StringRef::npos) {
- auto predicate = predicate_start.take_front(pos);
- auto rest = predicate_start.drop_front(pos);
- if (PredicateMatches(exe_ctx, predicate)) {
- if (!rest.empty()) {
- // Still more subvalue string to evaluate
- return value_sp->GetSubValue(exe_ctx, rest,
- will_modify, error);
- } else {
- // We have a match!
- break;
- }
- }
- }
- }
- // Predicate didn't match or wasn't correctly formed
- value_sp.reset();
- break;
-
case '[':
// Array or dictionary access for subvalues like: "[12]" -- access
// 12th array element "['hello']" -- dictionary access of key named hello
Index: lldb/include/lldb/Interpreter/OptionValueProperties.h
===================================================================
--- lldb/include/lldb/Interpreter/OptionValueProperties.h
+++ lldb/include/lldb/Interpreter/OptionValueProperties.h
@@ -104,11 +104,6 @@
Status SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op,
llvm::StringRef path, llvm::StringRef value) override;
- virtual bool PredicateMatches(const ExecutionContext *exe_ctx,
- llvm::StringRef predicate) const {
- return false;
- }
-
OptionValueArch *
GetPropertyAtIndexAsOptionValueArch(const ExecutionContext *exe_ctx,
uint32_t idx) const;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88910.297863.patch
Type: text/x-patch
Size: 2556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201013/0b80f97e/attachment.bin>
More information about the lldb-commits
mailing list