[llvm] [llvm] Unify python shebangs (PR #187255)

Ross Burton via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 05:32:15 PDT 2026


https://github.com/rossburton created https://github.com/llvm/llvm-project/pull/187255

As per PEP-0394[1], there is no real concensus over what binary names Python has, specifically 'python' could be Python 3, Python 2, or not exist.

However, everyone has a python3 interpreter and the scripts are all written for Python 3.  Unify the shebangs so that the ~50% of shebangs that use python now use python3.

[1] https://peps.python.org/pep-0394/

>From d3e013208489878992590acbc8d0d9151277c7d3 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton at arm.com>
Date: Wed, 15 Oct 2025 15:04:40 +0100
Subject: [PATCH] [llvm] Unify python shebangs

As per PEP-0394[1], there is no real concensus over what binary names
Python has, specifically 'python' could be Python 3, Python 2, or not
exist.

However, everyone has a python3 interpreter and the scripts are all
written for Python 3.  Unify the shebangs so that the ~50% of shebangs
that use python now use python3.

[1] https://peps.python.org/pep-0394/
---
 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/test/Other/opt-bisect-helper.py                            | 2 +-
 llvm/test/TableGen/JSON-check.py                                | 2 +-
 llvm/tools/opt-viewer/extract-reproducers.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/DSAclean.py                                          | 2 +-
 llvm/utils/DSAextract.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/bisect                                               | 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/convert-constraint-log-to-z3.py                      | 2 +-
 llvm/utils/create_ladder_graph.py                               | 2 +-
 llvm/utils/docker/scripts/llvm_checksum/llvm_checksum.py        | 2 +-
 llvm/utils/extract-section.py                                   | 2 +-
 llvm/utils/extract_symbols.py                                   | 2 +-
 llvm/utils/extract_vplan.py                                     | 2 +-
 llvm/utils/indirect_calls.py                                    | 2 +-
 llvm/utils/lint/common_lint.py                                  | 2 +-
 llvm/utils/lint/cpp_lint.py                                     | 2 +-
 llvm/utils/lint/generic_lint.py                                 | 2 +-
 llvm/utils/lit/lit/ProgressBar.py                               | 2 +-
 llvm/utils/lit/tests/Inputs/check_path.py                       | 2 +-
 llvm/utils/lit/tests/Inputs/fake-externals/cd                   | 2 +-
 llvm/utils/lit/tests/Inputs/fake-externals/diff                 | 2 +-
 llvm/utils/lit/tests/Inputs/fake-externals/env                  | 2 +-
 llvm/utils/lit/tests/Inputs/fake-externals/export               | 2 +-
 llvm/utils/lit/tests/Inputs/fake-externals/mkdir                | 2 +-
 llvm/utils/lit/tests/Inputs/fake-externals/rm                   | 2 +-
 .../lit/tests/Inputs/googletest-crash/DummySubDir/OneTest.py    | 2 +-
 .../Inputs/googletest-detect-duplicate/DummySubDir/OneTest.py   | 2 +-
 .../tests/Inputs/googletest-discovery-failed/subdir/OneTest.py  | 2 +-
 .../DummySubDir/OneTest.py                                      | 2 +-
 .../lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py   | 2 +-
 .../tests/Inputs/googletest-no-sharding/DummySubDir/OneTest.py  | 2 +-
 .../lit/tests/Inputs/googletest-prefix/DummySubDir/test_one.py  | 2 +-
 .../Inputs/googletest-sanitizer-error/DummySubDir/OneTest.py    | 2 +-
 .../lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py  | 2 +-
 .../Inputs/shtest-format/external_shell/write-bad-encoding.py   | 2 +-
 .../Inputs/shtest-format/external_shell/write-control-chars.py  | 2 +-
 llvm/utils/lit/tests/Inputs/shtest-not-posix/fail-signal.py     | 2 +-
 llvm/utils/lit/tests/Inputs/shtest-not/fail.py                  | 2 +-
 llvm/utils/lit/tests/Inputs/shtest-not/fail2.py                 | 2 +-
 llvm/utils/lit/tests/Inputs/shtest-not/pass.py                  | 2 +-
 .../lit/tests/Inputs/shtest-output-printing/write-a-lot.py      | 2 +-
 llvm/utils/lit/tests/Inputs/shtest-shell/check_args.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-gisel-cov.py                                    | 2 +-
 llvm/utils/llvm-original-di-preservation.py                     | 2 +-
 llvm/utils/merge-json.py                                        | 2 +-
 llvm/utils/release/findRegressions-nightly.py                   | 2 +-
 llvm/utils/release/findRegressions-simple.py                    | 2 +-
 llvm/utils/remote-exec.py                                       | 2 +-
 llvm/utils/schedcover.py                                        | 2 +-
 llvm/utils/shuffle_fuzz.py                                      | 2 +-
 llvm/utils/shuffle_select_fuzz_tester.py                        | 2 +-
 llvm/utils/sort_includes.py                                     | 2 +-
 llvm/utils/testgen/mc-bundling-x86-gen.py                       | 2 +-
 llvm/utils/unicode-case-fold.py                                 | 2 +-
 llvm/utils/wciia.py                                             | 2 +-
 72 files changed, 72 insertions(+), 72 deletions(-)

diff --git a/llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py b/llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py
index 2e39f103cd9f3..604819ecd7061 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 7a289e868a9ce..ebe04d75704d6 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 9045541cbe4e8..1f6f7ff5ed154 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 c920e594e675a..1267540b8ad65 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 2e39f103cd9f3..604819ecd7061 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/test/Other/opt-bisect-helper.py b/llvm/test/Other/opt-bisect-helper.py
index 86c0851272e2c..efdb846a9456b 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 296a5dcfc4fdc..ea78641670483 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/tools/opt-viewer/extract-reproducers.py b/llvm/tools/opt-viewer/extract-reproducers.py
index 610439d6f4c94..b70703e0e9d7c 100644
--- a/llvm/tools/opt-viewer/extract-reproducers.py
+++ b/llvm/tools/opt-viewer/extract-reproducers.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 desc = """
 A script to extract ConstraintElimination's reproducer remarks. The extracted
diff --git a/llvm/tools/opt-viewer/opt-diff.py b/llvm/tools/opt-viewer/opt-diff.py
index 2763ca4010c8a..09fa4a32ab692 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 716143b31a890..3d7fed60202f6 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 c9c7db726f765..6fb8a8dc795f1 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 07e21028535c4..94197e12456fb 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/DSAclean.py b/llvm/utils/DSAclean.py
index f9b083ee27f29..522b3a30abf7f 100755
--- a/llvm/utils/DSAclean.py
+++ b/llvm/utils/DSAclean.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # changelog:
 # 10/13/2005b: replaced the # in tmp(.#*)* with alphanumeric and _, this will then remove
diff --git a/llvm/utils/DSAextract.py b/llvm/utils/DSAextract.py
index 96f818bd2a831..0b935e9d2a4e2 100755
--- a/llvm/utils/DSAextract.py
+++ b/llvm/utils/DSAextract.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # this is a script to extract given named nodes from a dot file, with
 # the associated edges.  An edge is kept iff for edge x -> y
diff --git a/llvm/utils/Misc/zkill b/llvm/utils/Misc/zkill
index 8e10144ed4ac9..322b8dd992292 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 c006691079b64..e3e84a8be8cf1 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 c14b1a19fe39e..9864c5a0a44dc 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 a799c8764b290..a2db15e1cbbef 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/bisect b/llvm/utils/bisect
index 9df2cd9e1136b..adc7030738a77 100755
--- a/llvm/utils/bisect
+++ b/llvm/utils/bisect
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # The way you use this is you create a script that takes in as its first
 # argument a count. The script passes into LLVM the count via a command
diff --git a/llvm/utils/bugpoint_gisel_reducer.py b/llvm/utils/bugpoint_gisel_reducer.py
index 116ec792e921d..ee4f2093c59f7 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 6ad126e4dff09..987c7e4bd0ede 100755
--- 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 and/or -print-after-all -print-module-scope log from
 # an opt invocation, chunk it into a series of individual IR files, one for each
diff --git a/llvm/utils/clang-parse-diagnostics-file b/llvm/utils/clang-parse-diagnostics-file
index fac5866d364a8..8988e357f2ce0 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/convert-constraint-log-to-z3.py b/llvm/utils/convert-constraint-log-to-z3.py
index a3c33f2ef4599..d34b5915d4a6d 100755
--- a/llvm/utils/convert-constraint-log-to-z3.py
+++ b/llvm/utils/convert-constraint-log-to-z3.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 """
 Helper script to convert the log generated by '-debug-only=constraint-system'
diff --git a/llvm/utils/create_ladder_graph.py b/llvm/utils/create_ladder_graph.py
index f11aaf39bfa96..8894d35636108 100755
--- 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/docker/scripts/llvm_checksum/llvm_checksum.py b/llvm/utils/docker/scripts/llvm_checksum/llvm_checksum.py
index 5fa569aec540d..85bde61487c95 100755
--- a/llvm/utils/docker/scripts/llvm_checksum/llvm_checksum.py
+++ b/llvm/utils/docker/scripts/llvm_checksum/llvm_checksum.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 """ A small program to compute checksums of LLVM checkout.
 """
 from __future__ import absolute_import
diff --git a/llvm/utils/extract-section.py b/llvm/utils/extract-section.py
index bb4e252155372..cbe9ed3cfc930 100755
--- a/llvm/utils/extract-section.py
+++ b/llvm/utils/extract-section.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 from __future__ import print_function
 
 """
diff --git a/llvm/utils/extract_symbols.py b/llvm/utils/extract_symbols.py
index 40a43d3655552..eca63f6ae3c8e 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 cff6f5074d771..4afccf7d13572 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/indirect_calls.py b/llvm/utils/indirect_calls.py
index c18cffb26e7ae..03299270afca4 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/lint/common_lint.py b/llvm/utils/lint/common_lint.py
index 07b8fc5899e55..14fd7b790c41e 100644
--- a/llvm/utils/lint/common_lint.py
+++ b/llvm/utils/lint/common_lint.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Common lint functions applicable to multiple types of files.
 
diff --git a/llvm/utils/lint/cpp_lint.py b/llvm/utils/lint/cpp_lint.py
index 3734ba456626f..646cd8eae12dd 100755
--- a/llvm/utils/lint/cpp_lint.py
+++ b/llvm/utils/lint/cpp_lint.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Checks C++ files to make sure they conform to LLVM standards, as specified in
 # http://llvm.org/docs/CodingStandards.html .
diff --git a/llvm/utils/lint/generic_lint.py b/llvm/utils/lint/generic_lint.py
index 18e6e67e29a6e..130c952b24bd6 100755
--- a/llvm/utils/lint/generic_lint.py
+++ b/llvm/utils/lint/generic_lint.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Checks files to make sure they conform to LLVM standards which can be applied
 # to any programming language: at present, line length and trailing whitespace.
diff --git a/llvm/utils/lit/lit/ProgressBar.py b/llvm/utils/lit/lit/ProgressBar.py
index 382b8f2e52540..692d5100e1572 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/tests/Inputs/check_path.py b/llvm/utils/lit/tests/Inputs/check_path.py
index 62c906846fbb5..dfca004d50758 100644
--- a/llvm/utils/lit/tests/Inputs/check_path.py
+++ b/llvm/utils/lit/tests/Inputs/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/fake-externals/cd b/llvm/utils/lit/tests/Inputs/fake-externals/cd
index 9d9612dca4d2e..ab05763f44c82 100755
--- a/llvm/utils/lit/tests/Inputs/fake-externals/cd
+++ b/llvm/utils/lit/tests/Inputs/fake-externals/cd
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import fake_external
 
diff --git a/llvm/utils/lit/tests/Inputs/fake-externals/diff b/llvm/utils/lit/tests/Inputs/fake-externals/diff
index 9d9612dca4d2e..ab05763f44c82 100755
--- a/llvm/utils/lit/tests/Inputs/fake-externals/diff
+++ b/llvm/utils/lit/tests/Inputs/fake-externals/diff
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import fake_external
 
diff --git a/llvm/utils/lit/tests/Inputs/fake-externals/env b/llvm/utils/lit/tests/Inputs/fake-externals/env
index 9d9612dca4d2e..ab05763f44c82 100755
--- a/llvm/utils/lit/tests/Inputs/fake-externals/env
+++ b/llvm/utils/lit/tests/Inputs/fake-externals/env
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import fake_external
 
diff --git a/llvm/utils/lit/tests/Inputs/fake-externals/export b/llvm/utils/lit/tests/Inputs/fake-externals/export
index 9d9612dca4d2e..ab05763f44c82 100755
--- a/llvm/utils/lit/tests/Inputs/fake-externals/export
+++ b/llvm/utils/lit/tests/Inputs/fake-externals/export
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import fake_external
 
diff --git a/llvm/utils/lit/tests/Inputs/fake-externals/mkdir b/llvm/utils/lit/tests/Inputs/fake-externals/mkdir
index 9d9612dca4d2e..ab05763f44c82 100755
--- a/llvm/utils/lit/tests/Inputs/fake-externals/mkdir
+++ b/llvm/utils/lit/tests/Inputs/fake-externals/mkdir
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import fake_external
 
diff --git a/llvm/utils/lit/tests/Inputs/fake-externals/rm b/llvm/utils/lit/tests/Inputs/fake-externals/rm
index 9d9612dca4d2e..ab05763f44c82 100755
--- a/llvm/utils/lit/tests/Inputs/fake-externals/rm
+++ b/llvm/utils/lit/tests/Inputs/fake-externals/rm
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import fake_external
 
diff --git a/llvm/utils/lit/tests/Inputs/googletest-crash/DummySubDir/OneTest.py b/llvm/utils/lit/tests/Inputs/googletest-crash/DummySubDir/OneTest.py
index f8fe95cbfbb30..4573cbd136aaa 100644
--- a/llvm/utils/lit/tests/Inputs/googletest-crash/DummySubDir/OneTest.py
+++ b/llvm/utils/lit/tests/Inputs/googletest-crash/DummySubDir/OneTest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 import sys
diff --git a/llvm/utils/lit/tests/Inputs/googletest-detect-duplicate/DummySubDir/OneTest.py b/llvm/utils/lit/tests/Inputs/googletest-detect-duplicate/DummySubDir/OneTest.py
index bd48ccc6d63a6..7404103d54fc3 100644
--- a/llvm/utils/lit/tests/Inputs/googletest-detect-duplicate/DummySubDir/OneTest.py
+++ b/llvm/utils/lit/tests/Inputs/googletest-detect-duplicate/DummySubDir/OneTest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 import sys
diff --git a/llvm/utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py b/llvm/utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py
index 4816459dee45a..c430bc99e5548 100644
--- a/llvm/utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py
+++ b/llvm/utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py
@@ -1,3 +1,3 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 raise SystemExit("We are not a valid gtest executable!")
diff --git a/llvm/utils/lit/tests/Inputs/googletest-format-respect-gtest-sharding-env-vars/DummySubDir/OneTest.py b/llvm/utils/lit/tests/Inputs/googletest-format-respect-gtest-sharding-env-vars/DummySubDir/OneTest.py
index 0aa5d0ba39cbf..411a93e5f756f 100644
--- a/llvm/utils/lit/tests/Inputs/googletest-format-respect-gtest-sharding-env-vars/DummySubDir/OneTest.py
+++ b/llvm/utils/lit/tests/Inputs/googletest-format-respect-gtest-sharding-env-vars/DummySubDir/OneTest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 import sys
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 c45a710d52dae..21b38ef219999 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 os
 import sys
diff --git a/llvm/utils/lit/tests/Inputs/googletest-no-sharding/DummySubDir/OneTest.py b/llvm/utils/lit/tests/Inputs/googletest-no-sharding/DummySubDir/OneTest.py
index 38d76cd637fb5..140da7558065a 100644
--- a/llvm/utils/lit/tests/Inputs/googletest-no-sharding/DummySubDir/OneTest.py
+++ b/llvm/utils/lit/tests/Inputs/googletest-no-sharding/DummySubDir/OneTest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 import sys
diff --git a/llvm/utils/lit/tests/Inputs/googletest-prefix/DummySubDir/test_one.py b/llvm/utils/lit/tests/Inputs/googletest-prefix/DummySubDir/test_one.py
index 0aa5d0ba39cbf..411a93e5f756f 100644
--- a/llvm/utils/lit/tests/Inputs/googletest-prefix/DummySubDir/test_one.py
+++ b/llvm/utils/lit/tests/Inputs/googletest-prefix/DummySubDir/test_one.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 import sys
diff --git a/llvm/utils/lit/tests/Inputs/googletest-sanitizer-error/DummySubDir/OneTest.py b/llvm/utils/lit/tests/Inputs/googletest-sanitizer-error/DummySubDir/OneTest.py
index 0811149b1110c..55906c9cf468b 100644
--- a/llvm/utils/lit/tests/Inputs/googletest-sanitizer-error/DummySubDir/OneTest.py
+++ b/llvm/utils/lit/tests/Inputs/googletest-sanitizer-error/DummySubDir/OneTest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 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 d1698c69f4d12..53d8c41924b95 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 os
 import sys
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 a5a2bc9da8af7..b6c85833684ee 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-format/external_shell/write-control-chars.py b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-control-chars.py
index 34f08a03de0e7..05febc5413915 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-control-chars.py
+++ b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-control-chars.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 from __future__ import print_function
 import sys
diff --git a/llvm/utils/lit/tests/Inputs/shtest-not-posix/fail-signal.py b/llvm/utils/lit/tests/Inputs/shtest-not-posix/fail-signal.py
index 01db32585d071..43f90c14210fb 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-not-posix/fail-signal.py
+++ b/llvm/utils/lit/tests/Inputs/shtest-not-posix/fail-signal.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import os
 import signal
diff --git a/llvm/utils/lit/tests/Inputs/shtest-not/fail.py b/llvm/utils/lit/tests/Inputs/shtest-not/fail.py
index d64b8cb0f895a..a01abefad1124 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-not/fail.py
+++ b/llvm/utils/lit/tests/Inputs/shtest-not/fail.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import print_environment
 import sys
diff --git a/llvm/utils/lit/tests/Inputs/shtest-not/fail2.py b/llvm/utils/lit/tests/Inputs/shtest-not/fail2.py
index e9fb0bc0f91e0..e57f190cce572 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-not/fail2.py
+++ b/llvm/utils/lit/tests/Inputs/shtest-not/fail2.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import print_environment
 import sys
diff --git a/llvm/utils/lit/tests/Inputs/shtest-not/pass.py b/llvm/utils/lit/tests/Inputs/shtest-not/pass.py
index bd113596b7db0..9d5f8bf69ff42 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-not/pass.py
+++ b/llvm/utils/lit/tests/Inputs/shtest-not/pass.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import print_environment
 
diff --git a/llvm/utils/lit/tests/Inputs/shtest-output-printing/write-a-lot.py b/llvm/utils/lit/tests/Inputs/shtest-output-printing/write-a-lot.py
index 5dbb94a41cbfd..5d3926a397425 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-output-printing/write-a-lot.py
+++ b/llvm/utils/lit/tests/Inputs/shtest-output-printing/write-a-lot.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 2ad14c4017eab..6c5a841d9196c 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/write-to-stderr.py b/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py
index 9463251d823ab..f5e78b157a5d4 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 357089d4899b5..56919479c79ac 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-gisel-cov.py b/llvm/utils/llvm-gisel-cov.py
index 9d9526e0558a5..e55f7a03f3831 100755
--- 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-original-di-preservation.py b/llvm/utils/llvm-original-di-preservation.py
index cdca2ec8153b8..af79a553efa8b 100755
--- a/llvm/utils/llvm-original-di-preservation.py
+++ b/llvm/utils/llvm-original-di-preservation.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Debugify summary for the original debug info testing.
 #
diff --git a/llvm/utils/merge-json.py b/llvm/utils/merge-json.py
index f5b9dcf11c4cd..23db551b16666 100644
--- a/llvm/utils/merge-json.py
+++ b/llvm/utils/merge-json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 """A command line utility to merge two JSON files.
 
 This is a python program that merges two JSON files into a single one. The
diff --git a/llvm/utils/release/findRegressions-nightly.py b/llvm/utils/release/findRegressions-nightly.py
index 1fcc54d33deb6..99d872631a6b1 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 81fbfa980a3a6..6e855ef835363 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/remote-exec.py b/llvm/utils/remote-exec.py
index 4d646c5d3e282..9c586e7e7ef3e 100644
--- a/llvm/utils/remote-exec.py
+++ b/llvm/utils/remote-exec.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/llvm/utils/schedcover.py b/llvm/utils/schedcover.py
index caa73b6d6a747..04b2f6a23182b 100755
--- a/llvm/utils/schedcover.py
+++ b/llvm/utils/schedcover.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # This creates a CSV file from the output of the debug output of subtarget:
 #   llvm-tblgen --gen-subtarget --debug-only=subtarget-emitter
diff --git a/llvm/utils/shuffle_fuzz.py b/llvm/utils/shuffle_fuzz.py
index c03c77ce092a6..f3619edf3108b 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 f51945b530d3f..192a607d50bf0 100755
--- 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 d30efd0b438d1..d62d2c965dc60 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/testgen/mc-bundling-x86-gen.py b/llvm/utils/testgen/mc-bundling-x86-gen.py
index a75f94bec814f..283a26a9997d6 100644
--- a/llvm/utils/testgen/mc-bundling-x86-gen.py
+++ b/llvm/utils/testgen/mc-bundling-x86-gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Auto-generates an exhaustive and repetitive test for correct bundle-locked
 # alignment on x86.
diff --git a/llvm/utils/unicode-case-fold.py b/llvm/utils/unicode-case-fold.py
index 4afb41d4060f0..452fe76e4148a 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/wciia.py b/llvm/utils/wciia.py
index 7240d3c2a9ff2..3391576fa3cdf 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
 



More information about the llvm-commits mailing list