[docs] Update llvm-cov gcov
authorFangrui Song <i@maskray.me>
Thu, 3 Jun 2021 19:36:27 +0000 (12:36 -0700)
committerFangrui Song <i@maskray.me>
Thu, 3 Jun 2021 19:36:27 +0000 (12:36 -0700)
Mention some new options.

Remove outdated information about -g and -O0. -g0 works. -O1/-O2/-O3 work.

llvm/docs/CommandGuide/llvm-cov.rst

index d6e638f..98885d4 100644 (file)
@@ -52,9 +52,7 @@ To use :program:`llvm-cov gcov`, you must first build an instrumented version
 of your application that collects coverage data as it runs. Compile with the
 ``-fprofile-arcs`` and ``-ftest-coverage`` options to add the
 instrumentation. (Alternatively, you can use the ``--coverage`` option, which
-includes both of those other options.) You should compile with debugging
-information (``-g``) and without optimization (``-O0``); otherwise, the
-coverage data cannot be accurately mapped back to the source code.
+includes both of those other options.)
 
 At the time you compile the instrumented code, a ``.gcno`` data file will be
 generated for each object file. These ``.gcno`` files contain half of the
@@ -105,6 +103,10 @@ OPTIONS
 
  Display branch counts instead of probabilities (requires -b).
 
+.. option:: -m, --demangled-names
+
+ Demangle function names.
+
 .. option:: -f, --function-summaries
 
  Show a summary of coverage for each function instead of just one summary for
@@ -143,6 +145,19 @@ OPTIONS
  the --long-file-names option, this applies to both the main file name and the
  included file name.
 
+.. option:: -r
+
+ Only dump files with relative paths or absolute paths with the prefix specified
+ by ``-s``.
+
+.. option:: -s=<string>
+
+ Source prefix to elide.
+
+.. option:: -t, --stdout
+
+ Print to stdout instead of producing ``.gcov`` files.
+
 .. option:: -u, --unconditional-branches
 
  Include unconditional branches in the output for the --branch-probabilities