[clang] [clang-tools-extra] [compiler-rt] [libc] [libcxx] [lld] [lldb] [llvm] [mlir] [openmp] [polly] Python-related cleanups (PR #163566)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 15 07:35:03 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clangd
Author: Ross Burton (rossburton)
<details>
<summary>Changes</summary>
Ensure that the nested native CMake build uses the same Python interpreter as the outer build.
Unify python shebangs so that they use `python3` everywhere, instead of a mix of `python` and `python3`.
---
Patch is 69.80 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/163566.diff
185 Files Affected:
- (modified) clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py (+1-1)
- (modified) clang-tools-extra/clangd/test/remote-index/pipeline_helper.py (+1-1)
- (modified) clang/bindings/python/examples/cindex/cindex-dump.py (+1-1)
- (modified) clang/bindings/python/examples/cindex/cindex-includes.py (+1-1)
- (modified) clang/docs/tools/generate_formatted_state.py (+1-1)
- (modified) clang/test/Analysis/check-analyzer-fixit.py (+1-1)
- (modified) clang/test/Analysis/csv2json.py (+1-1)
- (modified) clang/test/Driver/ftime-trace-sections.py (+1-1)
- (modified) clang/tools/include-mapping/test.py (+1-1)
- (modified) clang/tools/scan-build/bin/set-xcode-analyzer (+1-1)
- (modified) clang/tools/scan-view/bin/scan-view (+1-1)
- (modified) clang/tools/scan-view/share/Reporter.py (+1-1)
- (modified) clang/tools/scan-view/share/startfile.py (+1-1)
- (modified) clang/utils/ABITest/ABITestGen.py (+1-1)
- (modified) clang/utils/CIndex/completion_logger_server.py (+1-1)
- (modified) clang/utils/CaptureCmd (+1-1)
- (modified) clang/utils/CmpDriver (+1-1)
- (modified) clang/utils/FindSpecRefs (+1-1)
- (modified) clang/utils/FuzzTest (+1-1)
- (modified) clang/utils/TestUtils/deep-stack.py (+1-1)
- (modified) clang/utils/analyzer/CmpRuns.py (+1-1)
- (modified) clang/utils/analyzer/SATest.py (+1-1)
- (modified) clang/utils/analyzer/SATestAdd.py (+1-1)
- (modified) clang/utils/analyzer/SATestBuild.py (+1-1)
- (modified) clang/utils/analyzer/SATestUpdateDiffs.py (+1-1)
- (modified) clang/utils/analyzer/SumTimerInfo.py (+1-1)
- (modified) clang/utils/analyzer/exploded-graph-rewriter.py (+1-1)
- (modified) clang/utils/check_cfc/check_cfc.py (+1-1)
- (modified) clang/utils/check_cfc/obj_diff.py (+1-1)
- (modified) clang/utils/check_cfc/test_check_cfc.py (+1-1)
- (modified) clang/utils/clangdiag.py (+1-1)
- (modified) clang/utils/modfuzz.py (+1-1)
- (modified) clang/utils/token-delta.py (+1-1)
- (modified) clang/www/builtins.py (+1-1)
- (modified) compiler-rt/lib/asan/scripts/asan_symbolize.py (+1-1)
- (modified) compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py (+1-1)
- (modified) compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py (+1-1)
- (modified) compiler-rt/lib/sanitizer_common/scripts/sancov.py (+1-1)
- (modified) cross-project-tests/debuginfo-tests/dexter/dexter.py (+1-1)
- (modified) libc/AOR_v20.02/math/tools/plot.py (+1-1)
- (modified) libc/utils/docgen/docgen.py (+1-1)
- (modified) libcxx/test/libcxx-03/transitive_includes/to_csv.py (+1-1)
- (modified) libcxx/test/libcxx/transitive_includes/to_csv.py (+1-1)
- (modified) libcxx/utils/generate_abi_list.py (+1-1)
- (modified) libcxx/utils/generate_escaped_output_table.py (+1-1)
- (modified) libcxx/utils/generate_extended_grapheme_cluster_table.py (+1-1)
- (modified) libcxx/utils/generate_extended_grapheme_cluster_test.py (+1-1)
- (modified) libcxx/utils/generate_feature_test_macro_components.py (+1-1)
- (modified) libcxx/utils/generate_indic_conjunct_break_table.py (+1-1)
- (modified) libcxx/utils/generate_iwyu_mapping.py (+1-1)
- (modified) libcxx/utils/generate_width_estimation_table.py (+1-1)
- (modified) libcxx/utils/run.py (+1-1)
- (modified) libcxx/utils/ssh.py (+1-1)
- (modified) libcxx/utils/sym_diff.py (+1-1)
- (modified) lld/test/MachO/tools/generate-cfi-funcs.py (+1-1)
- (modified) lld/test/MachO/tools/validate-unwind-info.py (+1-1)
- (modified) lld/utils/benchmark.py (+1-1)
- (modified) lldb/docs/use/tutorials/writing-custom-commands.md (+1-1)
- (modified) lldb/examples/python/armv7_cortex_m_target_defintion.py (+1-1)
- (modified) lldb/examples/python/bsd.py (+1-1)
- (modified) lldb/examples/python/cmdtemplate.py (+1-1)
- (modified) lldb/examples/python/delta.py (+1-1)
- (modified) lldb/examples/python/disasm-stress-test.py (+1-1)
- (modified) lldb/examples/python/disasm.py (+1-1)
- (modified) lldb/examples/python/file_extract.py (+1-1)
- (modified) lldb/examples/python/gdbremote.py (+1-1)
- (modified) lldb/examples/python/globals.py (+1-1)
- (modified) lldb/examples/python/in_call_stack.py (+1-1)
- (modified) lldb/examples/python/lldb_module_utils.py (+1-1)
- (modified) lldb/examples/python/lldbtk.py (+1-1)
- (modified) lldb/examples/python/mach_o.py (+1-1)
- (modified) lldb/examples/python/memory.py (+1-1)
- (modified) lldb/examples/python/operating_system.py (+1-1)
- (modified) lldb/examples/python/performance.py (+1-1)
- (modified) lldb/examples/python/process_events.py (+1-1)
- (modified) lldb/examples/python/sbvalue.py (+1-1)
- (modified) lldb/examples/python/shadow.py (+1-1)
- (modified) lldb/examples/python/sources.py (+1-1)
- (modified) lldb/examples/python/stacks.py (+1-1)
- (modified) lldb/examples/python/symbolication.py (+1-1)
- (modified) lldb/examples/python/types.py (+1-1)
- (modified) lldb/examples/python/x86_64_linux_target_definition.py (+1-1)
- (modified) lldb/examples/python/x86_64_qemu_target_definition.py (+1-1)
- (modified) lldb/examples/python/x86_64_target_definition.py (+1-1)
- (modified) lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py (+1-1)
- (modified) lldb/scripts/analyze-project-deps.py (+1-1)
- (modified) lldb/scripts/verify_api.py (+1-1)
- (modified) lldb/test/API/dotest.py (+1-1)
- (modified) lldb/test/API/functionalities/plugins/python_os_plugin/operating_system2.py (+1-1)
- (modified) lldb/test/API/functionalities/plugins/python_os_plugin/os_plugin_in_dsym/operating_system.py (+1-1)
- (modified) lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py (+1-1)
- (modified) lldb/test/API/functionalities/postmortem/FreeBSDKernel/tools/copy-sparse.py (+1-1)
- (modified) lldb/test/API/test_runner/test/inferior.py (+1-1)
- (modified) lldb/test/API/test_runner/test/test_process_control.py (+1-1)
- (modified) lldb/test/Shell/Quit/expect_exit_code.py (+1-1)
- (modified) lldb/test/Shell/Register/Core/Inputs/strip-coredump.py (+1-1)
- (modified) lldb/test/Shell/ScriptInterpreter/Python/Crashlog/patch-crashlog.py (+1-1)
- (modified) lldb/test/Shell/helper/build.py (+1-1)
- (modified) lldb/utils/lui/lui.py (+1-1)
- (modified) lldb/utils/lui/sandbox.py (+1-1)
- (modified) llvm/cmake/modules/CrossCompile.cmake (+1)
- (modified) llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py (+1-1)
- (modified) llvm/examples/Kaleidoscope/MCJIT/cached/split-lib.py (+1-1)
- (modified) llvm/examples/Kaleidoscope/MCJIT/complete/genk-timing.py (+1-1)
- (modified) llvm/examples/Kaleidoscope/MCJIT/complete/split-lib.py (+1-1)
- (modified) llvm/examples/Kaleidoscope/MCJIT/lazy/genk-timing.py (+1-1)
- (modified) llvm/test/BugPoint/compile-custom.ll.py (+1-1)
- (modified) llvm/test/Other/opt-bisect-helper.py (+1-1)
- (modified) llvm/test/TableGen/JSON-check.py (+1-1)
- (modified) llvm/tools/opt-viewer/extract-reproducers.py (+1-1)
- (modified) llvm/tools/opt-viewer/opt-diff.py (+1-1)
- (modified) llvm/tools/opt-viewer/opt-stats.py (+1-1)
- (modified) llvm/tools/opt-viewer/opt-viewer.py (+1-1)
- (modified) llvm/tools/opt-viewer/optrecord.py (+1-1)
- (modified) llvm/utils/DSAclean.py (+1-1)
- (modified) llvm/utils/DSAextract.py (+1-1)
- (modified) llvm/utils/Misc/zkill (+1-1)
- (modified) llvm/utils/Reviewing/find_interesting_reviews.py (+1-1)
- (modified) llvm/utils/Target/ARM/analyze-match-table.py (+1-1)
- (modified) llvm/utils/abtest.py (+1-1)
- (modified) llvm/utils/bisect (+1-1)
- (modified) llvm/utils/bugpoint_gisel_reducer.py (+1-1)
- (modified) llvm/utils/chunk-print-before-all.py (+1-1)
- (modified) llvm/utils/clang-parse-diagnostics-file (+1-1)
- (modified) llvm/utils/convert-constraint-log-to-z3.py (+1-1)
- (modified) llvm/utils/create_ladder_graph.py (+1-1)
- (modified) llvm/utils/docker/scripts/llvm_checksum/llvm_checksum.py (+1-1)
- (modified) llvm/utils/extract-section.py (+1-1)
- (modified) llvm/utils/extract_symbols.py (+1-1)
- (modified) llvm/utils/extract_vplan.py (+1-1)
- (modified) llvm/utils/indirect_calls.py (+1-1)
- (modified) llvm/utils/lint/common_lint.py (+1-1)
- (modified) llvm/utils/lint/cpp_lint.py (+1-1)
- (modified) llvm/utils/lint/generic_lint.py (+1-1)
- (modified) llvm/utils/lit/lit/ProgressBar.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/check_path.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/fake-externals/cd (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/fake-externals/diff (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/fake-externals/env (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/fake-externals/export (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/fake-externals/mkdir (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/fake-externals/rm (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/googletest-crash/DummySubDir/OneTest.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/googletest-detect-duplicate/DummySubDir/OneTest.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/googletest-format-respect-gtest-sharding-env-vars/DummySubDir/OneTest.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/googletest-format/DummySubDir/OneTest.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/googletest-no-sharding/DummySubDir/OneTest.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/googletest-prefix/DummySubDir/test_one.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/googletest-sanitizer-error/DummySubDir/OneTest.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/googletest-timeout/DummySubDir/OneTest.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-control-chars.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/shtest-not/fail.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/shtest-not/fail2.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/shtest-not/pass.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/shtest-output-printing/write-a-lot.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/shtest-shell/check_args.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py (+1-1)
- (modified) llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py (+1-1)
- (modified) llvm/utils/llvm-gisel-cov.py (+1-1)
- (modified) llvm/utils/llvm-original-di-preservation.py (+1-1)
- (modified) llvm/utils/merge-json.py (+1-1)
- (modified) llvm/utils/prepare-code-coverage-artifact.py (+1-1)
- (modified) llvm/utils/release/findRegressions-nightly.py (+1-1)
- (modified) llvm/utils/release/findRegressions-simple.py (+1-1)
- (modified) llvm/utils/remote-exec.py (+1-1)
- (modified) llvm/utils/schedcover.py (+1-1)
- (modified) llvm/utils/shuffle_fuzz.py (+1-1)
- (modified) llvm/utils/shuffle_select_fuzz_tester.py (+1-1)
- (modified) llvm/utils/sort_includes.py (+1-1)
- (modified) llvm/utils/testgen/mc-bundling-x86-gen.py (+1-1)
- (modified) llvm/utils/unicode-case-fold.py (+1-1)
- (modified) llvm/utils/wciia.py (+1-1)
- (modified) mlir/utils/lldb-scripts/action_debugging.py (+1-1)
- (modified) openmp/runtime/tools/summarizeStats.py (+1-1)
- (modified) polly/lib/External/isl/imath/tests/gmp-compat-test/genctest.py (+1-1)
- (modified) polly/lib/External/isl/imath/tests/gmp-compat-test/gendata.py (+1-1)
- (modified) polly/lib/External/isl/imath/tests/gmp-compat-test/genpytest.py (+1-1)
- (modified) polly/lib/External/isl/imath/tests/gmp-compat-test/gmpapi.py (+1-1)
- (modified) polly/lib/External/isl/imath/tests/gmp-compat-test/runtest.py (+1-1)
- (modified) polly/lib/External/isl/imath/tools/findthreshold.py (+1-1)
- (modified) polly/lib/External/isl/imath/tools/mkdoc.py (+1-1)
- (modified) polly/utils/jscop2cloog.py (+1-1)
- (modified) polly/utils/pyscop/jscop2iscc.py (+1-1)
``````````diff
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 49a1b14932644..6158876d15f76 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/clangd/test/remote-index/pipeline_helper.py b/clang-tools-extra/clangd/test/remote-index/pipeline_helper.py
index afdac985221a7..c9432341d304a 100644
--- a/clang-tools-extra/clangd/test/remote-index/pipeline_helper.py
+++ b/clang-tools-extra/clangd/test/remote-index/pipeline_helper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# ===- pipeline_helper.py - Remote Index pipeline Helper *- python -------*--===#
#
diff --git a/clang/bindings/python/examples/cindex/cindex-dump.py b/clang/bindings/python/examples/cindex/cindex-dump.py
index 10c3e4ba2dba4..79d3441e87fad 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 4e8bae19005cd..0b021f4554f59 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/generate_formatted_state.py b/clang/docs/tools/generate_formatted_state.py
index 2de43dc383f55..f857320ada1b7 100755
--- a/clang/docs/tools/generate_formatted_state.py
+++ b/clang/docs/tools/generate_formatted_state.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# A tool to parse creates a document outlining how clang formatted the
# LLVM project is.
diff --git a/clang/test/Analysis/check-analyzer-fixit.py b/clang/test/Analysis/check-analyzer-fixit.py
index b616255de89b0..5c19461fd5d82 100644
--- a/clang/test/Analysis/check-analyzer-fixit.py
+++ b/clang/test/Analysis/check-analyzer-fixit.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# ===- check-analyzer-fixit.py - Static Analyzer test helper ---*- python -*-===#
#
diff --git a/clang/test/Analysis/csv2json.py b/clang/test/Analysis/csv2json.py
index 6e1aca9a51779..642610140153e 100644
--- a/clang/test/Analysis/csv2json.py
+++ b/clang/test/Analysis/csv2json.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# ===- csv2json.py - Static Analyzer test helper ---*- python -*-===#
#
diff --git a/clang/test/Driver/ftime-trace-sections.py b/clang/test/Driver/ftime-trace-sections.py
index 02afa4ac54eb7..46248e546d94a 100644
--- a/clang/test/Driver/ftime-trace-sections.py
+++ b/clang/test/Driver/ftime-trace-sections.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import json, sys, time
diff --git a/clang/tools/include-mapping/test.py b/clang/tools/include-mapping/test.py
index 81803855dac8f..7293b5a19d883 100755
--- a/clang/tools/include-mapping/test.py
+++ b/clang/tools/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/scan-build/bin/set-xcode-analyzer b/clang/tools/scan-build/bin/set-xcode-analyzer
index 8e4a5794594a6..5d52c96c59052 100755
--- a/clang/tools/scan-build/bin/set-xcode-analyzer
+++ b/clang/tools/scan-build/bin/set-xcode-analyzer
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# [PR 11661] Note that we hardwire to /usr/bin/python because we
# want to the use the system version of Python on Mac OS X.
diff --git a/clang/tools/scan-view/bin/scan-view b/clang/tools/scan-view/bin/scan-view
index d01aebb4029a7..f3375804654d2 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 21874b378687e..aa16a47524c8b 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 c72475e8b6212..a10df214d0046 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 119b3299ffa60..b04cc3d29d8d8 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 ff33331fc53c5..5888fb10fc768 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 705585c3bb041..5ffdfe560edf0 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 12ce7a3250f66..c2b6ab5ecb1aa 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 9097f93f28d63..3ad581b3dd7d1 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 0e043df7cf08e..c4c956b6eb501 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 4cf5789abdb12..85376dcedc280 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
diff --git a/clang/utils/analyzer/CmpRuns.py b/clang/utils/analyzer/CmpRuns.py
index 94c9907bff315..76444d2a44580 100644
--- 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/SATest.py b/clang/utils/analyzer/SATest.py
index d70e33f24c2df..8b07effd8b83b 100755
--- a/clang/utils/analyzer/SATest.py
+++ b/clang/utils/analyzer/SATest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import argparse
import sys
diff --git a/clang/utils/analyzer/SATestAdd.py b/clang/utils/analyzer/SATestAdd.py
index 84e6d44b42822..05bebabb3601b 100644
--- 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 66e1ab72985cd..ff1a42de2c569 100644
--- 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 1c5ffaaa2e330..e1416510d0178 100644
--- 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 01614e41a065c..9772bff335f4b 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 dcda91e8a6809..9198fcbfd184e 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 8d42ec532bbb7..6b793937a5d08 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 9d602593a4e1a..02e0ebdf0efcd 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 cd4441b702cde..a23ad2ccbee41 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/clangdiag.py b/clang/utils/clangdiag.py
index 8c47b1cbcfff3..e4b94e5757cbc 100755
--- a/clang/utils/clangdiag.py
+++ b/clang/utils/clangdiag.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# ----------------------------------------------------------------------
# Be sure to add the python path that points to the LLDB shared library.
diff --git a/clang/utils/modfuzz.py b/clang/utils/modfuzz.py
index 49ac522cd17e1..7c00102c2cca5 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 7c2375c03013f..4fe5798033f41 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/clang/www/builtins.py b/clang/www/builtins.py
index 849e6bd4a816d..235de1a157cd1 100755
--- a/clang/www/builtins.py
+++ b/clang/www/builtins.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys, fileinput
diff --git a/compiler-rt/lib/asan/scripts/asan_symbolize.py b/compiler-rt/lib/asan/scripts/asan_symbolize.py
index 8ecd66c745119..f60a8307ec60e 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/fuzzer/scripts/unbalanced_allocs.py b/compiler-rt/lib/fuzzer/scripts/unbalanced_allocs.py
index 7ba7e09cb4e50..c8c19a017eb3f 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/gen_dynamic_list.py b/compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py
index fdbceae165e0d..e4b33e6637b0e 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/sancov.py b/compiler-rt/lib/sanitizer_common/scripts/sancov.py
index 31055086350ab..06906aabf18e8 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/cross-project-tests/debuginfo-tests/dexter/dexter.py b/cross-project-tests/debuginfo-tests/dexter/dexter.py
index 8473cff3c7135..ac507dc2f5ee0 100755
--- a/cross-project-tests/debuginfo-tests/dexter/dexter.py
+++ b/cross-project-tests/debuginfo-tests/dexter/dexter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# DExTer : Debugging Experience Tester
# ~~~~~~ ~ ~~ ~ ~~
#
diff --git a/libc/AOR_v20.02/math/tools/plot.py b/libc/AOR_v20.02/math/tools/plot.py
index 9ce6b0308dd57..4bbd866993c89 100755
--- a/libc/AOR_v20.02/math/tools/plot.py
+++ b/libc/AOR_v20.02/math/tools/plot.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# ULP error plot tool.
#
diff --git a/libc/utils/docgen/docgen.py b/libc/utils/docgen/docgen.py
index 5a57987b3c51e..59cfbd54561c7 100755
--- a/libc/utils/docgen/docgen.py
+++ b/libc/utils/docgen/docgen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# ====- Generate documentation for libc functions ------------*- python -*--==#
#
diff --git a/libcxx/test/libcxx-03/transitive_includes/to_csv.py b/libcxx/test/libcxx-03/transitive_includes/to_csv.py
index 69d94deedf6f5..658aa6e657632 100755
--- a/libcxx/test/libcxx-03/transitive_includes/to_csv.py
+++ b/libcxx/test/libcxx-03/transitive_includes/to_csv.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/test/libcxx/transitive_includes/to_csv.py b/libcxx/test/libcxx/transitive_includes/to_csv.py
index 69d94deedf6f5..658aa6e657632 100755
--- a/libcxx/test/libcxx/transitive_includes/to_csv.py
+++ b/libcxx/test/libcxx/transitive_includes/to_csv.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_abi_list.py b/libcxx/utils/generate_abi_list.py
index 94e49dca60af1..5e99b14bec72e 100755
--- a/libcxx/utils/generate_abi_list.py
+++ b/libcxx/utils/generate_abi_list.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_escaped_output_table.py b/libcxx/utils/generate_escaped_output_table.py
index 59dd707ae6126..6be7d128ed5f1 100755
--- a/libcxx/utils/generate_escaped_output_table.py
+++ b/libcxx/utils/generate_escaped_output_table.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_extended_grapheme_cluster_table.py b/libcxx/utils/generate_extended_grapheme_cluster_table.py
index eba88a4f48776..7bfb4f41520c7 100755
--- a/libcxx/utils/generate_extended_grapheme_cluster_table.py
+++ b/libcxx/utils/generate_extended_grapheme_cluster_table.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_extended_grapheme_cluster_test.py b/libcxx/utils/generate_extended_grapheme_cluster_test.py
index e0a6003ecd53c..29a3e14014e8d 100755
--- a/libcxx/utils/generate_extended_grapheme_cluster_test.py
+++ b/libcxx/utils/generate_extended_grapheme_cluster_test.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 f6f252751b3e3..5c9893bf2c742 100644
--- 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
from builtins import range
diff --git a/libcxx/utils/generate_indic_conjunct_break_table.py b/libcxx/utils/generate_indic_conjunct_break_table.py
index 580d8157ffebf..4ecb9a135948b 100755
--- a/libcxx/utils/generate_indic_conjunct_break_table.py
+++ b/libcxx/utils/generate_indic_conjunct_break_table.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_iwyu_mapping.py b/libcxx/utils/generate_iwyu_mapping.py
index ab3e3f14e14d8..35da70f62f264 100644
--- a/libcxx/utils/generate_iwyu_mapping.py
+++ b/libcxx/utils/generate_iwyu_mapping.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import argparse
import libcxx.header_information
diff --git a/libcxx/utils/generate_width_estimation_table.py b/libcxx/utils/generate_width_estimation_table.py
index f81f0ba77489e..3f41ce1657bdd 100644
--- a/libcxx/utils/generate_width_estimation_table.py
+++ b/libcxx/utils/generate_width_estimation_table.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/run.py b/libcxx/utils/run.py
index 6b4d615444bcf..b97e1edf05a91 100755
--- a/libcxx/utils/run.py
+++ b/libcxx/utils/run.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# ===----------------------------------------------------------------------===##
#
# Part of the LLVM Project, under the Apache License v2.0 wit...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/163566
More information about the cfe-commits
mailing list