xref: /llvm-project/llvm/test/tools/llvm-cov/zeroFunctionFile.c (revision c0c182cce1565213a4b0b0a7284538fbcf8b5955)
135369c1eSAlex Lorenz #include "Inputs/zeroFunctionFile.h"
235369c1eSAlex Lorenz 
foo(int x)335369c1eSAlex Lorenz int foo(int x) {
435369c1eSAlex Lorenz   return NOFUNCTIONS(x);
535369c1eSAlex Lorenz }
main()635369c1eSAlex Lorenz int main() {
735369c1eSAlex Lorenz   return foo(2);
835369c1eSAlex Lorenz }
935369c1eSAlex Lorenz 
1035369c1eSAlex Lorenz // RUN: llvm-profdata merge %S/Inputs/zeroFunctionFile.proftext -o %t.profdata
1135369c1eSAlex Lorenz 
1235369c1eSAlex Lorenz // RUN: llvm-cov report %S/Inputs/zeroFunctionFile.covmapping -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=REPORT --strict-whitespace %s
13*c0c182ccSEli Friedman // REPORT: Files which contain no functions
14*c0c182ccSEli Friedman // REPORT: zeroFunctionFile.h
1535369c1eSAlex Lorenz 
164e0f5744SVedant Kumar // RUN: llvm-cov show -j 1 %S/Inputs/zeroFunctionFile.covmapping -format html -instr-profile %t.profdata -o %t.dir
1735369c1eSAlex Lorenz // RUN: FileCheck %s -input-file=%t.dir/index.html -check-prefix=HTML
1835369c1eSAlex Lorenz // HTML-NO: 0.00% (0/0)
19*c0c182ccSEli Friedman // HTML: Files which contain no functions
20*c0c182ccSEli Friedman // HTML: zeroFunctionFile.h
21