summaryrefslogtreecommitdiffstats
path: root/lldb/examples/synthetic/gnu_libstdcpp.py
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-26 16:51:36 +0000
committerZachary Turner <zturner@google.com>2015-10-26 16:51:36 +0000
commitb2662a27ec3a903d66530ea06c74234c3524e0be (patch)
tree6c247b5e4bb2ee189428167a022a192834bfeb76 /lldb/examples/synthetic/gnu_libstdcpp.py
parent598c661d404f43d0f0a727d0ca9c3be20e902ce6 (diff)
downloadbcm5719-llvm-b2662a27ec3a903d66530ea06c74234c3524e0be.tar.gz
bcm5719-llvm-b2662a27ec3a903d66530ea06c74234c3524e0be.zip
Fix tabs and spaces in one of the python files.
llvm-svn: 251308
Diffstat (limited to 'lldb/examples/synthetic/gnu_libstdcpp.py')
-rw-r--r--lldb/examples/synthetic/gnu_libstdcpp.py30
1 files changed, 14 insertions, 16 deletions
diff --git a/lldb/examples/synthetic/gnu_libstdcpp.py b/lldb/examples/synthetic/gnu_libstdcpp.py
index 0daa95f36d0..b6bf42235ac 100644
--- a/lldb/examples/synthetic/gnu_libstdcpp.py
+++ b/lldb/examples/synthetic/gnu_libstdcpp.py
@@ -22,19 +22,17 @@ class StdListSynthProvider:
def is_valid(self,node):
logger = lldb.formatters.Logger.Logger()
valid = self.value(self.next_node(node)) != self.node_address
- if valid:
- logger >> "%s is valid" % str(self.valobj.GetName())
- else:
- logger >> "synthetic value is not valid"
- return valid
+ if valid:
+ logger >> "%s is valid" % str(self.valobj.GetName())
+ else:
+ logger >> "synthetic value is not valid"
+ return valid
def value(self,node):
logger = lldb.formatters.Logger.Logger()
- value = node.GetValueAsUnsigned()
- logger >> "synthetic value for {}: {}".format(
- str(self.valobj.GetName()),
- value)
- return value
+ value = node.GetValueAsUnsigned()
+ logger >> "synthetic value for {}: {}".format(str(self.valobj.GetName()), value)
+ return value
# Floyd's cycle-finding algorithm
# try to detect if this list has a loop
@@ -59,12 +57,12 @@ class StdListSynthProvider:
def num_children(self):
logger = lldb.formatters.Logger.Logger()
if self.count is None:
- # libstdc++ 6.0.21 added dedicated count field.
- count_child = self.node.GetChildMemberWithName('_M_data')
- if count_child and count_child.IsValid():
- self.count = count_child.GetValueAsUnsigned(0)
- if self.count is None:
- self.count = self.num_children_impl()
+ # libstdc++ 6.0.21 added dedicated count field.
+ count_child = self.node.GetChildMemberWithName('_M_data')
+ if count_child and count_child.IsValid():
+ self.count = count_child.GetValueAsUnsigned(0)
+ if self.count is None:
+ self.count = self.num_children_impl()
return self.count
def num_children_impl(self):
OpenPOWER on IntegriCloud