diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-29 16:26:49 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-10-29 16:56:59 -0700 |
commit | 5cc2e0651fed7764f02421db1ba1719a10f17d25 (patch) | |
tree | 8d4ca89d3759503cdf0166c4ba6bc513c5939475 /lldb/packages/Python/lldbsuite | |
parent | 2b0b84108320703efc7b300afbaaf1e688a6ea58 (diff) | |
download | bcm5719-llvm-5cc2e0651fed7764f02421db1ba1719a10f17d25.tar.gz bcm5719-llvm-5cc2e0651fed7764f02421db1ba1719a10f17d25.zip |
[lldbsuite] Remove unused support files
To the best of my understanding these files or their content is nowhere
referenced.
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/support/fs.py | 64 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/support/sockutil.py | 23 |
2 files changed, 0 insertions, 87 deletions
diff --git a/lldb/packages/Python/lldbsuite/support/fs.py b/lldb/packages/Python/lldbsuite/support/fs.py deleted file mode 100644 index 71394f03ac3..00000000000 --- a/lldb/packages/Python/lldbsuite/support/fs.py +++ /dev/null @@ -1,64 +0,0 @@ -""" -Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -See https://llvm.org/LICENSE.txt for license information. -SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -Prepares language bindings for LLDB build process. Run with --help -to see a description of the supported command line arguments. -""" - -# Python modules: -import os -import platform -import sys - - -def _find_file_in_paths(paths, exe_basename): - """Returns the full exe path for the first path match. - - @params paths the list of directories to search for the exe_basename - executable - @params exe_basename the name of the file for which to search. - e.g. "swig" or "swig.exe". - - @return the full path to the executable if found in one of the - given paths; otherwise, returns None. - """ - for path in paths: - trial_exe_path = os.path.join(path, exe_basename) - if os.path.exists(trial_exe_path): - return os.path.normcase(trial_exe_path) - return None - - -def find_executable(executable): - """Finds the specified executable in the PATH or known good locations.""" - - # Figure out what we're looking for. - if platform.system() == "Windows": - executable = executable + ".exe" - extra_dirs = [] - else: - extra_dirs = ["/usr/local/bin"] - - # Figure out what paths to check. - path_env = os.environ.get("PATH", None) - if path_env is not None: - paths_to_check = path_env.split(os.path.pathsep) - else: - paths_to_check = [] - - # Add in the extra dirs - paths_to_check.extend(extra_dirs) - if len(paths_to_check) < 1: - raise os.OSError( - "executable was not specified, PATH has no " - "contents, and there are no extra directories to search") - - result = _find_file_in_paths(paths_to_check, executable) - - if not result or len(result) < 1: - raise os.OSError( - "failed to find exe='%s' in paths='%s'" % - (executable, paths_to_check)) - return result diff --git a/lldb/packages/Python/lldbsuite/support/sockutil.py b/lldb/packages/Python/lldbsuite/support/sockutil.py deleted file mode 100644 index 56a9ed8bd79..00000000000 --- a/lldb/packages/Python/lldbsuite/support/sockutil.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -See https://llvm.org/LICENSE.txt for license information. -SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -Helper functions for working with sockets. -""" - -# Python modules: -import io -import socket - -# LLDB modules -import use_lldb_suite - - -def recvall(sock, size): - bytes = io.BytesIO() - while size > 0: - this_result = sock.recv(size) - bytes.write(this_result) - size -= len(this_result) - return bytes.getvalue() |