Error when trying to define variadic functions
They aren't yet supported by Cranelift
This commit is contained in:
parent
3207c9faec
commit
39ee14d253
@ -193,6 +193,15 @@ pub(crate) fn codegen_fn_prelude<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, start_
|
||||
}
|
||||
|
||||
let fn_abi = fx.fn_abi.take().unwrap();
|
||||
|
||||
// FIXME implement variadics in cranelift
|
||||
if fn_abi.c_variadic {
|
||||
fx.tcx.sess.span_fatal(
|
||||
fx.mir.span,
|
||||
"Defining variadic functions is not yet supported by Cranelift",
|
||||
);
|
||||
}
|
||||
|
||||
let mut arg_abis_iter = fn_abi.args.iter();
|
||||
|
||||
let func_params = fx
|
||||
|
@ -1135,6 +1135,20 @@ fn codegen_regular_intrinsic_call<'tcx>(
|
||||
// FIXME implement black_box semantics
|
||||
ret.write_cvalue(fx, a);
|
||||
};
|
||||
|
||||
// FIXME implement variadics in cranelift
|
||||
va_copy, (o _dest, o _src) {
|
||||
fx.tcx.sess.span_fatal(
|
||||
source_info.span,
|
||||
"Defining variadic functions is not yet supported by Cranelift",
|
||||
);
|
||||
};
|
||||
va_arg | va_end, (o _valist) {
|
||||
fx.tcx.sess.span_fatal(
|
||||
source_info.span,
|
||||
"Defining variadic functions is not yet supported by Cranelift",
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
let ret_block = fx.get_block(destination.unwrap());
|
||||
|
Loading…
x
Reference in New Issue
Block a user