21 lines · c
1#include "Inputs/zeroFunctionFile.h"2 3int foo(int x) {4 return NOFUNCTIONS(x);5}6int main() {7 return foo(2);8}9 10// RUN: llvm-profdata merge %S/Inputs/zeroFunctionFile.proftext -o %t.profdata11 12// RUN: llvm-cov report %S/Inputs/zeroFunctionFile.covmapping -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=REPORT --strict-whitespace %s13// REPORT: Files which contain no functions14// REPORT: zeroFunctionFile.h15 16// RUN: llvm-cov show -j 1 %S/Inputs/zeroFunctionFile.covmapping -format html -instr-profile %t.profdata -o %t.dir17// RUN: FileCheck %s -input-file=%t.dir/index.html -check-prefix=HTML18// HTML-NO: 0.00% (0/0)19// HTML: Files which contain no functions20// HTML: zeroFunctionFile.h21