Author: David Spickett Date: 2025-10-16T09:54:53Z New Revision: 7ab271cbd26c869e354fff9c921b30276a3fa974
URL: https://github.com/llvm/llvm-project/commit/7ab271cbd26c869e354fff9c921b30276a3fa974 DIFF: https://github.com/llvm/llvm-project/commit/7ab271cbd26c869e354fff9c921b30276a3fa974.diff LOG: [lldb][examples] Use Python3 versions of types module in performance.py 2.x had ListType and StringTypes (https://docs.python.org/2.7/library/types.html), 3.x removed these (https://docs.python.org/3.0/library/types.html). We can use "str" and "list" directly as in 3.x all strings are just "str", and ListType was always an alias to "list". Added: Modified: lldb/examples/python/performance.py Removed: ################################################################################ diff --git a/lldb/examples/python/performance.py b/lldb/examples/python/performance.py index b86b5a52522e0..c3181b61c84f7 100755 --- a/lldb/examples/python/performance.py +++ b/lldb/examples/python/performance.py @@ -16,7 +16,6 @@ import sys import subprocess import time -import types # ---------------------------------------------------------------------- # Code that auto imports LLDB @@ -121,19 +120,19 @@ def __init__( self.breakpoints.append(breakpoint) else: if module: - if isinstance(module, types.ListType): + if isinstance(module, list): for module_path in module: self.modules.Append(lldb.SBFileSpec(module_path, False)) - elif isinstance(module, types.StringTypes): + elif isinstance(module, str): self.modules.Append(lldb.SBFileSpec(module, False)) if name: # "file" can be a list or a string if file: - if isinstance(file, types.ListType): + if isinstance(file, list): self.files = lldb.SBFileSpecList() for f in file: self.files.Append(lldb.SBFileSpec(f, False)) - elif isinstance(file, types.StringTypes): + elif isinstance(file, str): self.files.Append(lldb.SBFileSpec(file, False)) self.breakpoints.append( self.target.BreakpointCreateByName(name, self.modules, self.files) _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
