diff options
author | Alex Lorenz <arphaman@gmail.com> | 2014-09-30 12:45:13 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2014-09-30 12:45:13 +0000 |
commit | cb1702d45a433689f297567b1bcba03378bbd9f2 (patch) | |
tree | f2ab574484c3c140ed1485a1dd792abfab6be9d2 /llvm/test/tools/llvm-cov/report.cpp | |
parent | 40d3deeb7da108f16dbdcb5f83e718607c07f5f8 (diff) | |
download | bcm5719-llvm-cb1702d45a433689f297567b1bcba03378bbd9f2.tar.gz bcm5719-llvm-cb1702d45a433689f297567b1bcba03378bbd9f2.zip |
llvm-cov: Use the number of executed functions for the function coverage metric.
This commit fixes llvm-cov's function coverage metric by using the number of executed functions instead of the number of fully covered functions.
Differential Revision: http://reviews.llvm.org/D5196
llvm-svn: 218672
Diffstat (limited to 'llvm/test/tools/llvm-cov/report.cpp')
-rw-r--r-- | llvm/test/tools/llvm-cov/report.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/report.cpp b/llvm/test/tools/llvm-cov/report.cpp new file mode 100644 index 00000000000..297322a775d --- /dev/null +++ b/llvm/test/tools/llvm-cov/report.cpp @@ -0,0 +1,24 @@ +// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -no-colors 2>&1 | FileCheck %s + +// CHECK: Filename Regions Miss Cover Functions Executed +// CHECK: TOTAL 5 2 60.00% 4 75.00% + +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 |