brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · c5c7d89 Raw
73 lines · plain
1; RUN: not opt -passes=verify %s 2>&1 | FileCheck %s2 3declare swifttailcc void @simple()4 5define swifttailcc void @inreg(ptr inreg) {6; CHECK: inreg attribute not allowed in swifttailcc musttail caller7  musttail call swifttailcc void @simple()8  ret void9}10 11define swifttailcc void @inalloca(ptr inalloca(i8)) {12; CHECK: inalloca attribute not allowed in swifttailcc musttail caller13  musttail call swifttailcc void @simple()14  ret void15}16 17define swifttailcc void @swifterror(ptr swifterror) {18; CHECK: swifterror attribute not allowed in swifttailcc musttail caller19  musttail call swifttailcc void @simple()20  ret void21}22 23define swifttailcc void @preallocated(ptr preallocated(i8)) {24; CHECK: preallocated attribute not allowed in swifttailcc musttail caller25  musttail call swifttailcc void @simple()26  ret void27}28 29define swifttailcc void @byref(ptr byref(i8)) {30; CHECK: byref attribute not allowed in swifttailcc musttail caller31  musttail call swifttailcc void @simple()32  ret void33}34 35define swifttailcc void @call_inreg() {36; CHECK: inreg attribute not allowed in swifttailcc musttail callee37  musttail call swifttailcc void @inreg(ptr inreg undef)38  ret void39}40 41define swifttailcc void @call_inalloca() {42; CHECK: inalloca attribute not allowed in swifttailcc musttail callee43  musttail call swifttailcc void @inalloca(ptr inalloca(i8) undef)44  ret void45}46 47define swifttailcc void @call_swifterror() {48; CHECK: swifterror attribute not allowed in swifttailcc musttail callee49  %err = alloca swifterror ptr50  musttail call swifttailcc void @swifterror(ptr swifterror %err)51  ret void52}53 54define swifttailcc void @call_preallocated() {55; CHECK: preallocated attribute not allowed in swifttailcc musttail callee56  musttail call swifttailcc void @preallocated(ptr preallocated(i8) undef)57  ret void58}59 60define swifttailcc void @call_byref() {61; CHECK: byref attribute not allowed in swifttailcc musttail callee62  musttail call swifttailcc void @byref(ptr byref(i8) undef)63  ret void64}65 66 67declare swifttailcc void @varargs(...)68define swifttailcc void @call_varargs(...) {69; CHECK: cannot guarantee swifttailcc tail call for varargs function70  musttail call swifttailcc void(...) @varargs(...)71  ret void72}73