From b90028ad2a0b3d2f0c9d46acf8a16e376adb8412 Mon Sep 17 00:00:00 2001 From: LLVM Packaging Team Date: Mon, 27 Jun 2022 14:59:00 +0800 Subject: [PATCH] change all shebangs to Python3 find . -name "*.py" -exec sed "s|\!/usr/bin/env python$|\!/usr/bin/env python3|g" -i {} \; Gbp-Pq: Name python3-shebang.patch --- .../find-all-symbols/tool/run-find-all-symbols.py | 2 +- clang-tools-extra/clang-tidy/add_new_check.py | 2 +- clang-tools-extra/clang-tidy/rename_check.py | 2 +- clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py | 2 +- clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | 2 +- clang-tools-extra/clangd/include-mapping/cppreference_parser.py | 2 +- clang-tools-extra/clangd/include-mapping/gen_std.py | 2 +- clang-tools-extra/clangd/include-mapping/test.py | 2 +- clang-tools-extra/test/clang-tidy/check_clang_tidy.py | 2 +- clang/bindings/python/examples/cindex/cindex-dump.py | 2 +- clang/bindings/python/examples/cindex/cindex-includes.py | 2 +- clang/docs/tools/dump_ast_matchers.py | 2 +- clang/docs/tools/dump_format_style.py | 2 +- clang/test/AST/gen_ast_dump_json_test.py | 2 +- clang/tools/clang-format/clang-format-diff.py | 2 +- clang/tools/clang-format/git-clang-format | 2 +- clang/tools/scan-build-py/bin/analyze-build | 2 +- clang/tools/scan-build-py/bin/analyze-c++ | 2 +- clang/tools/scan-build-py/bin/analyze-cc | 2 +- clang/tools/scan-build-py/bin/intercept-build | 2 +- clang/tools/scan-build-py/bin/intercept-c++ | 2 +- clang/tools/scan-build-py/bin/intercept-cc | 2 +- clang/tools/scan-build-py/bin/scan-build | 2 +- clang/tools/scan-view/bin/scan-view | 2 +- clang/tools/scan-view/share/Reporter.py | 2 +- clang/tools/scan-view/share/startfile.py | 2 +- clang/utils/ABITest/ABITestGen.py | 2 +- clang/utils/CIndex/completion_logger_server.py | 2 +- clang/utils/CaptureCmd | 2 +- clang/utils/CmpDriver | 2 +- clang/utils/FindSpecRefs | 2 +- clang/utils/FuzzTest | 2 +- clang/utils/TestUtils/deep-stack.py | 2 +- clang/utils/analyzer/CmpRuns.py | 2 +- clang/utils/analyzer/SATestAdd.py | 2 +- clang/utils/analyzer/SATestBuild.py | 2 +- clang/utils/analyzer/SATestUpdateDiffs.py | 2 +- clang/utils/analyzer/SumTimerInfo.py | 2 +- clang/utils/analyzer/exploded-graph-rewriter.py | 2 +- clang/utils/check_cfc/check_cfc.py | 2 +- clang/utils/check_cfc/obj_diff.py | 2 +- clang/utils/check_cfc/test_check_cfc.py | 2 +- clang/utils/creduce-clang-crash.py | 2 +- clang/utils/hmaptool/hmaptool | 2 +- clang/utils/modfuzz.py | 2 +- clang/utils/token-delta.py | 2 +- compiler-rt/lib/asan/scripts/asan_symbolize.py | 2 +- compiler-rt/lib/dfsan/scripts/build-libc-list.py | 2 +- compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py | 2 +- compiler-rt/lib/sanitizer_common/scripts/cpplint.py | 2 +- compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py | 2 +- compiler-rt/lib/sanitizer_common/scripts/litlint.py | 2 +- compiler-rt/lib/sanitizer_common/scripts/sancov.py | 2 +- libcxx/utils/cat_files.py | 2 +- libcxx/utils/gen_link_script.py | 2 +- libcxx/utils/generate_feature_test_macro_components.py | 2 +- libcxx/utils/google-benchmark/mingw.py | 2 +- libcxx/utils/google-benchmark/tools/compare.py | 2 +- libcxx/utils/google-benchmark/tools/strip_asm.py | 2 +- libcxx/utils/merge_archives.py | 2 +- libcxx/utils/sym_diff.py | 2 +- libcxx/utils/sym_extract.py | 2 +- libcxx/utils/sym_match.py | 2 +- lld/utils/benchmark.py | 2 +- lldb/examples/python/file_extract.py | 2 +- lldb/lit/Quit/expect_exit_code.py | 2 +- lldb/lit/helper/build.py | 2 +- lldb/lldb.xcodeproj/project.pbxproj | 2 +- lldb/packages/Python/lldbsuite/test/attic/tester.py | 2 +- lldb/packages/Python/lldbsuite/test/bench.py | 2 +- .../Python/lldbsuite/test/issue_verification/disable.py | 2 +- .../packages/Python/lldbsuite/test/issue_verification/enable.py | 2 +- lldb/packages/Python/lldbsuite/test/redo.py | 2 +- .../packages/Python/lldbsuite/test/test_runner/test/inferior.py | 2 +- .../lldbsuite/test/test_runner/test/test_process_control.py | 2 +- lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py | 2 +- .../lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py | 2 +- lldb/scripts/Python/finish-swig-Python-LLDB.sh | 2 +- lldb/scripts/Xcode/build-llvm.py | 2 +- lldb/scripts/Xcode/package-clang-resource-headers.py | 2 +- lldb/scripts/analyze-project-deps.py | 2 +- lldb/scripts/buildbot.py | 2 +- lldb/scripts/prepare_bindings.py | 2 +- lldb/scripts/swig_bot.py | 2 +- lldb/scripts/swig_bot_lib/client.py | 2 +- lldb/scripts/swig_bot_lib/local.py | 2 +- lldb/scripts/swig_bot_lib/remote.py | 2 +- lldb/scripts/swig_bot_lib/server.py | 2 +- lldb/scripts/verify_api.py | 2 +- lldb/test/dotest.py | 2 +- lldb/third_party/Python/module/pexpect-4.6/pexpect/FSM.py | 2 +- lldb/utils/git-svn/convert.py | 2 +- lldb/utils/lldb-dotest/lldb-dotest.in | 2 +- lldb/utils/lui/lui.py | 2 +- lldb/utils/lui/sandbox.py | 2 +- lldb/utils/misc/grep-svn-log.py | 2 +- lldb/utils/sync-source/syncsource.py | 2 +- lldb/utils/test/disasm.py | 2 +- lldb/utils/test/lldb-disasm.py | 2 +- lldb/utils/test/llvm-mc-shell.py | 2 +- lldb/utils/test/ras.py | 2 +- lldb/utils/test/run-dis.py | 2 +- lldb/utils/test/run-until-faulted.py | 2 +- .../gofrontend/libffi/generate-darwin-source-and-headers.py | 2 +- llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py | 2 +- llvm/examples/Kaleidoscope/MCJIT/cached/split-lib.py | 2 +- llvm/examples/Kaleidoscope/MCJIT/complete/genk-timing.py | 2 +- llvm/examples/Kaleidoscope/MCJIT/complete/split-lib.py | 2 +- llvm/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py | 2 +- llvm/runtimes/llvm-strip-link.in | 2 +- llvm/test/BugPoint/compile-custom.ll.py | 2 +- llvm/test/Other/opt-bisect-helper.py | 2 +- llvm/test/TableGen/JSON-check.py | 2 +- llvm/test/tools/llvm-readobj/Inputs/relocs.py | 2 +- llvm/tools/opt-viewer/opt-diff.py | 2 +- llvm/tools/opt-viewer/opt-stats.py | 2 +- llvm/tools/opt-viewer/opt-viewer.py | 2 +- llvm/tools/opt-viewer/optrecord.py | 2 +- llvm/utils/Misc/zkill | 2 +- llvm/utils/Reviewing/find_interesting_reviews.py | 2 +- llvm/utils/Target/ARM/analyze-match-table.py | 2 +- llvm/utils/abtest.py | 2 +- llvm/utils/benchmark/mingw.py | 2 +- llvm/utils/benchmark/tools/compare.py | 2 +- llvm/utils/benchmark/tools/strip_asm.py | 2 +- llvm/utils/bisect | 2 +- llvm/utils/bisect-skip-count | 2 +- llvm/utils/bugpoint_gisel_reducer.py | 2 +- llvm/utils/chunk-print-before-all.py | 2 +- llvm/utils/clang-parse-diagnostics-file | 2 +- llvm/utils/create_ladder_graph.py | 2 +- llvm/utils/extract_symbols.py | 2 +- llvm/utils/extract_vplan.py | 2 +- llvm/utils/git-svn/git-llvm | 2 +- llvm/utils/gn/build/run_tablegen.py | 2 +- llvm/utils/gn/build/symlink_or_copy.py | 2 +- llvm/utils/gn/build/sync_source_lists_from_cmake.py | 2 +- llvm/utils/gn/build/write_cmake_config.py | 2 +- llvm/utils/gn/build/write_vcsrevision.py | 2 +- llvm/utils/gn/get.py | 2 +- llvm/utils/gn/gn.py | 2 +- llvm/utils/indirect_calls.py | 2 +- llvm/utils/lit/lit.py | 2 +- llvm/utils/lit/lit/ProgressBar.py | 2 +- llvm/utils/lit/lit/main.py | 2 +- .../lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py | 2 +- .../lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py | 2 +- .../Inputs/googletest-upstream-format/DummySubDir/OneTest.py | 2 +- llvm/utils/lit/tests/Inputs/shtest-env/print_environment.py | 2 +- .../Inputs/shtest-format/external_shell/write-bad-encoding.py | 2 +- llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py | 2 +- llvm/utils/lit/tests/Inputs/shtest-shell/check_path.py | 2 +- llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py | 2 +- .../lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py | 2 +- llvm/utils/llvm-build/llvm-build | 2 +- llvm/utils/llvm-gisel-cov.py | 2 +- llvm/utils/llvm-lit/llvm-lit.in | 2 +- llvm/utils/prepare-code-coverage-artifact.py | 2 +- llvm/utils/release/findRegressions-nightly.py | 2 +- llvm/utils/release/findRegressions-simple.py | 2 +- llvm/utils/shuffle_fuzz.py | 2 +- llvm/utils/shuffle_select_fuzz_tester.py | 2 +- llvm/utils/sort_includes.py | 2 +- llvm/utils/unicode-case-fold.py | 2 +- llvm/utils/update_analyze_test_checks.py | 2 +- llvm/utils/update_llc_test_checks.py | 2 +- llvm/utils/update_mca_test_checks.py | 2 +- llvm/utils/update_mir_test_checks.py | 2 +- llvm/utils/update_test_checks.py | 2 +- llvm/utils/wciia.py | 2 +- 170 files changed, 170 insertions(+), 170 deletions(-) diff --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py index 5e9dde723..5962004b7 100755 --- a/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py +++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #=- run-find-all-symbols.py - Parallel find-all-symbols runner -*- python -*-=# # diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py index 6a06e6dea..0c608a6ea 100755 --- a/clang-tools-extra/clang-tidy/add_new_check.py +++ b/clang-tools-extra/clang-tidy/add_new_check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #===- add_new_check.py - clang-tidy check generator ----------*- python -*--===# # diff --git a/clang-tools-extra/clang-tidy/rename_check.py b/clang-tools-extra/clang-tidy/rename_check.py index d5f240734..da98ba250 100755 --- a/clang-tools-extra/clang-tidy/rename_check.py +++ b/clang-tools-extra/clang-tidy/rename_check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #===- rename_check.py - clang-tidy check renamer -------------*- python -*--===# # diff --git a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py index 8b6ad9045..f28207e12 100755 --- a/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py +++ b/clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #===- clang-tidy-diff.py - ClangTidy Diff Checker ------------*- python -*--===# # diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py index a96c3b832..f46d43545 100755 --- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py +++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #===- run-clang-tidy.py - Parallel clang-tidy runner ---------*- python -*--===# # diff --git a/clang-tools-extra/clangd/include-mapping/cppreference_parser.py b/clang-tools-extra/clangd/include-mapping/cppreference_parser.py index fd3b8a683..a01edb457 100644 --- a/clang-tools-extra/clangd/include-mapping/cppreference_parser.py +++ b/clang-tools-extra/clangd/include-mapping/cppreference_parser.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- cppreference_parser.py - ------------------------------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/clang-tools-extra/clangd/include-mapping/gen_std.py b/clang-tools-extra/clangd/include-mapping/gen_std.py index 1cfe2c026..3fd8d6b31 100755 --- a/clang-tools-extra/clangd/include-mapping/gen_std.py +++ b/clang-tools-extra/clangd/include-mapping/gen_std.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- gen_std.py - ------------------------------------------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/clang-tools-extra/clangd/include-mapping/test.py b/clang-tools-extra/clangd/include-mapping/test.py index 9fad952b2..c4f117be4 100755 --- a/clang-tools-extra/clangd/include-mapping/test.py +++ b/clang-tools-extra/clangd/include-mapping/test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- test.py - ---------------------------------------------*- python -*--===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py index aa6304bae..217454cb1 100755 --- a/clang-tools-extra/test/clang-tidy/check_clang_tidy.py +++ b/clang-tools-extra/test/clang-tidy/check_clang_tidy.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #===- check_clang_tidy.py - ClangTidy Test Helper ------------*- python -*--===# # diff --git a/clang/bindings/python/examples/cindex/cindex-dump.py b/clang/bindings/python/examples/cindex/cindex-dump.py index 46073b285..fc513c7ee 100644 --- a/clang/bindings/python/examples/cindex/cindex-dump.py +++ b/clang/bindings/python/examples/cindex/cindex-dump.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- cindex-dump.py - cindex/Python Source Dump -------------*- python -*--===# # diff --git a/clang/bindings/python/examples/cindex/cindex-includes.py b/clang/bindings/python/examples/cindex/cindex-includes.py index ec1fbc0c3..be6003426 100644 --- a/clang/bindings/python/examples/cindex/cindex-includes.py +++ b/clang/bindings/python/examples/cindex/cindex-includes.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- cindex-includes.py - cindex/Python Inclusion Graph -----*- python -*--===# # diff --git a/clang/docs/tools/dump_ast_matchers.py b/clang/docs/tools/dump_ast_matchers.py index c96c1ca27..26cf41561 100755 --- a/clang/docs/tools/dump_ast_matchers.py +++ b/clang/docs/tools/dump_ast_matchers.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # A tool to parse ASTMatchers.h and update the documentation in # ../LibASTMatchersReference.html automatically. Run from the # directory in which this file is located to update the docs. diff --git a/clang/docs/tools/dump_format_style.py b/clang/docs/tools/dump_format_style.py index 5feb793a4..e18a2ffb3 100755 --- a/clang/docs/tools/dump_format_style.py +++ b/clang/docs/tools/dump_format_style.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # A tool to parse the FormatStyle struct from Format.h and update the # documentation in ../ClangFormatStyleOptions.rst automatically. # Run from the directory in which this file is located to update the docs. diff --git a/clang/test/AST/gen_ast_dump_json_test.py b/clang/test/AST/gen_ast_dump_json_test.py index 975039ead..9a6ee94cd 100644 --- a/clang/test/AST/gen_ast_dump_json_test.py +++ b/clang/test/AST/gen_ast_dump_json_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from collections import OrderedDict from sets import Set diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py index e231f5bfe..a801c5f99 100755 --- a/clang/tools/clang-format/clang-format-diff.py +++ b/clang/tools/clang-format/clang-format-diff.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===# # diff --git a/clang/tools/clang-format/git-clang-format b/clang/tools/clang-format/git-clang-format index ef7f22d0f..4ea4521f6 100755 --- a/clang/tools/clang-format/git-clang-format +++ b/clang/tools/clang-format/git-clang-format @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #===- git-clang-format - ClangFormat Git Integration ---------*- python -*--===# # diff --git a/clang/tools/scan-build-py/bin/analyze-build b/clang/tools/scan-build-py/bin/analyze-build index 6c285874a..5b270d54e 100755 --- a/clang/tools/scan-build-py/bin/analyze-build +++ b/clang/tools/scan-build-py/bin/analyze-build @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/scan-build-py/bin/analyze-c++ b/clang/tools/scan-build-py/bin/analyze-c++ index 564e2abf5..b2b60a440 100755 --- a/clang/tools/scan-build-py/bin/analyze-c++ +++ b/clang/tools/scan-build-py/bin/analyze-c++ @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/scan-build-py/bin/analyze-cc b/clang/tools/scan-build-py/bin/analyze-cc index 564e2abf5..b2b60a440 100755 --- a/clang/tools/scan-build-py/bin/analyze-cc +++ b/clang/tools/scan-build-py/bin/analyze-cc @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/scan-build-py/bin/intercept-build b/clang/tools/scan-build-py/bin/intercept-build index 23f510478..fe45c5457 100755 --- a/clang/tools/scan-build-py/bin/intercept-build +++ b/clang/tools/scan-build-py/bin/intercept-build @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/scan-build-py/bin/intercept-c++ b/clang/tools/scan-build-py/bin/intercept-c++ index 4230c8035..0cba3a3cd 100755 --- a/clang/tools/scan-build-py/bin/intercept-c++ +++ b/clang/tools/scan-build-py/bin/intercept-c++ @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/scan-build-py/bin/intercept-cc b/clang/tools/scan-build-py/bin/intercept-cc index 4230c8035..0cba3a3cd 100755 --- a/clang/tools/scan-build-py/bin/intercept-cc +++ b/clang/tools/scan-build-py/bin/intercept-cc @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/scan-build-py/bin/scan-build b/clang/tools/scan-build-py/bin/scan-build index 156da064a..4fa08175e 100755 --- a/clang/tools/scan-build-py/bin/scan-build +++ b/clang/tools/scan-build-py/bin/scan-build @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view index 4537bcfcd..37c07a9b8 100755 --- a/clang/tools/scan-view/bin/scan-view +++ b/clang/tools/scan-view/bin/scan-view @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/clang/tools/scan-view/share/Reporter.py b/clang/tools/scan-view/share/Reporter.py index b1ff16142..d6300e787 100644 --- a/clang/tools/scan-view/share/Reporter.py +++ b/clang/tools/scan-view/share/Reporter.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Methods for reporting bugs.""" diff --git a/clang/tools/scan-view/share/startfile.py b/clang/tools/scan-view/share/startfile.py index 9eb548bc4..cdf3db279 100644 --- a/clang/tools/scan-view/share/startfile.py +++ b/clang/tools/scan-view/share/startfile.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Utility for opening a file using the default application in a cross-platform diff --git a/clang/utils/ABITest/ABITestGen.py b/clang/utils/ABITest/ABITestGen.py index 93a6de930..efb35fa73 100755 --- a/clang/utils/ABITest/ABITestGen.py +++ b/clang/utils/ABITest/ABITestGen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function from pprint import pprint diff --git a/clang/utils/CIndex/completion_logger_server.py b/clang/utils/CIndex/completion_logger_server.py index 201667117..02d7cd6fc 100755 --- a/clang/utils/CIndex/completion_logger_server.py +++ b/clang/utils/CIndex/completion_logger_server.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function import sys from socket import * diff --git a/clang/utils/CaptureCmd b/clang/utils/CaptureCmd index 705585c3b..5ffdfe560 100755 --- a/clang/utils/CaptureCmd +++ b/clang/utils/CaptureCmd @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """CaptureCmd - A generic tool for capturing information about the invocations of another program. diff --git a/clang/utils/CmpDriver b/clang/utils/CmpDriver index 12ce7a325..c2b6ab5ec 100755 --- a/clang/utils/CmpDriver +++ b/clang/utils/CmpDriver @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ A simple utility that compares tool invocations and exit codes issued by diff --git a/clang/utils/FindSpecRefs b/clang/utils/FindSpecRefs index 9097f93f2..3ad581b3d 100755 --- a/clang/utils/FindSpecRefs +++ b/clang/utils/FindSpecRefs @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import re diff --git a/clang/utils/FuzzTest b/clang/utils/FuzzTest index 0e043df7c..c4c956b6e 100755 --- a/clang/utils/FuzzTest +++ b/clang/utils/FuzzTest @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ This is a generic fuzz testing tool, see --help for more information. diff --git a/clang/utils/TestUtils/deep-stack.py b/clang/utils/TestUtils/deep-stack.py index 10bf47acb..5fb8d0df8 100755 --- a/clang/utils/TestUtils/deep-stack.py +++ b/clang/utils/TestUtils/deep-stack.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function def pcall(f, N): diff --git a/clang/utils/analyzer/CmpRuns.py b/clang/utils/analyzer/CmpRuns.py index 3fab6ef52..9baa7a483 100755 --- a/clang/utils/analyzer/CmpRuns.py +++ b/clang/utils/analyzer/CmpRuns.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ CmpRuns - A simple tool for comparing two static analyzer runs to determine diff --git a/clang/utils/analyzer/SATestAdd.py b/clang/utils/analyzer/SATestAdd.py index 52089f4e0..d087a90ba 100755 --- a/clang/utils/analyzer/SATestAdd.py +++ b/clang/utils/analyzer/SATestAdd.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Static Analyzer qualification infrastructure: adding a new project to diff --git a/clang/utils/analyzer/SATestBuild.py b/clang/utils/analyzer/SATestBuild.py index 691ded80a..b17b3db16 100755 --- a/clang/utils/analyzer/SATestBuild.py +++ b/clang/utils/analyzer/SATestBuild.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Static Analyzer qualification infrastructure. diff --git a/clang/utils/analyzer/SATestUpdateDiffs.py b/clang/utils/analyzer/SATestUpdateDiffs.py index ea3c08cc2..08e3f82ff 100755 --- a/clang/utils/analyzer/SATestUpdateDiffs.py +++ b/clang/utils/analyzer/SATestUpdateDiffs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Update reference results for static analyzer. diff --git a/clang/utils/analyzer/SumTimerInfo.py b/clang/utils/analyzer/SumTimerInfo.py index 36e519adb..d1934f19d 100644 --- a/clang/utils/analyzer/SumTimerInfo.py +++ b/clang/utils/analyzer/SumTimerInfo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Script to Summarize statistics in the scan-build output. diff --git a/clang/utils/analyzer/exploded-graph-rewriter.py b/clang/utils/analyzer/exploded-graph-rewriter.py index 5ce56d61c..808f21c98 100755 --- a/clang/utils/analyzer/exploded-graph-rewriter.py +++ b/clang/utils/analyzer/exploded-graph-rewriter.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # #===- exploded-graph-rewriter.py - ExplodedGraph dump tool -----*- python -*--# # diff --git a/clang/utils/check_cfc/check_cfc.py b/clang/utils/check_cfc/check_cfc.py index 311f502f8..0bbbc0886 100755 --- a/clang/utils/check_cfc/check_cfc.py +++ b/clang/utils/check_cfc/check_cfc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Check CFC - Check Compile Flow Consistency diff --git a/clang/utils/check_cfc/obj_diff.py b/clang/utils/check_cfc/obj_diff.py index a0951c5bc..b38669483 100755 --- a/clang/utils/check_cfc/obj_diff.py +++ b/clang/utils/check_cfc/obj_diff.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function diff --git a/clang/utils/check_cfc/test_check_cfc.py b/clang/utils/check_cfc/test_check_cfc.py index 0808252a2..6f149ebcc 100755 --- a/clang/utils/check_cfc/test_check_cfc.py +++ b/clang/utils/check_cfc/test_check_cfc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Test internal functions within check_cfc.py.""" diff --git a/clang/utils/creduce-clang-crash.py b/clang/utils/creduce-clang-crash.py index be16211c4..e56f3697c 100755 --- a/clang/utils/creduce-clang-crash.py +++ b/clang/utils/creduce-clang-crash.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Calls C-Reduce to create a minimal reproducer for clang crashes. Output files: diff --git a/clang/utils/hmaptool/hmaptool b/clang/utils/hmaptool/hmaptool index 58baab2f7..00296f11a 100755 --- a/clang/utils/hmaptool/hmaptool +++ b/clang/utils/hmaptool/hmaptool @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function import json diff --git a/clang/utils/modfuzz.py b/clang/utils/modfuzz.py index 61ca3272a..19a9807b3 100644 --- a/clang/utils/modfuzz.py +++ b/clang/utils/modfuzz.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # To use: # 1) Update the 'decls' list below with your fuzzing configuration. diff --git a/clang/utils/token-delta.py b/clang/utils/token-delta.py index 62b4eb3c7..022fb2f8b 100755 --- a/clang/utils/token-delta.py +++ b/clang/utils/token-delta.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import absolute_import, division, print_function import os diff --git a/compiler-rt/lib/asan/scripts/asan_symbolize.py b/compiler-rt/lib/asan/scripts/asan_symbolize.py index 28995bc06..d22152013 100755 --- a/compiler-rt/lib/asan/scripts/asan_symbolize.py +++ b/compiler-rt/lib/asan/scripts/asan_symbolize.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- lib/asan/scripts/asan_symbolize.py -----------------------------------===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/compiler-rt/lib/dfsan/scripts/build-libc-list.py b/compiler-rt/lib/dfsan/scripts/build-libc-list.py index 40805c019..e1df01aca 100755 --- a/compiler-rt/lib/dfsan/scripts/build-libc-list.py +++ b/compiler-rt/lib/dfsan/scripts/build-libc-list.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- lib/dfsan/scripts/build-libc-list.py ---------------------------------===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py b/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py index 579e481a2..c5d8d5b45 100755 --- a/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py +++ b/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- lib/fuzzer/scripts/unbalanced_allocs.py ------------------------------===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/compiler-rt/lib/sanitizer_common/scripts/cpplint.py b/compiler-rt/lib/sanitizer_common/scripts/cpplint.py index d45c47f7e..948266145 100755 --- a/compiler-rt/lib/sanitizer_common/scripts/cpplint.py +++ b/compiler-rt/lib/sanitizer_common/scripts/cpplint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (c) 2009 Google Inc. All rights reserved. # diff --git a/compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py b/compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py index 6585a42dc..43f872fae 100755 --- a/compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py +++ b/compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===- lib/sanitizer_common/scripts/gen_dynamic_list.py ---------------------===# # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/compiler-rt/lib/sanitizer_common/scripts/litlint.py b/compiler-rt/lib/sanitizer_common/scripts/litlint.py index 81b89c214..dd8d3aba0 100755 --- a/compiler-rt/lib/sanitizer_common/scripts/litlint.py +++ b/compiler-rt/lib/sanitizer_common/scripts/litlint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # litlint # diff --git a/compiler-rt/lib/sanitizer_common/scripts/sancov.py b/compiler-rt/lib/sanitizer_common/scripts/sancov.py index 35606396b..2a2876d46 100755 --- a/compiler-rt/lib/sanitizer_common/scripts/sancov.py +++ b/compiler-rt/lib/sanitizer_common/scripts/sancov.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Merge or print the coverage data collected by asan's coverage. # Input files are sequences of 4-byte integers. # We need to merge these integers into a set and then diff --git a/libcxx/utils/cat_files.py b/libcxx/utils/cat_files.py index ac4f38696..fc7432267 100755 --- a/libcxx/utils/cat_files.py +++ b/libcxx/utils/cat_files.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/gen_link_script.py b/libcxx/utils/gen_link_script.py index 238c5747c..4343c56a3 100755 --- a/libcxx/utils/gen_link_script.py +++ b/libcxx/utils/gen_link_script.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index 0384d3255..16c0f1bfe 100755 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import tempfile diff --git a/libcxx/utils/google-benchmark/mingw.py b/libcxx/utils/google-benchmark/mingw.py index 706ad559d..4eb75ab86 100644 --- a/libcxx/utils/google-benchmark/mingw.py +++ b/libcxx/utils/google-benchmark/mingw.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # encoding: utf-8 import argparse diff --git a/libcxx/utils/google-benchmark/tools/compare.py b/libcxx/utils/google-benchmark/tools/compare.py index 539ace6fb..b1c0dedef 100755 --- a/libcxx/utils/google-benchmark/tools/compare.py +++ b/libcxx/utils/google-benchmark/tools/compare.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import unittest """ diff --git a/libcxx/utils/google-benchmark/tools/strip_asm.py b/libcxx/utils/google-benchmark/tools/strip_asm.py index 9030550b4..d131dc719 100755 --- a/libcxx/utils/google-benchmark/tools/strip_asm.py +++ b/libcxx/utils/google-benchmark/tools/strip_asm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ strip_asm.py - Cleanup ASM output for the specified file diff --git a/libcxx/utils/merge_archives.py b/libcxx/utils/merge_archives.py index 5c04bc915..653dbbf50 100755 --- a/libcxx/utils/merge_archives.py +++ b/libcxx/utils/merge_archives.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/sym_diff.py b/libcxx/utils/sym_diff.py index 6bd1b57e0..749519d4e 100755 --- a/libcxx/utils/sym_diff.py +++ b/libcxx/utils/sym_diff.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/sym_extract.py b/libcxx/utils/sym_extract.py index 987c207c1..f1397b252 100755 --- a/libcxx/utils/sym_extract.py +++ b/libcxx/utils/sym_extract.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/libcxx/utils/sym_match.py b/libcxx/utils/sym_match.py index 1fd39ca5f..b91ebfcf4 100755 --- a/libcxx/utils/sym_match.py +++ b/libcxx/utils/sym_match.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 #===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/lld/utils/benchmark.py b/lld/utils/benchmark.py index 47490b9a9..6eefa91b3 100755 --- a/lld/utils/benchmark.py +++ b/lld/utils/benchmark.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. diff --git a/lldb/examples/python/file_extract.py b/lldb/examples/python/file_extract.py index decbba0b2..c1f2b98f1 100755 --- a/lldb/examples/python/file_extract.py +++ b/lldb/examples/python/file_extract.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import string import struct diff --git a/lldb/lit/Quit/expect_exit_code.py b/lldb/lit/Quit/expect_exit_code.py index 32b2e29d5..b85fa8c9e 100755 --- a/lldb/lit/Quit/expect_exit_code.py +++ b/lldb/lit/Quit/expect_exit_code.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import subprocess import sys diff --git a/lldb/lit/helper/build.py b/lldb/lit/helper/build.py index d2cb52f00..c78565b0b 100755 --- a/lldb/lit/helper/build.py +++ b/lldb/lit/helper/build.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 from __future__ import print_function diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj index c02abef66..e3f2f2f06 100644 --- a/lldb/lldb.xcodeproj/project.pbxproj +++ b/lldb/lldb.xcodeproj/project.pbxproj @@ -7499,7 +7499,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/usr/bin/env python -u $SRCROOT/scripts/Xcode/build-llvm.py\n"; + shellScript = "/usr/bin/env python3 -u $SRCROOT/scripts/Xcode/build-llvm.py\n"; }; 26DC6A5813380D4300FF7998 /* Prepare Swig Bindings */ = { isa = PBXShellScriptBuildPhase; diff --git a/lldb/packages/Python/lldbsuite/test/attic/tester.py b/lldb/packages/Python/lldbsuite/test/attic/tester.py index 2e7835123..6140e1e55 100644 --- a/lldb/packages/Python/lldbsuite/test/attic/tester.py +++ b/lldb/packages/Python/lldbsuite/test/attic/tester.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf8 -*- from __future__ import print_function diff --git a/lldb/packages/Python/lldbsuite/test/bench.py b/lldb/packages/Python/lldbsuite/test/bench.py index 41d44bad9..4cda5694a 100644 --- a/lldb/packages/Python/lldbsuite/test/bench.py +++ b/lldb/packages/Python/lldbsuite/test/bench.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ A simple bench runner which delegates to the ./dotest.py test driver to run the diff --git a/lldb/packages/Python/lldbsuite/test/issue_verification/disable.py b/lldb/packages/Python/lldbsuite/test/issue_verification/disable.py index 6d1f93e8b..c775474a9 100755 --- a/lldb/packages/Python/lldbsuite/test/issue_verification/disable.py +++ b/lldb/packages/Python/lldbsuite/test/issue_verification/disable.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Renames *.py files to *.py.park.""" import os import sys diff --git a/lldb/packages/Python/lldbsuite/test/issue_verification/enable.py b/lldb/packages/Python/lldbsuite/test/issue_verification/enable.py index eb19276de..2b4eaefc3 100755 --- a/lldb/packages/Python/lldbsuite/test/issue_verification/enable.py +++ b/lldb/packages/Python/lldbsuite/test/issue_verification/enable.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Renames *.py.park files to *.py.""" import os import sys diff --git a/lldb/packages/Python/lldbsuite/test/redo.py b/lldb/packages/Python/lldbsuite/test/redo.py index 03052c3a0..642a5c2af 100644 --- a/lldb/packages/Python/lldbsuite/test/redo.py +++ b/lldb/packages/Python/lldbsuite/test/redo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ A simple utility to redo the failed/errored tests. diff --git a/lldb/packages/Python/lldbsuite/test/test_runner/test/inferior.py b/lldb/packages/Python/lldbsuite/test/test_runner/test/inferior.py index 4207bac30..8d9639c4a 100755 --- a/lldb/packages/Python/lldbsuite/test/test_runner/test/inferior.py +++ b/lldb/packages/Python/lldbsuite/test/test_runner/test/inferior.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Inferior program used by process control tests.""" from __future__ import print_function diff --git a/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py b/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py index d1f7da67d..5df541c96 100755 --- a/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py +++ b/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. See https://llvm.org/LICENSE.txt for license information. diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py index 74ee4a6c4..f7a3d5b4a 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import binascii import json diff --git a/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py b/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py index 5b199defc..b24ce7497 100644 --- a/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py +++ b/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Tests that the event system reports issues during decorator handling as errors. diff --git a/lldb/scripts/Python/finish-swig-Python-LLDB.sh b/lldb/scripts/Python/finish-swig-Python-LLDB.sh index 1cd17744a..ca78f8a8f 100755 --- a/lldb/scripts/Python/finish-swig-Python-LLDB.sh +++ b/lldb/scripts/Python/finish-swig-Python-LLDB.sh @@ -55,7 +55,7 @@ else fi OS_NAME=`uname -s` -PYTHON=${PYTHON_EXECUTABLE:-/usr/bin/env python} +PYTHON=${PYTHON_EXECUTABLE:-/usr/bin/env python3} PYTHON_VERSION=`${PYTHON} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'` if [ $Debug -eq 1 ] diff --git a/lldb/scripts/Xcode/build-llvm.py b/lldb/scripts/Xcode/build-llvm.py index a678247e4..ac39c494c 100755 --- a/lldb/scripts/Xcode/build-llvm.py +++ b/lldb/scripts/Xcode/build-llvm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import errno import hashlib diff --git a/lldb/scripts/Xcode/package-clang-resource-headers.py b/lldb/scripts/Xcode/package-clang-resource-headers.py index 7e34af9ff..3b4797f01 100644 --- a/lldb/scripts/Xcode/package-clang-resource-headers.py +++ b/lldb/scripts/Xcode/package-clang-resource-headers.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # package-clang-resource-headers.py # diff --git a/lldb/scripts/analyze-project-deps.py b/lldb/scripts/analyze-project-deps.py index c6e3263a2..874223bf8 100755 --- a/lldb/scripts/analyze-project-deps.py +++ b/lldb/scripts/analyze-project-deps.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import argparse import itertools diff --git a/lldb/scripts/buildbot.py b/lldb/scripts/buildbot.py index 06ee556be..0d7679464 100755 --- a/lldb/scripts/buildbot.py +++ b/lldb/scripts/buildbot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import os diff --git a/lldb/scripts/prepare_bindings.py b/lldb/scripts/prepare_bindings.py index 447fc5dc8..d3afe5d9a 100755 --- a/lldb/scripts/prepare_bindings.py +++ b/lldb/scripts/prepare_bindings.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. See https://llvm.org/LICENSE.txt for license information. diff --git a/lldb/scripts/swig_bot.py b/lldb/scripts/swig_bot.py index 888fc1011..c261454a3 100644 --- a/lldb/scripts/swig_bot.py +++ b/lldb/scripts/swig_bot.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ SWIG generation top-level script. Supports both local and remote generation diff --git a/lldb/scripts/swig_bot_lib/client.py b/lldb/scripts/swig_bot_lib/client.py index d9f0fb47e..5f8d6add8 100644 --- a/lldb/scripts/swig_bot_lib/client.py +++ b/lldb/scripts/swig_bot_lib/client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ SWIG generation client. Supports both local and remote generation of SWIG diff --git a/lldb/scripts/swig_bot_lib/local.py b/lldb/scripts/swig_bot_lib/local.py index ea073af82..0e732969c 100644 --- a/lldb/scripts/swig_bot_lib/local.py +++ b/lldb/scripts/swig_bot_lib/local.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Shared functionality used by `client` and `server` when generating or preparing diff --git a/lldb/scripts/swig_bot_lib/remote.py b/lldb/scripts/swig_bot_lib/remote.py index 712a5e2a5..8970c72d9 100644 --- a/lldb/scripts/swig_bot_lib/remote.py +++ b/lldb/scripts/swig_bot_lib/remote.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Shared functionality used by `client` and `server` when dealing with diff --git a/lldb/scripts/swig_bot_lib/server.py b/lldb/scripts/swig_bot_lib/server.py index 57fb8d9db..58a9927fd 100644 --- a/lldb/scripts/swig_bot_lib/server.py +++ b/lldb/scripts/swig_bot_lib/server.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ SWIG generation server. Listens for connections from swig generation clients diff --git a/lldb/scripts/verify_api.py b/lldb/scripts/verify_api.py index d422cded8..c9d8943b1 100755 --- a/lldb/scripts/verify_api.py +++ b/lldb/scripts/verify_api.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import subprocess import optparse diff --git a/lldb/test/dotest.py b/lldb/test/dotest.py index 1f9d52354..30e953e8b 100755 --- a/lldb/test/dotest.py +++ b/lldb/test/dotest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 if __name__ == "__main__": import use_lldb_suite diff --git a/lldb/third_party/Python/module/pexpect-4.6/pexpect/FSM.py b/lldb/third_party/Python/module/pexpect-4.6/pexpect/FSM.py index 46b392ea0..4e77654ea 100644 --- a/lldb/third_party/Python/module/pexpect-4.6/pexpect/FSM.py +++ b/lldb/third_party/Python/module/pexpect-4.6/pexpect/FSM.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 '''This module implements a Finite State Machine (FSM). In addition to state this FSM also maintains a user defined "memory". So this FSM can be used as a diff --git a/lldb/utils/git-svn/convert.py b/lldb/utils/git-svn/convert.py index b6e54ed80..fca5d6f6f 100755 --- a/lldb/utils/git-svn/convert.py +++ b/lldb/utils/git-svn/convert.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Convert the raw message sources from git patch emails to git-am friendly files. diff --git a/lldb/utils/lldb-dotest/lldb-dotest.in b/lldb/utils/lldb-dotest/lldb-dotest.in index 18a73ae0b..0112a9f09 100755 --- a/lldb/utils/lldb-dotest/lldb-dotest.in +++ b/lldb/utils/lldb-dotest/lldb-dotest.in @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import subprocess import sys diff --git a/lldb/utils/lui/lui.py b/lldb/utils/lui/lui.py index 98e1c63ce..7d1877bd0 100755 --- a/lldb/utils/lui/lui.py +++ b/lldb/utils/lui/lui.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ##===-- lui.py -----------------------------------------------*- Python -*-===## ## # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/lldb/utils/lui/sandbox.py b/lldb/utils/lui/sandbox.py index 8bb4e3595..18c1405f9 100755 --- a/lldb/utils/lui/sandbox.py +++ b/lldb/utils/lui/sandbox.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ##===-- sandbox.py -------------------------------------------*- Python -*-===## ## # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/lldb/utils/misc/grep-svn-log.py b/lldb/utils/misc/grep-svn-log.py index a14904792..ecc0aaadc 100755 --- a/lldb/utils/misc/grep-svn-log.py +++ b/lldb/utils/misc/grep-svn-log.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Greps and returns the first svn log entry containing a line matching the regular diff --git a/lldb/utils/sync-source/syncsource.py b/lldb/utils/sync-source/syncsource.py index 6cf2612bd..7f34e502c 100644 --- a/lldb/utils/sync-source/syncsource.py +++ b/lldb/utils/sync-source/syncsource.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. See https://llvm.org/LICENSE.txt for license information. diff --git a/lldb/utils/test/disasm.py b/lldb/utils/test/disasm.py index 7d95d8937..26025115a 100755 --- a/lldb/utils/test/disasm.py +++ b/lldb/utils/test/disasm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Run gdb to disassemble a function, feed the bytes to 'llvm-mc -disassemble' command, diff --git a/lldb/utils/test/lldb-disasm.py b/lldb/utils/test/lldb-disasm.py index 339e8e7ca..c684a7532 100755 --- a/lldb/utils/test/lldb-disasm.py +++ b/lldb/utils/test/lldb-disasm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Run lldb to disassemble all the available functions for an executable image. diff --git a/lldb/utils/test/llvm-mc-shell.py b/lldb/utils/test/llvm-mc-shell.py index 6adaf5dd3..cfc2e63c6 100755 --- a/lldb/utils/test/llvm-mc-shell.py +++ b/lldb/utils/test/llvm-mc-shell.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Run llvm-mc interactively. diff --git a/lldb/utils/test/ras.py b/lldb/utils/test/ras.py index 1b7caecdb..ccd9504c3 100755 --- a/lldb/utils/test/ras.py +++ b/lldb/utils/test/ras.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Run the test suite and send the result as an email message. diff --git a/lldb/utils/test/run-dis.py b/lldb/utils/test/run-dis.py index 5df65e85b..22c7fadc2 100755 --- a/lldb/utils/test/run-dis.py +++ b/lldb/utils/test/run-dis.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Run lldb disassembler on all the binaries specified by a combination of root dir diff --git a/lldb/utils/test/run-until-faulted.py b/lldb/utils/test/run-until-faulted.py index 0ce32771f..f0b209b24 100755 --- a/lldb/utils/test/run-until-faulted.py +++ b/lldb/utils/test/run-until-faulted.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Run a program via lldb until it fails. diff --git a/llgo/third_party/gofrontend/libffi/generate-darwin-source-and-headers.py b/llgo/third_party/gofrontend/libffi/generate-darwin-source-and-headers.py index 306136fe4..2b64c9ca2 100644 --- a/llgo/third_party/gofrontend/libffi/generate-darwin-source-and-headers.py +++ b/llgo/third_party/gofrontend/libffi/generate-darwin-source-and-headers.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import subprocess import os import errno diff --git a/llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py b/llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py index 87bbfbf32..a6dd73e0a 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py +++ b/llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/examples/Kaleidoscope/MCJIT/cached/split-lib.py b/llvm/examples/Kaleidoscope/MCJIT/cached/split-lib.py index 1aa80ee83..bf1ca576f 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/cached/split-lib.py +++ b/llvm/examples/Kaleidoscope/MCJIT/cached/split-lib.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/examples/Kaleidoscope/MCJIT/complete/genk-timing.py b/llvm/examples/Kaleidoscope/MCJIT/complete/genk-timing.py index c3b4d23c0..8c0017215 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/complete/genk-timing.py +++ b/llvm/examples/Kaleidoscope/MCJIT/complete/genk-timing.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/examples/Kaleidoscope/MCJIT/complete/split-lib.py b/llvm/examples/Kaleidoscope/MCJIT/complete/split-lib.py index 61c9a5b16..08450018c 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/complete/split-lib.py +++ b/llvm/examples/Kaleidoscope/MCJIT/complete/split-lib.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py b/llvm/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py index 87bbfbf32..a6dd73e0a 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py +++ b/llvm/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/runtimes/llvm-strip-link.in b/llvm/runtimes/llvm-strip-link.in index a7b8c567f..9e6a313ee 100755 --- a/llvm/runtimes/llvm-strip-link.in +++ b/llvm/runtimes/llvm-strip-link.in @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os diff --git a/llvm/test/BugPoint/compile-custom.ll.py b/llvm/test/BugPoint/compile-custom.ll.py index b0062ac0b..1a37844c1 100755 --- a/llvm/test/BugPoint/compile-custom.ll.py +++ b/llvm/test/BugPoint/compile-custom.ll.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/test/Other/opt-bisect-helper.py b/llvm/test/Other/opt-bisect-helper.py index d2ab4ce09..0484a9f0d 100755 --- a/llvm/test/Other/opt-bisect-helper.py +++ b/llvm/test/Other/opt-bisect-helper.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/test/TableGen/JSON-check.py b/llvm/test/TableGen/JSON-check.py index b6bc4ee6c..1082c655d 100644 --- a/llvm/test/TableGen/JSON-check.py +++ b/llvm/test/TableGen/JSON-check.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys import subprocess diff --git a/llvm/test/tools/llvm-readobj/Inputs/relocs.py b/llvm/test/tools/llvm-readobj/Inputs/relocs.py index 8e621cef5..01f68fbd6 100644 --- a/llvm/test/tools/llvm-readobj/Inputs/relocs.py +++ b/llvm/test/tools/llvm-readobj/Inputs/relocs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/tools/opt-viewer/opt-diff.py b/llvm/tools/opt-viewer/opt-diff.py index 36e81a5d5..da8eeb385 100755 --- a/llvm/tools/opt-viewer/opt-diff.py +++ b/llvm/tools/opt-viewer/opt-diff.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/tools/opt-viewer/opt-stats.py b/llvm/tools/opt-viewer/opt-stats.py index f4ee3a7d4..0e185ff72 100755 --- a/llvm/tools/opt-viewer/opt-stats.py +++ b/llvm/tools/opt-viewer/opt-stats.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/tools/opt-viewer/opt-viewer.py b/llvm/tools/opt-viewer/opt-viewer.py index 4c105886c..c4619a6cb 100755 --- a/llvm/tools/opt-viewer/opt-viewer.py +++ b/llvm/tools/opt-viewer/opt-viewer.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/tools/opt-viewer/optrecord.py b/llvm/tools/opt-viewer/optrecord.py index f6fd77268..8c8f4c8c9 100644 --- a/llvm/tools/opt-viewer/optrecord.py +++ b/llvm/tools/opt-viewer/optrecord.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/utils/Misc/zkill b/llvm/utils/Misc/zkill index bc0bfd586..b2971423c 100755 --- a/llvm/utils/Misc/zkill +++ b/llvm/utils/Misc/zkill @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import re diff --git a/llvm/utils/Reviewing/find_interesting_reviews.py b/llvm/utils/Reviewing/find_interesting_reviews.py index 7bfbec8cf..a0c06899c 100644 --- a/llvm/utils/Reviewing/find_interesting_reviews.py +++ b/llvm/utils/Reviewing/find_interesting_reviews.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/utils/Target/ARM/analyze-match-table.py b/llvm/utils/Target/ARM/analyze-match-table.py index d4e158d9e..196c0aa05 100644 --- a/llvm/utils/Target/ARM/analyze-match-table.py +++ b/llvm/utils/Target/ARM/analyze-match-table.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/utils/abtest.py b/llvm/utils/abtest.py index 69a86f648..8250c8c3f 100755 --- a/llvm/utils/abtest.py +++ b/llvm/utils/abtest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Given a previous good compile narrow down miscompiles. # Expects two directories named "before" and "after" each containing a set of diff --git a/llvm/utils/benchmark/mingw.py b/llvm/utils/benchmark/mingw.py index 706ad559d..4eb75ab86 100644 --- a/llvm/utils/benchmark/mingw.py +++ b/llvm/utils/benchmark/mingw.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # encoding: utf-8 import argparse diff --git a/llvm/utils/benchmark/tools/compare.py b/llvm/utils/benchmark/tools/compare.py index f0a4455f5..9cfae85e6 100644 --- a/llvm/utils/benchmark/tools/compare.py +++ b/llvm/utils/benchmark/tools/compare.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ compare.py - versatile benchmark output compare tool diff --git a/llvm/utils/benchmark/tools/strip_asm.py b/llvm/utils/benchmark/tools/strip_asm.py index 9030550b4..d131dc719 100644 --- a/llvm/utils/benchmark/tools/strip_asm.py +++ b/llvm/utils/benchmark/tools/strip_asm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ strip_asm.py - Cleanup ASM output for the specified file diff --git a/llvm/utils/bisect b/llvm/utils/bisect index d1b12575e..94c229f2d 100755 --- a/llvm/utils/bisect +++ b/llvm/utils/bisect @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys diff --git a/llvm/utils/bisect-skip-count b/llvm/utils/bisect-skip-count index f4f8ddcec..f9e4c2bab 100755 --- a/llvm/utils/bisect-skip-count +++ b/llvm/utils/bisect-skip-count @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # This script is used to bisect skip and count arguments for --debug-counter. # It is similar to bisect, except it understands how to increase skip and decrease count # diff --git a/llvm/utils/bugpoint_gisel_reducer.py b/llvm/utils/bugpoint_gisel_reducer.py index 4c366efbb..5df1cbed1 100755 --- a/llvm/utils/bugpoint_gisel_reducer.py +++ b/llvm/utils/bugpoint_gisel_reducer.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Reduces GlobalISel failures. diff --git a/llvm/utils/chunk-print-before-all.py b/llvm/utils/chunk-print-before-all.py index ce17c68c7..0e14b9b2c 100644 --- a/llvm/utils/chunk-print-before-all.py +++ b/llvm/utils/chunk-print-before-all.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Given a -print-before-all -print-module-scope log from an opt invocation, # chunk it into a series of individual IR files, one for each pass invocation. # If the log ends with an obvious stack trace, try to split off a separate diff --git a/llvm/utils/clang-parse-diagnostics-file b/llvm/utils/clang-parse-diagnostics-file index 59b13f306..2b28ada21 100755 --- a/llvm/utils/clang-parse-diagnostics-file +++ b/llvm/utils/clang-parse-diagnostics-file @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import plistlib diff --git a/llvm/utils/create_ladder_graph.py b/llvm/utils/create_ladder_graph.py index a5946ff24..a32e3a417 100644 --- a/llvm/utils/create_ladder_graph.py +++ b/llvm/utils/create_ladder_graph.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A ladder graph creation program. This is a python program that creates c source code that will generate diff --git a/llvm/utils/extract_symbols.py b/llvm/utils/extract_symbols.py index 93ad2e9c3..7c7c6a93b 100755 --- a/llvm/utils/extract_symbols.py +++ b/llvm/utils/extract_symbols.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A tool for extracting a list of symbols to export diff --git a/llvm/utils/extract_vplan.py b/llvm/utils/extract_vplan.py index b4e34fc76..c2a31f728 100755 --- a/llvm/utils/extract_vplan.py +++ b/llvm/utils/extract_vplan.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # This script extracts the VPlan digraphs from the vectoriser debug messages # and saves them in individual dot files (one for each plan). Optionally, and diff --git a/llvm/utils/git-svn/git-llvm b/llvm/utils/git-svn/git-llvm index 55150b011..a4c3a7342 100755 --- a/llvm/utils/git-svn/git-llvm +++ b/llvm/utils/git-svn/git-llvm @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # ======- git-llvm - LLVM Git Help Integration ---------*- python -*--========# # diff --git a/llvm/utils/gn/build/run_tablegen.py b/llvm/utils/gn/build/run_tablegen.py index c7694236b..71476d242 100755 --- a/llvm/utils/gn/build/run_tablegen.py +++ b/llvm/utils/gn/build/run_tablegen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Runs tablegen.""" import subprocess diff --git a/llvm/utils/gn/build/symlink_or_copy.py b/llvm/utils/gn/build/symlink_or_copy.py index a8f6c1b32..d5fbf32c1 100644 --- a/llvm/utils/gn/build/symlink_or_copy.py +++ b/llvm/utils/gn/build/symlink_or_copy.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Symlinks, or on Windows copies, an existing file to a second location. diff --git a/llvm/utils/gn/build/sync_source_lists_from_cmake.py b/llvm/utils/gn/build/sync_source_lists_from_cmake.py index fd1e69546..bb07752d8 100755 --- a/llvm/utils/gn/build/sync_source_lists_from_cmake.py +++ b/llvm/utils/gn/build/sync_source_lists_from_cmake.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Helps to keep BUILD.gn files in sync with the corresponding CMakeLists.txt. diff --git a/llvm/utils/gn/build/write_cmake_config.py b/llvm/utils/gn/build/write_cmake_config.py index d57435285..e6a9e7edf 100755 --- a/llvm/utils/gn/build/write_cmake_config.py +++ b/llvm/utils/gn/build/write_cmake_config.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Emulates the bits of CMake's configure_file() function needed in LLVM. The CMake build uses configure_file() for several things. This emulates that diff --git a/llvm/utils/gn/build/write_vcsrevision.py b/llvm/utils/gn/build/write_vcsrevision.py index 5bdca23e7..17a864e65 100755 --- a/llvm/utils/gn/build/write_vcsrevision.py +++ b/llvm/utils/gn/build/write_vcsrevision.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Gets the current revision and writes it to VCSRevision.h.""" diff --git a/llvm/utils/gn/get.py b/llvm/utils/gn/get.py index c39649df7..9f0973463 100755 --- a/llvm/utils/gn/get.py +++ b/llvm/utils/gn/get.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Downloads a prebuilt gn binary to a place where gn.py can find it.""" from __future__ import print_function diff --git a/llvm/utils/gn/gn.py b/llvm/utils/gn/gn.py index a6408ec06..08e3a1965 100755 --- a/llvm/utils/gn/gn.py +++ b/llvm/utils/gn/gn.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Calls `gn` with the right --dotfile= and --root= arguments for LLVM.""" # GN normally expects a file called '.gn' at the root of the repository. diff --git a/llvm/utils/indirect_calls.py b/llvm/utils/indirect_calls.py index e460ff7d0..66633886d 100755 --- a/llvm/utils/indirect_calls.py +++ b/llvm/utils/indirect_calls.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A tool for looking for indirect jumps and calls in x86 binaries. diff --git a/llvm/utils/lit/lit.py b/llvm/utils/lit/lit.py index af070c69b..51f3ad559 100755 --- a/llvm/utils/lit/lit.py +++ b/llvm/utils/lit/lit.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys from lit.main import main diff --git a/llvm/utils/lit/lit/ProgressBar.py b/llvm/utils/lit/lit/ProgressBar.py index d4e8f9ff6..036d6540d 100644 --- a/llvm/utils/lit/lit/ProgressBar.py +++ b/llvm/utils/lit/lit/ProgressBar.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Source: http://code.activestate.com/recipes/475116/, with # modifications by Daniel Dunbar. diff --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py index 49aaf638a..4e4967de8 100755 --- a/llvm/utils/lit/lit/main.py +++ b/llvm/utils/lit/lit/main.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ lit - LLVM Integrated Tester. diff --git a/llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py b/llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py index dd49f025b..61230a1a9 100644 --- a/llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py +++ b/llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys diff --git a/llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py b/llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py index f3a90ff4c..112039e03 100644 --- a/llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py +++ b/llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys import time diff --git a/llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py b/llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py index d7bc5968f..d7d6c8cf5 100644 --- a/llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py +++ b/llvm/utils/lit/tests/Inputs/googletest-upstream-format/DummySubDir/OneTest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys diff --git a/llvm/utils/lit/tests/Inputs/shtest-env/print_environment.py b/llvm/utils/lit/tests/Inputs/shtest-env/print_environment.py index ac9a80e6d..ed7e6776e 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-env/print_environment.py +++ b/llvm/utils/lit/tests/Inputs/shtest-env/print_environment.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_statement import os diff --git a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py index a5a2bc9da..b6c858336 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py +++ b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py b/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py index 2f7a2503b..8cd890c55 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import argparse import platform diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/check_path.py b/llvm/utils/lit/tests/Inputs/shtest-shell/check_path.py index 467505b7f..71a49cc83 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-shell/check_path.py +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/check_path.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py b/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py index 9463251d8..f5e78b157 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py b/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py index 357089d48..56919479c 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys diff --git a/llvm/utils/llvm-build/llvm-build b/llvm/utils/llvm-build/llvm-build index 7377e3d3f..ac1463053 100755 --- a/llvm/utils/llvm-build/llvm-build +++ b/llvm/utils/llvm-build/llvm-build @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import llvmbuild diff --git a/llvm/utils/llvm-gisel-cov.py b/llvm/utils/llvm-gisel-cov.py index 820fceab0..744275e74 100644 --- a/llvm/utils/llvm-gisel-cov.py +++ b/llvm/utils/llvm-gisel-cov.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Summarize the information in the given coverage files. diff --git a/llvm/utils/llvm-lit/llvm-lit.in b/llvm/utils/llvm-lit/llvm-lit.in index 8700d1567..f49741973 100755 --- a/llvm/utils/llvm-lit/llvm-lit.in +++ b/llvm/utils/llvm-lit/llvm-lit.in @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os diff --git a/llvm/utils/prepare-code-coverage-artifact.py b/llvm/utils/prepare-code-coverage-artifact.py index 5c4af242d..26bb4ec70 100755 --- a/llvm/utils/prepare-code-coverage-artifact.py +++ b/llvm/utils/prepare-code-coverage-artifact.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function diff --git a/llvm/utils/release/findRegressions-nightly.py b/llvm/utils/release/findRegressions-nightly.py index e7e13b083..7543cb806 100755 --- a/llvm/utils/release/findRegressions-nightly.py +++ b/llvm/utils/release/findRegressions-nightly.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import re, string, sys, os, time diff --git a/llvm/utils/release/findRegressions-simple.py b/llvm/utils/release/findRegressions-simple.py index 7bd1523b5..3eae2fffe 100755 --- a/llvm/utils/release/findRegressions-simple.py +++ b/llvm/utils/release/findRegressions-simple.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function import re, string, sys, os, time, math diff --git a/llvm/utils/shuffle_fuzz.py b/llvm/utils/shuffle_fuzz.py index 2d86cc0a2..54e7040fc 100755 --- a/llvm/utils/shuffle_fuzz.py +++ b/llvm/utils/shuffle_fuzz.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A shuffle vector fuzz tester. diff --git a/llvm/utils/shuffle_select_fuzz_tester.py b/llvm/utils/shuffle_select_fuzz_tester.py index 6b2f94a69..48b9724e4 100644 --- a/llvm/utils/shuffle_select_fuzz_tester.py +++ b/llvm/utils/shuffle_select_fuzz_tester.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A shuffle-select vector fuzz tester. diff --git a/llvm/utils/sort_includes.py b/llvm/utils/sort_includes.py index 70bfdedfc..450cd0e92 100755 --- a/llvm/utils/sort_includes.py +++ b/llvm/utils/sort_includes.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Script to sort the top-most block of #include lines. diff --git a/llvm/utils/unicode-case-fold.py b/llvm/utils/unicode-case-fold.py index ad8265ba7..7a8c5fdc9 100755 --- a/llvm/utils/unicode-case-fold.py +++ b/llvm/utils/unicode-case-fold.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Unicode case folding database conversion utility diff --git a/llvm/utils/update_analyze_test_checks.py b/llvm/utils/update_analyze_test_checks.py index df0910893..2a1d314f7 100755 --- a/llvm/utils/update_analyze_test_checks.py +++ b/llvm/utils/update_analyze_test_checks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A script to generate FileCheck statements for 'opt' analysis tests. diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py index 0936a449c..78a83101c 100755 --- a/llvm/utils/update_llc_test_checks.py +++ b/llvm/utils/update_llc_test_checks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A test case update script. diff --git a/llvm/utils/update_mca_test_checks.py b/llvm/utils/update_mca_test_checks.py index 87ac19b39..24d726948 100755 --- a/llvm/utils/update_mca_test_checks.py +++ b/llvm/utils/update_mca_test_checks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A test case update script. diff --git a/llvm/utils/update_mir_test_checks.py b/llvm/utils/update_mir_test_checks.py index b42a38bd5..5ea780da9 100755 --- a/llvm/utils/update_mir_test_checks.py +++ b/llvm/utils/update_mir_test_checks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """Updates FileCheck checks in MIR tests. diff --git a/llvm/utils/update_test_checks.py b/llvm/utils/update_test_checks.py index 92ce0535a..6fad59ee1 100755 --- a/llvm/utils/update_test_checks.py +++ b/llvm/utils/update_test_checks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """A script to generate FileCheck statements for 'opt' regression tests. diff --git a/llvm/utils/wciia.py b/llvm/utils/wciia.py index 4269db2de..30c3846b8 100755 --- a/llvm/utils/wciia.py +++ b/llvm/utils/wciia.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ wciia - Whose Code Is It Anyway