Skip to content

Commit afc6489

Browse files
Add support for cold attribute
1 parent 1bbee3e commit afc6489

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/attributes.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
114114
if let Some(attr) = inline_attr(cx, inline) {
115115
func.add_attribute(attr);
116116
}
117+
118+
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::COLD) {
119+
func.add_attribute(FnAttribute::Cold);
120+
}
117121
}
118122

119123
let function_features =

0 commit comments

Comments
 (0)