blob: 3c9392d1c578eca54e7b2036aacae84c3544914f [file] [log] [blame]
Rafael Espindola853c3702012-12-18 03:54:29 +00001// RUN: %clang_cc1 -emit-llvm -disable-red-zone -femit-coverage-data %s -o - | FileCheck %s
2
3// <rdar://problem/12843084>
4
5int 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
Bill Wendlingf7a9da02013-02-20 07:22:19 +000017// CHECK: void @__llvm_gcov_indirect_counter_increment(i32* %{{.*}}, i64** %{{.*}}) unnamed_addr #1
18// CHECK: void @__llvm_gcov_writeout() unnamed_addr #1
19// CHECK: void @__llvm_gcov_init() unnamed_addr #1
20// CHECK: void @__gcov_flush() unnamed_addr #1
21
22// CHECK: attributes #0 = { noredzone nounwind "target-features"={{.*}} }
23// CHECK: attributes #1 = { noinline noredzone }