aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-05-17 16:09:12 -0700
committerFangrui Song <i@maskray.me>2023-05-17 16:09:12 -0700
commit71a35f7e3d6c78f8035f2eb7d58beba3b7208f9d (patch)
treed146e2917bca9beb3f1cb79a24bcf22f14a48682 /clang/lib/CodeGen/CGDebugInfo.cpp
parent155191e9fdaee0d12f536a485909c460387d0db8 (diff)
downloadllvm-71a35f7e3d6c78f8035f2eb7d58beba3b7208f9d.zip
llvm-71a35f7e3d6c78f8035f2eb7d58beba3b7208f9d.tar.gz
llvm-71a35f7e3d6c78f8035f2eb7d58beba3b7208f9d.tar.bz2
[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.
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 2cf7b02..2857ea2 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -3837,8 +3837,8 @@ void CGDebugInfo::collectFunctionDeclProps(GlobalDecl GD, llvm::DIFile *Unit,
// subprogram name, no need to have it at all unless coverage is enabled or
// debug is set to more than just line tables or extra debug info is needed.
if (LinkageName == Name ||
- (!CGM.getCodeGenOpts().EmitGcovArcs &&
- !CGM.getCodeGenOpts().EmitGcovNotes &&
+ (CGM.getCodeGenOpts().CoverageNotesFile.empty() &&
+ CGM.getCodeGenOpts().CoverageDataFile.empty() &&
!CGM.getCodeGenOpts().DebugInfoForProfiling &&
!CGM.getCodeGenOpts().PseudoProbeForProfiling &&
DebugKind <= llvm::codegenoptions::DebugLineTablesOnly))