Add a (Python only) lldb.SBSyntheticValueProvider class to our API surface
On a suggestion from Jim Ingham, this class allows you to very easily define synthetic child providers that return a synthetic value (in the sense of r219330), but no children
Also, document this new feature in our www docs
llvm-svn: 219337
diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig
index 9e9feb8..a1d98de 100644
--- a/lldb/scripts/Python/python-extensions.swig
+++ b/lldb/scripts/Python/python-extensions.swig
@@ -1047,3 +1047,27 @@
def __neq__(self, other):
return not self.__eq__(other)
%}
+
+%pythoncode %{
+
+class SBSyntheticValueProvider(object):
+ def __init__(self,valobj):
+ pass
+
+ def num_children(self):
+ return 0
+
+ def get_child_index(self,name):
+ return None
+
+ def get_child_at_index(self,idx):
+ return None
+
+ def update(self):
+ pass
+
+ def has_children(self):
+ return False
+
+
+%}
\ No newline at end of file