[llvm] a3fd40b - [docs] Update llvm-cov gcov

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 12:36:33 PDT 2021


Author: Fangrui Song
Date: 2021-06-03T12:36:27-07:00
New Revision: a3fd40b955ecbb970883ea5f097fd919058432bd

URL: https://github.com/llvm/llvm-project/commit/a3fd40b955ecbb970883ea5f097fd919058432bd
DIFF: https://github.com/llvm/llvm-project/commit/a3fd40b955ecbb970883ea5f097fd919058432bd.diff

LOG: [docs] Update llvm-cov gcov

Mention some new options.

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

Added: 
    

Modified: 
    llvm/docs/CommandGuide/llvm-cov.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/CommandGuide/llvm-cov.rst b/llvm/docs/CommandGuide/llvm-cov.rst
index d6e638f8f61d0..98885d4453954 100644
--- a/llvm/docs/CommandGuide/llvm-cov.rst
+++ b/llvm/docs/CommandGuide/llvm-cov.rst
@@ -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


        


More information about the llvm-commits mailing list