1// Test a profile with only a header is generated when a src file is not in the
2// selected files list provided via -fprofile-list.
3
4// RUN: mkdir -p %t.d
5// RUN: echo "src:other.c" > %t-file.list
6// RUN: %clang_profgen -fprofile-list=%t-file.list -o %t %s
7// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
8// RUN: llvm-profdata show %t.profraw | FileCheck %s --check-prefix=RAW-PROFILE-HEADER-ONLY
9
10// RUN: llvm-profdata merge -o %t.profdata %t.profraw
11// RUN: llvm-profdata show %t.profdata | FileCheck %s --check-prefix=INDEXED-PROFILE-HEADER-ONLY
12
13int main() { return 0; }
14
15// RAW-PROFILE-HEADER-ONLY: Instrumentation level: Front-end
16// RAW-PROFILE-HEADER-ONLY-NEXT: Total functions: 0
17// RAW-PROFILE-HEADER-ONLY-NEXT: Maximum function count: 0
18// RAW-PROFILE-HEADER-ONLY-NEXT: Maximum internal block count: 0
19
20// INDEXED-PROFILE-HEADER-ONLY: Instrumentation level: Front-end
21// INDEXED-PROFILE-HEADER-ONLY-NEXT: Total functions: 0
22// INDEXED-PROFILE-HEADER-ONLY-NEXT: Maximum function count: 0
23// INDEXED-PROFILE-HEADER-ONLY-NEXT: Maximum internal block count: 0
24

source code of compiler-rt/test/profile/Posix/instrprof-empty-profile.c