Message ID | 20170324232057.15033-28-luc.vanoostenryck@gmail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/sparse-llvm.c b/sparse-llvm.c index b0ecc1972..10d29e299 100644 --- a/sparse-llvm.c +++ b/sparse-llvm.c @@ -1087,7 +1087,7 @@ static void output_fn(LLVMModuleRef module, struct entrypoint *ep) name = show_ident(sym->ident); - fun_type = LLVMFunctionType(ret_type, arg_types, nr_args, 0); + fun_type = LLVMFunctionType(ret_type, arg_types, nr_args, base_type->variadic); function.fn = LLVMAddFunction(module, name, fun_type); LLVMSetFunctionCallConv(function.fn, LLVMCCallConv);
It appears that when a function is compiled, its variadic flag is not being set in LLVM so LLVM complains when at call sites variable arguments are passed. Reported-by: Dibyendu Majumdar <mobile@majumdar.org.uk> Originally-by: Dibyendu Majumdar <mobile@majumdar.org.uk> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- sparse-llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)