diff options
| author | Rich Kadel <richkadel@google.com> | 2020-07-30 12:25:39 -0700 |
|---|---|---|
| committer | Rich Kadel <richkadel@google.com> | 2020-07-30 12:25:39 -0700 |
| commit | 34b26d6a77c45776cbbef182b4c1b0b96ac326fe (patch) | |
| tree | 043861595ab0039a459b1d42e651ea83714c4db4 /src/rustllvm/RustWrapper.cpp | |
| parent | 6b09c37ddc240e25748e53d7a8f81f252def6dee (diff) | |
| download | rust-34b26d6a77c45776cbbef182b4c1b0b96ac326fe.tar.gz rust-34b26d6a77c45776cbbef182b4c1b0b96ac326fe.zip | |
Rust function-level coverage now works on external crates
Fixed a known issue in the coverage map where some regions had nonsensical source code locations. External crate functions are already included in their own coverage maps, per library, and don't need to also be added to the importing crate's coverage map. (In fact, their source start and end byte positions are not relevant to the importing crate's SourceMap.) The fix was to simply skip trying to add imported coverage info to the coverage map if the instrumented function is not "local". The injected counters are still relevant, however, and the LLVM `instrprof.increment` intrinsic call parameters will map those counters to the external crates' coverage maps, when generating runtime coverage data.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
