diff options
| author | Rich Kadel <richkadel@google.com> | 2020-06-03 21:19:34 -0700 |
|---|---|---|
| committer | Rich Kadel <richkadel@google.com> | 2020-06-15 16:50:10 -0700 |
| commit | 5068ae1ca05b2be0c2a98206a58d894aa620b312 (patch) | |
| tree | 258a6eafab4eeab5d40cf776cc09d9799276787d /src/librustc_session | |
| parent | 395256a5dd74ccef046083d6e025a6d046379040 (diff) | |
[WIP] injects llvm intrinsic instrprof.increment for coverage reports
This initial version only injects counters at the top of each function. Rust Coverage will require injecting additional counters at each conditional code branch.
Diffstat (limited to 'src/librustc_session')
| -rw-r--r-- | src/librustc_session/options.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index d22c6ec9d7d..599ce595e13 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -876,6 +876,9 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "fix undefined behavior when a thread doesn't eventually make progress \ (such as entering an empty infinite loop) by inserting llvm.sideeffect \ (default: no)"), + instrument_coverage: bool = (false, parse_bool, [TRACKED], + "instrument the generated code with LLVM code region counters for \ + generating coverage reports (default: no)"), instrument_mcount: bool = (false, parse_bool, [TRACKED], "insert function instrument code for mcount-based tracing (default: no)"), keep_hygiene_data: bool = (false, parse_bool, [UNTRACKED], |
