Add support for cold attribute

This commit is contained in:
Guillaume Gomez 2023-06-30 17:11:09 +02:00
parent 1bbee3e217
commit afc6489394

View file

@ -114,6 +114,10 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
if let Some(attr) = inline_attr(cx, inline) {
func.add_attribute(attr);
}
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::COLD) {
func.add_attribute(FnAttribute::Cold);
}
}
let function_features =