1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/tools/llvm-cov/report.cpp
Justin Bogner fcfa5165d2 llvm-cov: Actually use the command line arguments when reporting
This code didn't really make sense as is. If a filename is passed in,
the user obviously wants the coverage *for that file*, not *for
everything*.

llvm-svn: 229217
2015-02-14 02:05:05 +00:00

39 lines
1.2 KiB
C++

// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -no-colors -filename-equivalence 2>&1 | FileCheck %s
// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -no-colors -filename-equivalence report.cpp 2>&1 | FileCheck -check-prefix=FILT-NEXT %s
// CHECK: Filename Regions Miss Cover Functions Executed
// CHECK-NEXT: ---
// CHECK-NEXT: report.cpp 5 2 60.00% 4 75.00%
// CHECK-NEXT: ---
// CHECK-NEXT: TOTAL 5 2 60.00% 4 75.00%
// FILT: File 'report.cpp':
// FILT-NEXT: Name Regions Miss Cover Lines Miss Cover
// FILT-NEXT: ---
// FILT-NEXT: _Z3foob 2 1 50.00% 4 2 50.00%
// FILT-NEXT: _Z3barv 1 0 100.00% 2 0 100.00%
// FILT-NEXT: _Z4funcv 1 1 0.00% 2 2 0.00%
// FILT-NEXT: main 1 0 100.00% 5 0 100.00%
// FILT-NEXT: ---
// FILT-NEXT: TOTAL 5 2 60.00% 13 4 69.23%
void foo(bool cond) {
if (cond) {
}
}
void bar() {
}
void func() {
}
int main() {
foo(false);
bar();
return 0;
}
// llvm-cov doesn't work on big endian yet
// XFAIL: powerpc64-, s390x, mips-, mips64-, sparc