1 #define NULL ((void*)0)
2
3 extern int print(const char *msg, ...);
4
5 int foo(const char *fmt, int a, long l, int *p);
foo(const char * fmt,int a,long l,int * p)6 int foo(const char *fmt, int a, long l, int *p)
7 {
8 return print(fmt, 'x', a, __LINE__, l, 0L, p, NULL);
9 }
10
11 /*
12 * check-name: call-variadic
13 * check-command: sparse-llvm-dis -m64 $file
14 *
15 * check-output-start
16 ; ModuleID = '<stdin>'
17 source_filename = "sparse"
18
19 define i32 @foo(i8* %ARG1., i32 %ARG2., i64 %ARG3., i32* %ARG4.) {
20 L0:
21 %R5. = call i32 (i8*, ...) @print(i8* %ARG1., i32 120, i32 %ARG2., i32 8, i64 %ARG3., i64 0, i32* %ARG4., i8* null)
22 ret i32 %R5.
23 }
24
25 declare i32 @print(i8*, ...)
26 * check-output-end
27 */
28