3 // Check that all of the hashes in this file are unique (i.e, that none of the
4 // profiles for these functions are mutually interchangeable).
6 // RUN: llvm-profdata show -all-functions %S/Inputs/cxx-hash-v2.profdata.v5 | grep "Hash: 0x" | sort > %t.hashes
7 // RUN: uniq %t.hashes > %t.hashes.unique
8 // RUN: diff %t.hashes %t.hashes.unique
10 // RUN: llvm-profdata merge %S/Inputs/cxx-hash-v2.proftext -o %t.profdata
11 // RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -triple x86_64-apple-macosx10.9 -main-file-name cxx-hash-v2.mm %s -o /dev/null -emit-llvm -fprofile-instrument-use-path=%t.profdata 2>&1 | FileCheck %s -allow-empty
12 // RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -triple x86_64-apple-macosx10.9 -main-file-name cxx-hash-v2.mm %s -o /dev/null -emit-llvm -fprofile-instrument-use-path=%S/Inputs/cxx-hash-v2.profdata.v5 2>&1 | FileCheck %s -allow-empty
14 // CHECK-NOT: warning: profile data may be out of date
19 void loop_after_if_else() {
28 void loop_in_then_block() {
37 void loop_in_else_block() {
46 void if_inside_of_for() {
47 for (x
= 0; x
< 0; ++x
) {
54 void if_outside_of_for() {
55 for (x
= 0; x
< 0; ++x
)
61 void if_inside_of_while() {
69 void if_outside_of_while() {
84 void consecutive_dos() {
93 for (x
= 0; x
< 5; ++x
) {}
97 for (x
= 0; x
< 5; ++x
)
101 void loop_continue() {
102 for (x
= 0; x
< 5; ++x
)
107 for (x
= 0; x
< 5; ++x
)
112 static void *dispatch
[] = {&&done
};
119 static void *dispatch
[] = {&&done
};
126 void indirect_goto() {
127 static void *dispatch
[] = {&&done
};
134 void nested_for_ranges() {
140 void consecutive_for_ranges() {
146 void nested_try_catch() {
154 void consecutive_try_catch() {
155 try {} catch (...) {}