diff --git a/clang/utils/clangdiag.py b/clang/utils/clangdiag.py --- a/clang/utils/clangdiag.py +++ b/clang/utils/clangdiag.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # 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 --- a/clang/utils/modfuzz.py +++ b/clang/utils/modfuzz.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/env python # To use: # 1) Update the 'decls' list below with your fuzzing configuration. diff --git a/compiler-rt/lib/sanitizer_common/scripts/litlint_test.py b/compiler-rt/lib/sanitizer_common/scripts/litlint_test.py --- a/compiler-rt/lib/sanitizer_common/scripts/litlint_test.py +++ b/compiler-rt/lib/sanitizer_common/scripts/litlint_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Tests for litlint.py # diff --git a/compiler-rt/test/sanitizer_common/android_commands/android_compile.py b/compiler-rt/test/sanitizer_common/android_commands/android_compile.py --- a/compiler-rt/test/sanitizer_common/android_commands/android_compile.py +++ b/compiler-rt/test/sanitizer_common/android_commands/android_compile.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import os, sys, subprocess from android_common import * diff --git a/compiler-rt/test/sanitizer_common/android_commands/android_run.py b/compiler-rt/test/sanitizer_common/android_commands/android_run.py --- a/compiler-rt/test/sanitizer_common/android_commands/android_run.py +++ b/compiler-rt/test/sanitizer_common/android_commands/android_run.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import os, signal, sys, subprocess, tempfile from android_common import * diff --git a/compiler-rt/test/sanitizer_common/ios_commands/iossim_compile.py b/compiler-rt/test/sanitizer_common/ios_commands/iossim_compile.py --- a/compiler-rt/test/sanitizer_common/ios_commands/iossim_compile.py +++ b/compiler-rt/test/sanitizer_common/ios_commands/iossim_compile.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import os, sys, subprocess diff --git a/compiler-rt/test/sanitizer_common/ios_commands/iossim_env.py b/compiler-rt/test/sanitizer_common/ios_commands/iossim_env.py --- a/compiler-rt/test/sanitizer_common/ios_commands/iossim_env.py +++ b/compiler-rt/test/sanitizer_common/ios_commands/iossim_env.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import os, sys, subprocess diff --git a/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py b/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py --- a/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py +++ b/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import json diff --git a/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py b/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py --- a/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py +++ b/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import glob, os, pipes, sys, subprocess diff --git a/debuginfo-tests/dexter/dexter.py b/debuginfo-tests/dexter/dexter.py --- a/debuginfo-tests/dexter/dexter.py +++ b/debuginfo-tests/dexter/dexter.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # DExTer : Debugging Experience Tester # ~~~~~~ ~ ~~ ~ ~~ # diff --git a/debuginfo-tests/llgdb-tests/llgdb.py b/debuginfo-tests/llgdb-tests/llgdb.py --- a/debuginfo-tests/llgdb-tests/llgdb.py +++ b/debuginfo-tests/llgdb-tests/llgdb.py @@ -1,4 +1,4 @@ -#!/bin/env python +#!/usr/bin/env python """ A gdb-compatible frontend for lldb that implements just enough commands to run the tests in the debuginfo-tests repository with lldb. diff --git a/libc/AOR_v20.02/math/tools/plot.py b/libc/AOR_v20.02/math/tools/plot.py --- a/libc/AOR_v20.02/math/tools/plot.py +++ b/libc/AOR_v20.02/math/tools/plot.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # ULP error plot tool. # diff --git a/libcxx/utils/google-benchmark/mingw.py b/libcxx/utils/google-benchmark/mingw.py --- 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 python # encoding: utf-8 import argparse diff --git a/lldb/examples/darwin/heap_find/heap.py b/lldb/examples/darwin/heap_find/heap.py --- a/lldb/examples/darwin/heap_find/heap.py +++ b/lldb/examples/darwin/heap_find/heap.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # This module is designed to live inside the "lldb" python package diff --git a/lldb/examples/python/armv7_cortex_m_target_defintion.py b/lldb/examples/python/armv7_cortex_m_target_defintion.py --- a/lldb/examples/python/armv7_cortex_m_target_defintion.py +++ b/lldb/examples/python/armv7_cortex_m_target_defintion.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #===-- armv7_cortex_m_target_definition.py.py ------------------*- C++ -*-===// # # The LLVM Compiler Infrastructure diff --git a/lldb/examples/python/bsd.py b/lldb/examples/python/bsd.py --- a/lldb/examples/python/bsd.py +++ b/lldb/examples/python/bsd.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from __future__ import print_function import cmd diff --git a/lldb/examples/python/cmdtemplate.py b/lldb/examples/python/cmdtemplate.py --- a/lldb/examples/python/cmdtemplate.py +++ b/lldb/examples/python/cmdtemplate.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # --------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py --- a/lldb/examples/python/crashlog.py +++ b/lldb/examples/python/crashlog.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. diff --git a/lldb/examples/python/delta.py b/lldb/examples/python/delta.py --- a/lldb/examples/python/delta.py +++ b/lldb/examples/python/delta.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # This module will enable GDB remote packet logging when the diff --git a/lldb/examples/python/disasm-stress-test.py b/lldb/examples/python/disasm-stress-test.py --- a/lldb/examples/python/disasm-stress-test.py +++ b/lldb/examples/python/disasm-stress-test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import argparse import datetime diff --git a/lldb/examples/python/disasm.py b/lldb/examples/python/disasm.py --- a/lldb/examples/python/disasm.py +++ b/lldb/examples/python/disasm.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. diff --git a/lldb/examples/python/file_extract.py b/lldb/examples/python/file_extract.py --- 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 python import string import struct diff --git a/lldb/examples/python/gdbremote.py b/lldb/examples/python/gdbremote.py --- a/lldb/examples/python/gdbremote.py +++ b/lldb/examples/python/gdbremote.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # This module will enable GDB remote packet logging when the diff --git a/lldb/examples/python/globals.py b/lldb/examples/python/globals.py --- a/lldb/examples/python/globals.py +++ b/lldb/examples/python/globals.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # For the shells csh, tcsh: diff --git a/lldb/examples/python/lldb_module_utils.py b/lldb/examples/python/lldb_module_utils.py --- a/lldb/examples/python/lldb_module_utils.py +++ b/lldb/examples/python/lldb_module_utils.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from __future__ import print_function import lldb diff --git a/lldb/examples/python/lldbtk.py b/lldb/examples/python/lldbtk.py --- a/lldb/examples/python/lldbtk.py +++ b/lldb/examples/python/lldbtk.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from __future__ import print_function import lldb diff --git a/lldb/examples/python/mach_o.py b/lldb/examples/python/mach_o.py --- a/lldb/examples/python/mach_o.py +++ b/lldb/examples/python/mach_o.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from __future__ import print_function import cmd diff --git a/lldb/examples/python/memory.py b/lldb/examples/python/memory.py --- a/lldb/examples/python/memory.py +++ b/lldb/examples/python/memory.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. diff --git a/lldb/examples/python/operating_system.py b/lldb/examples/python/operating_system.py --- a/lldb/examples/python/operating_system.py +++ b/lldb/examples/python/operating_system.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import lldb import struct diff --git a/lldb/examples/python/performance.py b/lldb/examples/python/performance.py --- a/lldb/examples/python/performance.py +++ b/lldb/examples/python/performance.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. diff --git a/lldb/examples/python/process_events.py b/lldb/examples/python/process_events.py --- a/lldb/examples/python/process_events.py +++ b/lldb/examples/python/process_events.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. diff --git a/lldb/examples/python/sbvalue.py b/lldb/examples/python/sbvalue.py --- a/lldb/examples/python/sbvalue.py +++ b/lldb/examples/python/sbvalue.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import lldb diff --git a/lldb/examples/python/shadow.py b/lldb/examples/python/shadow.py --- a/lldb/examples/python/shadow.py +++ b/lldb/examples/python/shadow.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from __future__ import print_function import lldb diff --git a/lldb/examples/python/sources.py b/lldb/examples/python/sources.py --- a/lldb/examples/python/sources.py +++ b/lldb/examples/python/sources.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from __future__ import print_function import lldb diff --git a/lldb/examples/python/stacks.py b/lldb/examples/python/stacks.py --- a/lldb/examples/python/stacks.py +++ b/lldb/examples/python/stacks.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from __future__ import print_function import lldb import optparse diff --git a/lldb/examples/python/symbolication.py b/lldb/examples/python/symbolication.py --- a/lldb/examples/python/symbolication.py +++ b/lldb/examples/python/symbolication.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. diff --git a/lldb/examples/python/types.py b/lldb/examples/python/types.py --- a/lldb/examples/python/types.py +++ b/lldb/examples/python/types.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #---------------------------------------------------------------------- # Be sure to add the python path that points to the LLDB shared library. diff --git a/lldb/examples/python/x86_64_linux_target_definition.py b/lldb/examples/python/x86_64_linux_target_definition.py --- a/lldb/examples/python/x86_64_linux_target_definition.py +++ b/lldb/examples/python/x86_64_linux_target_definition.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #===-- x86_64_linux_target_definition.py -----------------------------*- C++ -*-===// # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/lldb/examples/python/x86_64_qemu_target_definition.py b/lldb/examples/python/x86_64_qemu_target_definition.py --- a/lldb/examples/python/x86_64_qemu_target_definition.py +++ b/lldb/examples/python/x86_64_qemu_target_definition.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #===-- x86_64_qemu_target_definition.py -----------------------------*- C++ -*-===// # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/lldb/examples/python/x86_64_target_definition.py b/lldb/examples/python/x86_64_target_definition.py --- a/lldb/examples/python/x86_64_target_definition.py +++ b/lldb/examples/python/x86_64_target_definition.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #===-- x86_64_target_definition.py -----------------------------*- C++ -*-===// # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/lldb/scripts/analyze-project-deps.py b/lldb/scripts/analyze-project-deps.py --- 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 python import argparse import itertools diff --git a/lldb/scripts/reproducer-replay.py b/lldb/scripts/reproducer-replay.py --- a/lldb/scripts/reproducer-replay.py +++ b/lldb/scripts/reproducer-replay.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python3 from multiprocessing import Pool import multiprocessing diff --git a/lldb/test/API/functionalities/plugins/python_os_plugin/operating_system.py b/lldb/test/API/functionalities/plugins/python_os_plugin/operating_system.py --- a/lldb/test/API/functionalities/plugins/python_os_plugin/operating_system.py +++ b/lldb/test/API/functionalities/plugins/python_os_plugin/operating_system.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import lldb import struct diff --git a/lldb/test/API/functionalities/plugins/python_os_plugin/operating_system2.py b/lldb/test/API/functionalities/plugins/python_os_plugin/operating_system2.py --- a/lldb/test/API/functionalities/plugins/python_os_plugin/operating_system2.py +++ b/lldb/test/API/functionalities/plugins/python_os_plugin/operating_system2.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import lldb import struct diff --git a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py --- a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py +++ b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import lldb import struct diff --git a/lldb/test/Shell/helper/build.py b/lldb/test/Shell/helper/build.py --- a/lldb/test/Shell/helper/build.py +++ b/lldb/test/Shell/helper/build.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/env python from __future__ import print_function diff --git a/lldb/third_party/Python/module/progress/progress.py b/lldb/third_party/Python/module/progress/progress.py --- a/lldb/third_party/Python/module/progress/progress.py +++ b/lldb/third_party/Python/module/progress/progress.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from __future__ import print_function diff --git a/llvm/utils/DSAclean.py b/llvm/utils/DSAclean.py --- a/llvm/utils/DSAclean.py +++ b/llvm/utils/DSAclean.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python #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 --- a/llvm/utils/DSAextract.py +++ b/llvm/utils/DSAextract.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#!/usr/bin/env python #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/benchmark/mingw.py b/llvm/utils/benchmark/mingw.py --- a/llvm/utils/benchmark/mingw.py +++ b/llvm/utils/benchmark/mingw.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/env python # encoding: utf-8 import argparse diff --git a/llvm/utils/docker/scripts/llvm_checksum/llvm_checksum.py b/llvm/utils/docker/scripts/llvm_checksum/llvm_checksum.py --- 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/python +#!/usr/bin/env python """ A small program to compute checksums of LLVM checkout. """ from __future__ import absolute_import diff --git a/llvm/utils/lint/common_lint.py b/llvm/utils/lint/common_lint.py --- a/llvm/utils/lint/common_lint.py +++ b/llvm/utils/lint/common_lint.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # # 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 --- a/llvm/utils/lint/cpp_lint.py +++ b/llvm/utils/lint/cpp_lint.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # # 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 --- a/llvm/utils/lint/generic_lint.py +++ b/llvm/utils/lint/generic_lint.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # # 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/schedcover.py b/llvm/utils/schedcover.py --- a/llvm/utils/schedcover.py +++ b/llvm/utils/schedcover.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # 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/testgen/mc-bundling-x86-gen.py b/llvm/utils/testgen/mc-bundling-x86-gen.py --- a/llvm/utils/testgen/mc-bundling-x86-gen.py +++ b/llvm/utils/testgen/mc-bundling-x86-gen.py @@ -1,5 +1,5 @@ -#!/usr/bin/python +#!/usr/bin/env python # Auto-generates an exhaustive and repetitive test for correct bundle-locked # alignment on x86. diff --git a/openmp/runtime/tools/summarizeStats.py b/openmp/runtime/tools/summarizeStats.py --- a/openmp/runtime/tools/summarizeStats.py +++ b/openmp/runtime/tools/summarizeStats.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import pandas as pd import numpy as np diff --git a/polly/test/update_check.py b/polly/test/update_check.py --- a/polly/test/update_check.py +++ b/polly/test/update_check.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Polly/LLVM update_check.py diff --git a/polly/utils/jscop2cloog.py b/polly/utils/jscop2cloog.py --- a/polly/utils/jscop2cloog.py +++ b/polly/utils/jscop2cloog.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import argparse, os import json diff --git a/polly/utils/pyscop/jscop2iscc.py b/polly/utils/pyscop/jscop2iscc.py --- a/polly/utils/pyscop/jscop2iscc.py +++ b/polly/utils/pyscop/jscop2iscc.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python import argparse, isl, os import json