[llvm-cov gcov] Don't suppress .gcov output if .gcda is corrupted
authorFangrui Song <maskray@google.com>
Tue, 16 Jun 2020 21:55:02 +0000 (14:55 -0700)
committerFangrui Song <maskray@google.com>
Tue, 16 Jun 2020 21:55:38 +0000 (14:55 -0700)
commit7f7cb79b57838155a2faf46300491d45eedf8907
treeb2bea4c5d265f43ebafb689536ce041f77f48c37
parentada2a8ea4a9c5b2141c30c77b80b85945e346999
[llvm-cov gcov] Don't suppress .gcov output if .gcda is corrupted

If .gcda is corrupted, gcov continues to produce a .gcov and just
assumes execution counts are zeros. This is reasonable, because the
program can corrupt its .gcda output. The code path should be similar to
the code path without .gcda.
llvm/include/llvm/ProfileData/GCOV.h
llvm/lib/ProfileData/GCOV.cpp
llvm/test/tools/llvm-cov/llvm-cov.test
llvm/tools/llvm-cov/gcov.cpp