Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -O1 -std=gnu89 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-GNU89 %s
      2 // RUN: %clang_cc1 -O1 -std=c99 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-C99 %s
      3 
      4 // CHECK-GNU89-LABEL: define i32 @f0()
      5 // CHECK-C99-LABEL: define i32 @f0()
      6 int f0(void);
      7 int f0(void) { return 0; }
      8 
      9 // CHECK-GNU89-LABEL: define i32 @f1()
     10 // CHECK-C99-LABEL: define i32 @f1()
     11 inline int f1(void);
     12 int f1(void) { return 0; }
     13 
     14 // CHECK-GNU89-LABEL: define i32 @f2()
     15 // CHECK-C99-LABEL: define i32 @f2()
     16 int f2(void);
     17 inline int f2(void) { return 0; }
     18 
     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; }
     23 
     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; }
     28 
     29 // CHECK-GNU89-LABEL: define i32 @f6()
     30 // CHECK-C99-LABEL: define i32 @f6()
     31 inline int f6(void);
     32 extern inline int f6(void) { return 0; }
     33 
     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; }
     38 
     39 // CHECK-GNU89-LABEL: define i32 @fA()
     40 inline int fA(void) { return 0; }
     41 
     42 // CHECK-GNU89-LABEL: define i32 @fB()
     43 inline int fB() { return 0; }
     44 
     45 // CHECK-GNU89-LABEL: define available_externally i32 @f4()
     46 // CHECK-C99-LABEL: define i32 @f4()
     47 int f4(void);
     48 extern inline int f4(void) { return 0; }
     49 
     50 // CHECK-GNU89-LABEL: define available_externally i32 @f8()
     51 // CHECK-C99-LABEL: define i32 @f8()
     52 extern int f8(void);
     53 extern inline int f8(void) { return 0; }
     54 
     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; }
     59 
     60 // CHECK-C99-LABEL: define available_externally i32 @fA()
     61 
     62 // CHECK-C99-LABEL: define i32 @fB()
     63 
     64 int test_all() {
     65   return f0() + f1() + f2() + f3() + f4() + f5() + f6() + f7() + f8() + f9()
     66     + fA() + fB();
     67 }
     68 
     69 int fB(void);
     70