Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -mrtd -triple i386-unknown-unknown -std=c89 -emit-llvm -o - %s | FileCheck %s
      2 
      3 void baz(int arg);
      4 
      5 // CHECK: define x86_stdcallcc void @foo(i32 %arg) [[NUW:#[0-9]+]]
      6 void foo(int arg) {
      7 // CHECK: call x86_stdcallcc i32 bitcast (i32 (...)* @bar to i32 (i32)*)(
      8   bar(arg);
      9 // CHECK: call x86_stdcallcc void @baz(i32
     10   baz(arg);
     11 }
     12 
     13 // CHECK: declare x86_stdcallcc i32 @bar(...)
     14 
     15 // CHECK: declare x86_stdcallcc void @baz(i32)
     16 
     17 void qux(int arg, ...) { }
     18 // CHECK: define void @qux(i32 %arg, ...)
     19 
     20 void quux(int a1, int a2, int a3) {
     21   qux(a1, a2, a3);
     22 }
     23 // CHECK-LABEL: define x86_stdcallcc void @quux
     24 // CHECK: call void (i32, ...)* @qux
     25 
     26 // CHECK: attributes [[NUW]] = { nounwind{{.*}} }
     27