1; RUN: not llvm-as < %s 2>&1 | FileCheck %s 2 3; CHECK: Calling convention requires void return type 4; CHECK-NEXT: i32 ()* @nonvoid_cc_amdgpu_kernel 5define amdgpu_kernel i32 @nonvoid_cc_amdgpu_kernel() { 6 ret i32 0 7} 8 9; CHECK: Calling convention does not support varargs or perfect forwarding! 10; CHECK-NEXT: void (...)* @varargs_amdgpu_kernel 11define amdgpu_kernel void @varargs_amdgpu_kernel(...) { 12 ret void 13} 14 15; CHECK: Calling convention does not allow sret 16; CHECK-NEXT: void (i32*)* @sret_cc_amdgpu_kernel 17define amdgpu_kernel void @sret_cc_amdgpu_kernel(i32* sret %ptr) { 18 ret void 19} 20 21; CHECK: Calling convention does not support varargs or perfect forwarding! 22; CHECK-NEXT: void (...)* @varargs_amdgpu_vs 23define amdgpu_vs void @varargs_amdgpu_vs(...) { 24 ret void 25} 26 27; CHECK: Calling convention does not support varargs or perfect forwarding! 28; CHECK-NEXT: void (...)* @varargs_amdgpu_gs 29define amdgpu_gs void @varargs_amdgpu_gs(...) { 30 ret void 31} 32 33; CHECK: Calling convention does not support varargs or perfect forwarding! 34; CHECK-NEXT: void (...)* @varargs_amdgpu_ps 35define amdgpu_ps void @varargs_amdgpu_ps(...) { 36 ret void 37} 38 39; CHECK: Calling convention does not support varargs or perfect forwarding! 40; CHECK-NEXT: void (...)* @varargs_amdgpu_cs 41define amdgpu_cs void @varargs_amdgpu_cs(...) { 42 ret void 43} 44 45; CHECK: Calling convention requires void return type 46; CHECK-NEXT: i32 ()* @nonvoid_cc_spir_kernel 47define spir_kernel i32 @nonvoid_cc_spir_kernel() { 48 ret i32 0 49} 50 51; CHECK: Calling convention does not support varargs or perfect forwarding! 52; CHECK-NEXT: void (...)* @varargs_spir_kernel 53define spir_kernel void @varargs_spir_kernel(...) { 54 ret void 55} 56