From d49e75afbdad10e86ef5bfb6d53b86e2f7c63e50 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 1 Mar 2018 12:43:39 +0000 Subject: Revert "[analyzer] Support for naive cross translation unit analysis" Also revert "[analyzer] Fix a compiler warning" This reverts commits r326323 and r326324. Reason: the commits introduced a cyclic dependency in the build graph. This happens to work with cmake, but breaks out internal integrate. llvm-svn: 326432 --- clang/tools/scan-build-py/libscanbuild/clang.py | 27 +------------------------ 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'clang/tools/scan-build-py/libscanbuild/clang.py') diff --git a/clang/tools/scan-build-py/libscanbuild/clang.py b/clang/tools/scan-build-py/libscanbuild/clang.py index ab422066cab..192e708782c 100644 --- a/clang/tools/scan-build-py/libscanbuild/clang.py +++ b/clang/tools/scan-build-py/libscanbuild/clang.py @@ -8,13 +8,11 @@ Since Clang command line interface is so rich, but this project is using only a subset of that, it makes sense to create a function specific wrapper. """ -import subprocess import re from libscanbuild import run_command from libscanbuild.shell import decode -__all__ = ['get_version', 'get_arguments', 'get_checkers', 'is_ctu_capable', - 'get_triple_arch'] +__all__ = ['get_version', 'get_arguments', 'get_checkers'] # regex for activated checker ACTIVE_CHECKER_PATTERN = re.compile(r'^-analyzer-checker=(.*)$') @@ -154,26 +152,3 @@ def get_checkers(clang, plugins): raise Exception('Could not query Clang for available checkers.') return checkers - - -def is_ctu_capable(func_map_cmd): - """ Detects if the current (or given) clang and function mapping - executables are CTU compatible. """ - - try: - run_command([func_map_cmd, '-version']) - except (OSError, subprocess.CalledProcessError): - return False - return True - - -def get_triple_arch(command, cwd): - """Returns the architecture part of the target triple for the given - compilation command. """ - - cmd = get_arguments(command, cwd) - try: - separator = cmd.index("-triple") - return cmd[separator + 1] - except (IndexError, ValueError): - return "" -- cgit v1.2.3