xref: /llvm-project/llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test (revision 16e74fd48988ac95551d0f64e1b36f78a82a89a2)
1// Magic
2RUN: printf '\377lprofr\201' > %t
3// Version
4RUN: printf '\0\0\0\0\10\0\0\10' >> %t
5// The rest of the header needs to be there to prevent a broken header error.
6RUN: printf '\0\0\0\0\0\0\0\0' >> %t
7RUN: printf '\0\0\0\0\0\0\0\2' >> %t
8RUN: printf '\0\0\0\0\0\0\0\0' >> %t
9RUN: printf '\0\0\0\0\0\0\0\3' >> %t
10RUN: printf '\0\0\0\0\0\0\0\0' >> %t
11RUN: printf '\0\0\0\0\0\0\0\0' >> %t
12RUN: printf '\0\0\0\0\0\0\0\0' >> %t
13RUN: printf '\0\0\0\0\0\0\0\0' >> %t
14RUN: printf '\0\0\0\0\0\0\0\20' >> %t
15RUN: printf '\0\0\0\1\0\4\0\0' >> %t
16RUN: printf '\0\0\0\2\0\4\0\0' >> %t
17RUN: printf '\0\0\0\0\0\0\0\0' >> %t
18RUN: printf '\0\0\0\0\0\0\0\0' >> %t
19RUN: printf '\0\0\0\0\0\0\0\0' >> %t
20
21RUN: not llvm-profdata show %t -o /dev/null 2>&1 | FileCheck %s
22
23CHECK: raw profile version mismatch: Profile uses raw profile format version = 134217736; expected version = {{[0-9]+}}
24CHECK-NEXT: PLEASE update this tool to version in the raw profile, or regenerate raw profile with expected version.
25