summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-profdata/mismatched-raw-profile-header.test
blob: dfa163f1f3439a95428ff047b87d4ba35813f3ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Magic
RUN: printf '\377lprofr\201' > %t
// Version
RUN: printf '\0\0\0\0\10\0\0\10' >> %t
// The rest of the header needs to be there to prevent a broken header error.
RUN: printf '\0\0\0\0\0\0\0\0' >> %t
RUN: printf '\0\0\0\0\0\0\0\2' >> %t
RUN: printf '\0\0\0\0\0\0\0\0' >> %t
RUN: printf '\0\0\0\0\0\0\0\3' >> %t
RUN: printf '\0\0\0\0\0\0\0\0' >> %t
RUN: printf '\0\0\0\0\0\0\0\0' >> %t
RUN: printf '\0\0\0\0\0\0\0\0' >> %t
RUN: printf '\0\0\0\0\0\0\0\0' >> %t
RUN: printf '\0\0\0\0\0\0\0\20' >> %t
RUN: printf '\0\0\0\1\0\4\0\0' >> %t
RUN: printf '\0\0\0\2\0\4\0\0' >> %t
RUN: printf '\0\0\0\0\0\0\0\0' >> %t
RUN: printf '\0\0\0\0\0\0\0\0' >> %t
RUN: printf '\0\0\0\0\0\0\0\0' >> %t

RUN: not llvm-profdata show %t -o /dev/null 2>&1 | FileCheck %s

CHECK: raw profile version mismatch: Profile uses raw profile format version = 134217736; expected version = {{[0-9]+}}
CHECK-NEXT: PLEASE update this tool to version in the raw profile, or regenerate raw profile with expected version.