aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorunexpectedlydefined <91391114+unexpectedlydefined@users.noreply.github.com>2026-01-21 13:22:23 +0000
committerGitHub <noreply@github.com>2026-01-21 13:22:23 +0000
commitdf063cbf1122a220ad89679fbf6d5fc918aa8c23 (patch)
treec2f18aa8fbe6e534418e9158ca2c6033283f2339 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parente807c6f89d11b2b62b98909046aeaf5c613fff45 (diff)
downloadllvm-df063cbf1122a220ad89679fbf6d5fc918aa8c23.zip
llvm-df063cbf1122a220ad89679fbf6d5fc918aa8c23.tar.gz
llvm-df063cbf1122a220ad89679fbf6d5fc918aa8c23.tar.bz2
[llvm-dwarfdump][LineCov 1/3] Add variable coverage metrics (#176725)
Patch 1 of 3 to add to llvm-dwarfdump the ability to measure DWARF coverage of local variables in terms of source lines, as discussed in [this RFC](https://discourse.llvm.org/t/rfc-debug-info-coverage-tool-v2/83266). This patch adds the basic variable coverage implementation. By default, inlined instances are shown separately (displaying the full inlining chain). Alternatively, a combined view that averages across all inlined instances can be returned using `--combine-instances`. In this patch, we simply print a count of source lines over which each variable is covered. Later patches in the series will add the comparison against a baseline. Example output: ``` $ llvm-dwarfdump --show-variable-coverage somefile Variable coverage statistics: Function InlChain Variable Decl LinesCovered foo bar path/to/somefile.h:54 3 foo path/to/someotherfile.c:32 bar path/to/somefile.h:54 2 foo baz main.c:76 9 ``` ``` $ llvm-dwarfdump --show-variable-coverage somefile --combine-instances Variable coverage statistics: Function InstanceCount Variable Decl LinesCovered foo 2 bar path/to/somefile.h:54 2.5 foo 1 baz main.c:76 9 ``` This reapplies #169646, fixing some ambiguous overloads that caused several bots to fail.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions