Use the Align type when parsing alignment attributes

This commit is contained in:
beetrees 2024-03-24 01:03:39 +00:00
parent 2f090c30dd
commit 6e5f1dacf3
No known key found for this signature in database
GPG key ID: 8791BD754191EBD6
12 changed files with 74 additions and 26 deletions

View file

@ -417,7 +417,7 @@ pub fn from_fn_attrs<'ll, 'tcx>(
to_add.push(llvm::CreateAttrString(cx.llcx, "cmse_nonsecure_entry"));
}
if let Some(align) = codegen_fn_attrs.alignment {
llvm::set_alignment(llfn, align as usize);
llvm::set_alignment(llfn, align);
}
to_add.extend(sanitize_attrs(cx, codegen_fn_attrs.no_sanitize));