diff options
author | Fangrui Song <i@maskray.me> | 2023-05-17 16:09:12 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-05-17 16:09:12 -0700 |
commit | 71a35f7e3d6c78f8035f2eb7d58beba3b7208f9d (patch) | |
tree | d146e2917bca9beb3f1cb79a24bcf22f14a48682 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 155191e9fdaee0d12f536a485909c460387d0db8 (diff) | |
download | llvm-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/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index c111607..a1d836f 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1801,7 +1801,7 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.MemoryProfileOutput = MemProfileBasename; memcpy(Opts.CoverageVersion, "408*", 4); - if (Opts.EmitGcovArcs || Opts.EmitGcovNotes) { + if (Opts.CoverageNotesFile.size() || Opts.CoverageDataFile.size()) { if (Args.hasArg(OPT_coverage_version_EQ)) { StringRef CoverageVersion = Args.getLastArgValue(OPT_coverage_version_EQ); if (CoverageVersion.size() != 4) { |