diff --git a/llvm/utils/update_cc_test_checks.py b/llvm/utils/update_cc_test_checks.py index df0de181bb4a..03d4931e17cb 100755 --- a/llvm/utils/update_cc_test_checks.py +++ b/llvm/utils/update_cc_test_checks.py @@ -20,6 +20,7 @@ import os import re import shlex +import shutil import subprocess import sys import tempfile @@ -166,7 +167,7 @@ def config(): common.warn('Could not determine clang builtins directory, some tests ' 'might not update correctly.') - if not distutils.spawn.find_executable(args.opt): + if not shutil.which(args.opt): # Many uses of this tool will not need an opt binary, because it's only # needed for updating a test that runs clang | opt | FileCheck. So we # defer this error message until we find that opt is actually needed.