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