summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-19 17:35:02 +0000
committerZachary Turner <zturner@google.com>2015-10-19 17:35:02 +0000
commit2adc80107a03b4e589b7ee46cdf5617b678fdc11 (patch)
tree35358adec0ac57a0976fb9e67f14560b96df93c9
parente24ad03ae62bc42bf86db9e90275dd0a17dc460c (diff)
downloadbcm5719-llvm-2adc80107a03b4e589b7ee46cdf5617b678fdc11.tar.gz
bcm5719-llvm-2adc80107a03b4e589b7ee46cdf5617b678fdc11.zip
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
-rw-r--r--lldb/examples/summaries/cocoa/metrics.py2
-rw-r--r--lldb/examples/synthetic/gnu_libstdcpp.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/lldb/examples/summaries/cocoa/metrics.py b/lldb/examples/summaries/cocoa/metrics.py
index f195498241d..6b82ff3b301 100644
--- a/lldb/examples/summaries/cocoa/metrics.py
+++ b/lldb/examples/summaries/cocoa/metrics.py
@@ -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:
diff --git a/lldb/examples/synthetic/gnu_libstdcpp.py b/lldb/examples/synthetic/gnu_libstdcpp.py
index cc205960506..8c11770899f 100644
--- a/lldb/examples/synthetic/gnu_libstdcpp.py
+++ b/lldb/examples/synthetic/gnu_libstdcpp.py
@@ -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)
OpenPOWER on IntegriCloud