Skip to content

Commit ad248f4

Browse files
authored
Add a build option to enable source level coverage analysis (#503)
1 parent 8304021 commit ad248f4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

opencl_clang_options.td

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ include "llvm/Option/OptParser.td"
1414
def g_Flag : Flag<["-"], "g">, HelpText<"Generate source level debug information">;
1515
def gline_tables_only_Flag : Flag<["-"], "gline-tables-only">;
1616
def profiling : Flag<["-"], "profiling">, HelpText<"Allow profiling">;
17+
def coverage: Flag<["-"], "coverage">, HelpText<"Enable source level coverage analysis">;
1718
def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">;
1819
def D : JoinedOrSeparate<["-"], "D">;
1920
def I : JoinedOrSeparate<["-"], "I">, Flags<[RenderJoined]>, HelpText<"Add directory to include search path">;

options_compile.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ std::string EffectiveOptionsFilter::processOptions(const OpenCLArgList &args,
161161
// The below assert is usable for manual debugging only
162162
// default:
163163
// assert(false && "some unknown argument");
164+
case OPT_COMPILE_coverage:
164165
case OPT_COMPILE_profiling:
165166
case OPT_COMPILE_gline_tables_only_Flag:
166167
effectiveArgs.push_back("-debug-info-kind=line-tables-only");

0 commit comments

Comments
 (0)