Allow specifying alignment for functions

This commit is contained in:
Wesley Norris
2021-01-20 21:49:04 -05:00
parent 138fd56cf9
commit 448d07683a
18 changed files with 137 additions and 83 deletions

View File

@@ -38,6 +38,9 @@ pub struct CodegenFnAttrs {
/// be generated against a specific instruction set. Only usable on architectures which allow
/// switching between multiple instruction sets.
pub instruction_set: Option<InstructionSetAttr>,
/// The `#[repr(align(...))]` attribute. Indicates the value of which the function should be
/// aligned to.
pub alignment: Option<u32>,
}
bitflags! {
@@ -103,6 +106,7 @@ impl CodegenFnAttrs {
link_section: None,
no_sanitize: SanitizerSet::empty(),
instruction_set: None,
alignment: None,
}
}