Fix tabs and spaces in one of the python files.

llvm-svn: 251308
This commit is contained in:
Zachary Turner 2015-10-26 16:51:36 +00:00
parent 598c661d40
commit b2662a27ec
1 changed files with 14 additions and 16 deletions

View File

@ -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):