1
Fork 0

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

@ -1,6 +1,7 @@
use crate::mir::mono::Linkage;
use rustc_attr::{InlineAttr, InstructionSetAttr, OptimizeAttr};
use rustc_span::symbol::Symbol;
use rustc_target::abi::Align;
use rustc_target::spec::SanitizerSet;
#[derive(Clone, TyEncodable, TyDecodable, HashStable, Debug)]
@ -42,7 +43,7 @@ pub struct CodegenFnAttrs {
pub instruction_set: Option<InstructionSetAttr>,
/// The `#[repr(align(...))]` attribute. Indicates the value of which the function should be
/// aligned to.
pub alignment: Option<u32>,
pub alignment: Option<Align>,
}
#[derive(Clone, Copy, PartialEq, Eq, TyEncodable, TyDecodable, HashStable)]