summaryrefslogtreecommitdiff
path: root/tools/scan-build-py/libscanbuild/arguments.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/scan-build-py/libscanbuild/arguments.py')
-rw-r--r--tools/scan-build-py/libscanbuild/arguments.py29
1 files changed, 15 insertions, 14 deletions
diff --git a/tools/scan-build-py/libscanbuild/arguments.py b/tools/scan-build-py/libscanbuild/arguments.py
index a5d0c6bda6613..58c56d2b6d290 100644
--- a/tools/scan-build-py/libscanbuild/arguments.py
+++ b/tools/scan-build-py/libscanbuild/arguments.py
@@ -12,6 +12,7 @@ earlier.)
It also implements basic validation methods, related to the command.
Validations are mostly calling specific help methods, or mangling values.
"""
+from __future__ import absolute_import, division, print_function
import os
import sys
@@ -134,10 +135,10 @@ def validate_args_for_analyze(parser, args, from_build_command):
if args.ctu_phases.analyze and not args.ctu_phases.collect \
and not os.path.exists(args.ctu_dir):
parser.error(message='missing CTU directory')
- # Check CTU capability via checking clang-func-mapping
- if not is_ctu_capable(args.func_map_cmd):
+ # Check CTU capability via checking clang-extdef-mapping
+ if not is_ctu_capable(args.extdef_map_cmd):
parser.error(message="""This version of clang does not support CTU
- functionality or clang-func-mapping command not found.""")
+ functionality or clang-extdef-mapping command not found.""")
def create_intercept_parser():
@@ -365,7 +366,7 @@ def create_analyze_parser(from_build_command):
'--ctu',
action='store_const',
const=CtuConfig(collect=True, analyze=True,
- dir='', func_map_cmd=''),
+ dir='', extdef_map_cmd=''),
dest='ctu_phases',
help="""Perform cross translation unit (ctu) analysis (both collect
and analyze phases) using default <ctu-dir> for temporary output.
@@ -381,7 +382,7 @@ def create_analyze_parser(from_build_command):
'--ctu-collect-only',
action='store_const',
const=CtuConfig(collect=True, analyze=False,
- dir='', func_map_cmd=''),
+ dir='', extdef_map_cmd=''),
dest='ctu_phases',
help="""Perform only the collect phase of ctu.
Keep <ctu-dir> for further use.""")
@@ -389,20 +390,20 @@ def create_analyze_parser(from_build_command):
'--ctu-analyze-only',
action='store_const',
const=CtuConfig(collect=False, analyze=True,
- dir='', func_map_cmd=''),
+ dir='', extdef_map_cmd=''),
dest='ctu_phases',
help="""Perform only the analyze phase of ctu. <ctu-dir> should be
present and will not be removed after analysis.""")
ctu.add_argument(
- '--use-func-map-cmd',
+ '--use-extdef-map-cmd',
metavar='<path>',
- dest='func_map_cmd',
- default='clang-func-mapping',
- help="""'%(prog)s' uses the 'clang-func-mapping' executable
- relative to itself for generating function maps for static
- analysis. One can override this behavior with this option by using
- the 'clang-func-mapping' packaged with Xcode (on OS X) or from the
- PATH.""")
+ dest='extdef_map_cmd',
+ default='clang-extdef-mapping',
+ help="""'%(prog)s' uses the 'clang-extdef-mapping' executable
+ relative to itself for generating external definition maps for
+ static analysis. One can override this behavior with this option
+ by using the 'clang-extdef-mapping' packaged with Xcode (on OS X)
+ or from the PATH.""")
return parser