How do you use a C ++ filter with llvm-cov message?

I am trying to use demangler with llvm-cov report tool. The following is the command I run:

llvm-cov report /path/to/executable -instr-profile /path/to/default.profdata /path/to/src/ -Xdemangler c++filt -Xdemangler -n

I tried changing the parameters and tried instead using "-Xdemangler = C ++ filt -Xdemangler = -n" and also using -no-strip-underscore instead of -n. He does not complain about the demangler, whereas if I make an obvious mistake with the command syntax, he will tell me, but the output will not be changed.

From the llvm-cov documentation:

-Xdemangler = <TOOL> | <TOOL-OPTION> Specify a demangler symbol. This can be used to make reports more human readable. This option can be specified several times to provide arguments to the demangur (for example, -Xdemangler C ++ filt -Xdemangler -n for C ++). It is expected that the demangler will read a list of characters separated by a newline from stdin and write a list divided into a new line with the same length on stdout.

I used the following to ensure that the C ++ filter works and it does the following:

c++filt -n _ZN4core6ZipperC2ENSt3__110shared_ptrIN8core_gen14PlatformZipperEEE

Conclusion:

core::Zipper::Zipper(std::__1::shared_ptr<core_gen::PlatformZipper>)

I need to use the -n option, or it will not be a demanger, but I do not understand why llvm-cov does not seem to use it correctly.

script, llvm-cov, ++-, , .

- ?

+4
1

, llvm-cov.

( -name-regex ) -Xdemangler:

llvm-cov report /path/to/exe -name-regex=\.* -instr-profile=default.profdata -Xdemangler=c++filt

, https://reviews.llvm.org/rL294136

+2

Source: https://habr.com/ru/post/1662587/


All Articles