2016-11-21 22:00:04 +08:00
|
|
|
#include "Inputs/zeroFunctionFile.h"
|
|
|
|
|
|
|
|
int foo(int x) {
|
|
|
|
return NOFUNCTIONS(x);
|
|
|
|
}
|
|
|
|
int main() {
|
|
|
|
return foo(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
// RUN: llvm-profdata merge %S/Inputs/zeroFunctionFile.proftext -o %t.profdata
|
|
|
|
|
|
|
|
// RUN: llvm-cov report %S/Inputs/zeroFunctionFile.covmapping -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=REPORT --strict-whitespace %s
|
2017-08-10 04:43:31 +08:00
|
|
|
// REPORT: Files which contain no functions
|
|
|
|
// REPORT: zeroFunctionFile.h
|
2016-11-21 22:00:04 +08:00
|
|
|
|
2017-07-11 09:42:12 +08:00
|
|
|
// RUN: llvm-cov show -j 1 %S/Inputs/zeroFunctionFile.covmapping -format html -instr-profile %t.profdata -o %t.dir
|
2016-11-21 22:00:04 +08:00
|
|
|
// RUN: FileCheck %s -input-file=%t.dir/index.html -check-prefix=HTML
|
|
|
|
// HTML-NO: 0.00% (0/0)
|
2017-08-10 04:43:31 +08:00
|
|
|
// HTML: Files which contain no functions
|
|
|
|
// HTML: zeroFunctionFile.h
|