1
Fork 0

Never inline C variadic functions

This commit is contained in:
Tomasz Miąsko 2020-11-11 00:00:00 +00:00
parent 66cadec176
commit 79d853ecce
2 changed files with 23 additions and 0 deletions

View file

@ -206,6 +206,11 @@ impl Inliner<'tcx> {
debug!("should_inline({:?})", callsite);
let tcx = self.tcx;
if callsite.fn_sig.c_variadic() {
debug!("callee is variadic - not inlining");
return false;
}
let codegen_fn_attrs = tcx.codegen_fn_attrs(callsite.callee.def_id());
let self_features = &self.codegen_fn_attrs.target_features;