1 // RUN: %clang_cc1 -emit-llvm -disable-red-zone -femit-coverage-data %s -o - | FileCheck %s
2
3 // <rdar://problem/12843084>
4
test1(int a)5 int test1(int a) {
6 switch (a % 2) {
7 case 0:
8 ++a;
9 case 1:
10 a /= 2;
11 }
12 return a;
13 }
14
15 // Check that the noredzone flag is set on the generated functions.
16
17 // CHECK: void @__llvm_gcov_indirect_counter_increment(i32* %{{.*}}, i64** %{{.*}}) unnamed_addr [[NRZ:#[0-9]+]]
18 // CHECK: void @__llvm_gcov_writeout() unnamed_addr [[NRZ]]
19 // CHECK: void @__llvm_gcov_flush() unnamed_addr [[NRZ]]
20 // CHECK: void @__llvm_gcov_init() unnamed_addr [[NRZ]]
21
22 // CHECK: attributes [[NRZ]] = { {{.*}}noredzone{{.*}} }
23