Py3'ify some of the examples that get run at startup.

Even though these are under examples/, they actually get loaded
when LLDB starts up during initialization of ScriptInterpreterPython.
There's obviously some kind of layering issue here (and comments
in the code even point to that as well), but for now just make them
py3 compatible.

llvm-svn: 250710
This commit is contained in:
Zachary Turner 2015-10-19 17:35:02 +00:00
parent e24ad03ae6
commit 2adc80107a
2 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@ class TimeMetrics:
def __exit__(self, a,b,c):
self.exit_time = time.clock()
print "It took " + str(self.exit_time - self.enter_time) + " time units to run through " + self.function + self.label
print("It took " + str(self.exit_time - self.enter_time) + " time units to run through " + self.function + self.label)
return False
class Counter:

View File

@ -137,11 +137,11 @@ class StdVectorSynthProvider:
self.count = None
def num_children(self):
if self.count == None:
self.count = self.num_children_impl()
return self.count
if self.count == None:
self.count = self.num_children_impl()
return self.count
def num_children_impl(self):
def num_children_impl(self):
try:
start_val = self.start.GetValueAsUnsigned(0)
finish_val = self.finish.GetValueAsUnsigned(0)