rust/src/librustc_interface
Rich Kadel a6f8b8a211 Generating the coverage map
rustc now generates the coverage map and can support (limited)
coverage report generation, at the function level.

Example:

$ BUILD=$HOME/rust/build/x86_64-unknown-linux-gnu
$ $BUILD/stage1/bin/rustc -Zinstrument-coverage \
$HOME/rust/src/test/run-make-fulldeps/instrument-coverage/main.rs
$ LLVM_PROFILE_FILE="main.profraw" ./main
called
$ $BUILD/llvm/bin/llvm-profdata merge -sparse main.profraw -o main.profdata
$ $BUILD/llvm/bin/llvm-cov show --instr-profile=main.profdata main
    1|      1|pub fn will_be_called() {
    2|      1|    println!("called");
    3|      1|}
    4|       |
    5|      0|pub fn will_not_be_called() {
    6|      0|    println!("should not have been called");
    7|      0|}
    8|       |
    9|      1|fn main() {
   10|      1|    let less = 1;
   11|      1|    let more = 100;
   12|      1|
   13|      1|    if less < more {
   14|      1|        will_be_called();
   15|      1|    } else {
   16|      1|        will_not_be_called();
   17|      1|    }
   18|      1|}
2020-07-17 11:49:35 -07:00
..
build.rs Locate rustc binary similarly to codegen backend loading 2019-09-10 16:57:14 -04:00
callbacks.rs Show SyntaxContext in formatted Span debug output 2020-06-08 21:47:33 -04:00
Cargo.toml Make things build again 2020-06-02 20:38:24 +03:00
interface.rs Change some function names. 2020-07-10 16:07:20 +10:00
lib.rs Initialize default providers only once 2020-07-15 10:53:36 -04:00
passes.rs Rollup merge of #73566 - jyn514:name-resolve-first, r=eddyb 2020-07-16 11:18:24 -07:00
proc_macro_decls.rs Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>. 2020-07-05 23:00:14 +03:00
queries.rs Remove Compiler::compile(). 2020-07-07 11:10:51 +10:00
tests.rs Generating the coverage map 2020-07-17 11:49:35 -07:00
util.rs Remove lots of Symbol::as_str() calls. 2020-07-15 09:01:35 +10:00