1 // RUN: %clang_cc1 -Wno-strict-prototypes -O1 -disable-llvm-optzns -std=gnu89 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-GNU89 %s
2 // RUN: %clang_cc1 -Wno-strict-prototypes -O1 -disable-llvm-optzns -std=c99 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-C99 %s
4 // CHECK-GNU89-LABEL: define{{.*}} i32 @f0()
5 // CHECK-C99-LABEL: define{{.*}} i32 @f0()
7 int f0(void) { return 0; }
9 // CHECK-GNU89-LABEL: define{{.*}} i32 @f1()
10 // CHECK-C99-LABEL: define{{.*}} i32 @f1()
12 int f1(void) { return 0; }
14 // CHECK-GNU89-LABEL: define{{.*}} i32 @f2()
15 // CHECK-C99-LABEL: define{{.*}} i32 @f2()
17 inline int f2(void) { return 0; }
19 // CHECK-GNU89-LABEL: define{{.*}} i32 @f3()
20 // CHECK-C99-LABEL: define{{.*}} i32 @f3()
21 extern inline int f3(void);
22 int f3(void) { return 0; }
24 // CHECK-GNU89-LABEL: define{{.*}} i32 @f5()
25 // CHECK-C99-LABEL: define{{.*}} i32 @f5()
26 extern inline int f5(void);
27 inline int f5(void) { return 0; }
29 // CHECK-GNU89-LABEL: define{{.*}} i32 @f6()
30 // CHECK-C99-LABEL: define{{.*}} i32 @f6()
32 extern inline int f6(void) { return 0; }
34 // CHECK-GNU89-LABEL: define{{.*}} i32 @f7()
35 // CHECK-C99-LABEL: define{{.*}} i32 @f7()
36 extern inline int f7(void);
37 extern int f7(void) { return 0; }
39 // CHECK-GNU89-LABEL: define{{.*}} i32 @fA()
40 inline int fA(void) { return 0; }
42 // CHECK-GNU89-LABEL: define{{.*}} i32 @fB()
43 inline int fB() { return 0; }
45 // CHECK-GNU89-LABEL: define available_externally i32 @f4()
46 // CHECK-C99-LABEL: define{{.*}} i32 @f4()
48 extern inline int f4(void) { return 0; }
50 // CHECK-GNU89-LABEL: define available_externally i32 @f8()
51 // CHECK-C99-LABEL: define{{.*}} i32 @f8()
53 extern inline int f8(void) { return 0; }
55 // CHECK-GNU89-LABEL: define available_externally i32 @f9()
56 // CHECK-C99-LABEL: define{{.*}} i32 @f9()
57 extern inline int f9(void);
58 extern inline int f9(void) { return 0; }
60 // CHECK-C99-LABEL: define available_externally i32 @fA()
62 // CHECK-C99-LABEL: define{{.*}} i32 @fB()
65 return f0() + f1() + f2() + f3() + f4() + f5() + f6() + f7() + f8() + f9()