diff options
| author | Vedant Kumar <vsk@apple.com> | 2017-09-11 21:31:32 +0000 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2017-09-11 21:31:32 +0000 |
| commit | 71bc1afaab33481932adaca3035040272a5a277c (patch) | |
| tree | 015734fe81990bad71055002623553a0c227f28b /llvm/test/tools/llvm-cov | |
| parent | 54cc3603def0757b4460f94a04e2a9f459a8c7c9 (diff) | |
| download | bcm5719-llvm-71bc1afaab33481932adaca3035040272a5a277c.tar.gz bcm5719-llvm-71bc1afaab33481932adaca3035040272a5a277c.zip | |
[llvm-cov] Don't attach exec counts to lines which start a skipped region
These lines by definition don't have an execution count.
This is the final part of the fix for:
https://bugs.llvm.org/show_bug.cgi?id=34166
llvm-svn: 312955
Diffstat (limited to 'llvm/test/tools/llvm-cov')
| -rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/ifdef.covmapping | bin | 0 -> 108 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/ifdef.profdata | bin | 0 -> 632 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-cov/ifdef.c | 16 |
3 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/ifdef.covmapping b/llvm/test/tools/llvm-cov/Inputs/ifdef.covmapping Binary files differnew file mode 100644 index 00000000000..212a1bae833 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/ifdef.covmapping diff --git a/llvm/test/tools/llvm-cov/Inputs/ifdef.profdata b/llvm/test/tools/llvm-cov/Inputs/ifdef.profdata Binary files differnew file mode 100644 index 00000000000..e71240b984a --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/ifdef.profdata diff --git a/llvm/test/tools/llvm-cov/ifdef.c b/llvm/test/tools/llvm-cov/ifdef.c new file mode 100644 index 00000000000..9fd73db9743 --- /dev/null +++ b/llvm/test/tools/llvm-cov/ifdef.c @@ -0,0 +1,16 @@ +// RUN: llvm-cov show -instr-profile %S/Inputs/ifdef.profdata %S/Inputs/ifdef.covmapping -dump -path-equivalence=/tmp,%S %s > %t.out 2>&1 +// RUN: FileCheck %s -input-file %t.out -check-prefix=LINE +// RUN: FileCheck %s -input-file %t.out -check-prefix=HIGHLIGHT + + +int main() { + if (0) { // LINE: [[@LINE]]|{{ +}}1| +#if 0 // LINE-NEXT: [[@LINE]]|{{ +}}| +#endif // LINE-NEXT: [[@LINE]]|{{ +}}| + } + return 0; +} + +// HIGHLIGHT: Highlighted line [[@LINE-7]], 10 -> ? +// HIGHLIGHT-NEXT: Highlighted line [[@LINE-7]], 1 -> 1 +// HIGHLIGHT-NEXT: Highlighted line [[@LINE-6]], 1 -> 4 |

