[gcov] Simplify cc1 options and remove CodeGenOptions EmitCovNotes/EmitCovArcs
authorFangrui Song <i@maskray.me>
Wed, 17 May 2023 23:09:12 +0000 (16:09 -0700)
committerFangrui Song <i@maskray.me>
Wed, 17 May 2023 23:09:12 +0000 (16:09 -0700)
commit71a35f7e3d6c78f8035f2eb7d58beba3b7208f9d
treed146e2917bca9beb3f1cb79a24bcf22f14a48682
parent155191e9fdaee0d12f536a485909c460387d0db8
[gcov] Simplify cc1 options and remove CodeGenOptions EmitCovNotes/EmitCovArcs

After a07b135ce0c0111bd83450b5dc29ef0381cdbc39, we always pass
-coverage-notes-file/-coverage-data-file for driver options
-ftest-coverage/-fprofile-arcs/--coverage. As a bonus, we can make the following
simplification to cc1 options:

* `-ftest-coverage -coverage-notes-file a.gcno` => `-coverage-notes-file a.gcno`
* `-fprofile-arcs -coverage-data-file a.gcda` => `-coverage-data-file a.gcda`

and remove EmitCovNotes/EmitCovArcs.
13 files changed:
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/attr-function-return.c
clang/test/CodeGen/code-coverage-tsan.c
clang/test/CodeGen/code-coverage.c
clang/test/CodeGen/no_profile.c
clang/test/Driver/coverage.c
clang/test/Driver/cuda-no-pgo-or-coverage.cu