1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/Feature/varargs.ll
Chris Lattner 82584a2741 Update test to new style
llvm-svn: 9327
2003-10-21 15:36:21 +00:00

20 lines
484 B
LLVM

; Demonstrate all of the variable argument handling intrinsic functions plus
; the va_arg instruction.
implementation
declare sbyte* %llvm.va_start()
declare sbyte* %llvm.va_copy(sbyte*)
declare void %llvm.va_end(sbyte*)
int %test(int %X, ...) {
%ap = call sbyte* %llvm.va_start()
%aq = call sbyte* %llvm.va_copy(sbyte* %ap)
call void %llvm.va_end(sbyte* %aq)
%tmp = vaarg sbyte* %ap, int
%ap2 = vanext sbyte* %ap, int
call void %llvm.va_end(sbyte* %ap2)
ret int %tmp
}