annotate clang/test/Profile/profile-summary.c @ 237:c80f45b162ad llvm-original

add some fix
author kono
date Wed, 09 Nov 2022 17:47:54 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Test that profile summary is set correctly.
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // RUN: llvm-profdata merge %S/Inputs/max-function-count.proftext -o %t.profdata
anatofuz
parents:
diff changeset
4 // RUN: %clang_cc1 %s -o - -disable-llvm-passes -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck %s
anatofuz
parents:
diff changeset
5 //
anatofuz
parents:
diff changeset
6 int begin(int i) {
anatofuz
parents:
diff changeset
7 if (i)
anatofuz
parents:
diff changeset
8 return 0;
anatofuz
parents:
diff changeset
9 return 1;
anatofuz
parents:
diff changeset
10 }
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 int end(int i) {
anatofuz
parents:
diff changeset
13 if (i)
anatofuz
parents:
diff changeset
14 return 0;
anatofuz
parents:
diff changeset
15 return 1;
anatofuz
parents:
diff changeset
16 }
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 int main(int argc, const char *argv[]) {
anatofuz
parents:
diff changeset
19 begin(0);
anatofuz
parents:
diff changeset
20 end(1);
anatofuz
parents:
diff changeset
21 end(1);
anatofuz
parents:
diff changeset
22 return 0;
anatofuz
parents:
diff changeset
23 }
anatofuz
parents:
diff changeset
24 // CHECK: {{![0-9]+}} = !{i32 1, !"ProfileSummary", {{![0-9]+}}}
anatofuz
parents:
diff changeset
25 // CHECK: {{![0-9]+}} = !{!"DetailedSummary", {{![0-9]+}}}