[all-commits] [llvm/llvm-project] 25544c: [gcov] Default coverage version to '407*' and dele...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sun May 10 16:16:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 25544ce2df0daa4304c07e64b9c8b0f7df60c11d
      https://github.com/llvm/llvm-project/commit/25544ce2df0daa4304c07e64b9c8b0f7df60c11d
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-05-10 (Sun, 10 May 2020)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Driver/CC1Options.td
    M clang/lib/Basic/CodeGenOptions.cpp
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/CodeGen/code-coverage.c
    M compiler-rt/lib/profile/GCDAProfiling.c
    M llvm/include/llvm/Transforms/Instrumentation.h
    M llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
    M llvm/test/Transforms/GCOVProfiling/function-numbering.ll
    M llvm/test/Transforms/GCOVProfiling/version.ll

  Log Message:
  -----------
  [gcov] Default coverage version to '407*' and delete CC1 option -coverage-cfg-checksum

Defaulting to -Xclang -coverage-version='407*' makes .gcno/.gcda
compatible with gcov [4.7,8)

In addition, delete clang::CodeGenOptionsBase::CoverageExtraChecksum and GCOVOptions::UseCfgChecksum.
We can infer the information from the version.

With this change, .gcda files produced by `clang --coverage a.o` linked executable can be read by gcov 4.7~7.
We don't need other -Xclang -coverage* options.
There may be a mismatching version warning, though.

(Note, GCC r173147 "split checksum into cfg checksum and line checksum"
 made gcov 4.7 incompatible with previous versions.)




More information about the All-commits mailing list