Home | History | Annotate | Download | only in CodeGen
      1 // Make sure -fno-inline-functions is behaving correctly.
      2 // rdar://10972766
      3 
      4 // RUN: %clang_cc1 -O3 -fno-inline -fno-inline-functions -emit-llvm %s -o - | FileCheck -check-prefix=NOINLINE %s
      5 
      6 inline int dont_inline_me(int a, int b) { return(a+b); }
      7 
      8 inline __attribute__ ((__always_inline__)) int inline_me(int a, int b) { return(a*b); }
      9 
     10 volatile int *pa = (int*) 0x1000;
     11 void foo() {
     12 // NOINLINE: @foo
     13 // NOINLINE: dont_inline_me
     14 // NOINLINE-NOT: inlinehint
     15     pa[0] = dont_inline_me(pa[1],pa[2]);
     16 // NOINLINE-NOT: inline_me
     17     pa[3] = inline_me(pa[4],pa[5]);
     18 }
     19 
     20 // NOINLINE: Function Attrs: noinline
     21 // NOINLINE: @dont_inline_me
     22