diff --git a/clang/include/clang/Basic/CodeGenOptions.def b/clang/include/clang/Basic/CodeGenOptions.def index bce2120a4d6db4..641b99edaed117 100644 --- a/clang/include/clang/Basic/CodeGenOptions.def +++ b/clang/include/clang/Basic/CodeGenOptions.def @@ -53,7 +53,6 @@ ENUM_CODEGENOPT(FramePointer, FramePointerKind, 2, FramePointerKind::None) /// f CODEGENOPT(DisableFree , 1, 0) ///< Don't free memory. CODEGENOPT(DiscardValueNames , 1, 0) ///< Discard Value Names from the IR (LLVMContext flag) -CODEGENOPT(DisableGCov , 1, 0) ///< Don't run the GCov pass, for testing. CODEGENOPT(DisableLLVMPasses , 1, 0) ///< Don't run any LLVM IR passes to get ///< the pristine IR generated by the ///< frontend. diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 278e306c23d8d9..12e0b2a9c302a7 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -3805,8 +3805,6 @@ def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">, Alias; def coverage_version_EQ : Joined<["-"], "coverage-version=">, HelpText<"Four-byte version string for gcov files.">; -def test_coverage : Flag<["-"], "test-coverage">, - HelpText<"Do not generate coverage files or remove coverage changes from IR">; def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">, HelpText<"Dump the coverage mapping records, for testing">; def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">, diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 2a75bd065557b4..b409773c1521a6 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -558,8 +558,6 @@ static void initTargetOptions(DiagnosticsEngine &Diags, static Optional getGCOVOptions(const CodeGenOptions &CodeGenOpts, const LangOptions &LangOpts) { - if (CodeGenOpts.DisableGCov) - return None; if (!CodeGenOpts.EmitGcovArcs && !CodeGenOpts.EmitGcovNotes) return None; // Not using 'GCOVOptions::getDefault' allows us to avoid exiting if diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 7cbd5b310dd37f..80f2d435d4faf4 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1052,7 +1052,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.ControlFlowGuardNoChecks = Args.hasArg(OPT_cfguard_no_checks); Opts.ControlFlowGuard = Args.hasArg(OPT_cfguard); - Opts.DisableGCov = Args.hasArg(OPT_test_coverage); Opts.EmitGcovArcs = Args.hasArg(OPT_femit_coverage_data); Opts.EmitGcovNotes = Args.hasArg(OPT_femit_coverage_notes); if (Opts.EmitGcovArcs || Opts.EmitGcovNotes) { diff --git a/clang/test/CodeGenCXX/coverage.cpp b/clang/test/CodeGenCXX/coverage.cpp deleted file mode 100644 index 4b23324afaff3d..00000000000000 --- a/clang/test/CodeGenCXX/coverage.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - -test-coverage -femit-coverage-notes | FileCheck %s - -extern "C" void test_name1() {} -void test_name2() {} - -// CHECK: !DISubprogram(name: "test_name1", -// CHECK-NOT: linkageName: -// CHECK-SAME: ){{$}} -// CHECK: !DISubprogram(name: "test_name2", linkageName: "_Z10test_name2v"