diff options
| author | 2017-10-04 20:27:34 +0000 | |
|---|---|---|
| committer | 2017-10-04 20:27:34 +0000 | |
| commit | 31eb748944903b7f4f38afda9851951ca9dfc1ae (patch) | |
| tree | 9b95b6ea45d0874d75eb05b90c0840e191416439 /gnu/llvm/tools/clang/docs/SourceBasedCodeCoverage.rst | |
| parent | Don't try to handle IPv4-compatible IPv6 addresses (diff) | |
| download | wireguard-openbsd-31eb748944903b7f4f38afda9851951ca9dfc1ae.tar.xz wireguard-openbsd-31eb748944903b7f4f38afda9851951ca9dfc1ae.zip | |
Import LLVM 5.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/tools/clang/docs/SourceBasedCodeCoverage.rst')
| -rw-r--r-- | gnu/llvm/tools/clang/docs/SourceBasedCodeCoverage.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/llvm/tools/clang/docs/SourceBasedCodeCoverage.rst b/gnu/llvm/tools/clang/docs/SourceBasedCodeCoverage.rst index abb682355b1..805c9879480 100644 --- a/gnu/llvm/tools/clang/docs/SourceBasedCodeCoverage.rst +++ b/gnu/llvm/tools/clang/docs/SourceBasedCodeCoverage.rst @@ -18,6 +18,7 @@ Clang ships two other code coverage implementations: various sanitizers. It can provide up to edge-level coverage. * gcov - A GCC-compatible coverage implementation which operates on DebugInfo. + This is enabled by ``-ftest-coverage`` or ``--coverage``. From this point onwards "code coverage" will refer to the source-based kind. @@ -256,6 +257,8 @@ without using static initializers, do this manually: otherwise. Calling this function multiple times appends profile data to an existing on-disk raw profile. +In C++ files, declare these as ``extern "C"``. + Collecting coverage reports for the llvm project ================================================ @@ -271,6 +274,11 @@ To specify an alternate directory for raw profiles, use Drawbacks and limitations ========================= +* Prior to version 2.26, the GNU binutils BFD linker is not able link programs + compiled with ``-fcoverage-mapping`` in its ``--gc-sections`` mode. Possible + workarounds include disabling ``--gc-sections``, upgrading to a newer version + of BFD, or using the Gold linker. + * Code coverage does not handle unpredictable changes in control flow or stack unwinding in the presence of exceptions precisely. Consider the following function: |
