Commit ae19b2c3 authored by Ryan Sleevi's avatar Ryan Sleevi Committed by Commit Bot

Run coverage reports through c++filt on Linux and macOS.

The code coverage reports from llvm-cov will emit detailed coverage
information for instantiated templates, but by default, will emit
the method names using their mangled form. llvm-cov allows for
providing a custom demangler.

This conditionally provides custom demangler, using c++filt when
running on Linux and macOS. Longer-term, a solution based on
llvm-symbolizer is more desirable for platform neutrality, but
this helps bridge the short-term need.

BUG=843246

Change-Id: I718016b05af0842ac148d06e968f362bc68b5fc8
Reviewed-on: https://chromium-review.googlesource.com/1060264
Commit-Queue: Ryan Sleevi <rsleevi@chromium.org>
Reviewed-by: default avatarAbhishek Arya <inferno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558863}
parent a4ed1412
......@@ -534,6 +534,8 @@ def _GeneratePerFileLineByLineCoverageInHtml(binary_paths, profdata_file_path,
subprocess_cmd.extend(
['-object=' + binary_path for binary_path in binary_paths[1:]])
_AddArchArgumentForIOSIfNeeded(subprocess_cmd, len(binary_paths))
if _GetHostPlatform() in ['linux', 'mac']:
subprocess_cmd.extend(['-Xdemangler', 'c++filt', '-Xdemangler', '-n'])
subprocess_cmd.extend(filters)
if ignore_filename_regex:
subprocess_cmd.append('-ignore-filename-regex=%s' % ignore_filename_regex)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment