diff options
author | Fangrui Song <maskray@google.com> | 2020-05-09 10:36:34 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-05-10 09:55:23 -0700 |
commit | 2d00eb17cac40d96f357490d005c4601271bbba3 (patch) | |
tree | 53595718027ada06df1c78eb279abbf3dc1cba82 /clang/lib/Frontend | |
parent | 8528186b9bfcb0e422a1046871f855edcf3389f6 (diff) | |
download | llvm-2d00eb17cac40d96f357490d005c4601271bbba3.zip llvm-2d00eb17cac40d96f357490d005c4601271bbba3.tar.gz llvm-2d00eb17cac40d96f357490d005c4601271bbba3.tar.bz2 |
[gcov] Fix .gcda decoding and support GCC 8, 9 and 10
GCDAProfiling.c unnecessarily writes function names to .gcda files.
GCC 4.2 gcc/libgcov.c (now renamed to libgcc/libgcov*) did not write function
names. gcov-7 (compatible) crashes on .gcda produced by libclang_rt.profile
rL176173 realized the problem and introduced a mode to remove function
names.
llvm-cov code apparently takes GCDAProfiling.c output format as truth
and tries to decode function names. Additionally, llvm-cov tries to
decode tags in certain order which does not match libgcov emitted .gcda
files.
This patch fixes the .gcda decoder and makes it work with GCC 8 and 9
(10 is compatible with 9). Note, line statistics are broken and not
fixed by this patch.
Add test/tools/llvm-cov/gcov-{4.7,8,9}.c to test compatibility.
Diffstat (limited to 'clang/lib/Frontend')
0 files changed, 0 insertions, 0 deletions