Make it possible to define data alignment

This commit is contained in:
bjorn3
2019-03-30 16:45:58 +01:00
committed by Benjamin Bouvier
parent 443e48aee1
commit cb6268118c
5 changed files with 33 additions and 14 deletions

View File

@@ -59,7 +59,7 @@ where
fn declare_function(&mut self, name: &str, linkage: Linkage);
/// Declare a data object.
fn declare_data(&mut self, name: &str, linkage: Linkage, writable: bool);
fn declare_data(&mut self, name: &str, linkage: Linkage, writable: bool, align: Option<u8>);
/// Define a function, producing the function body from the given `Context`.
///
@@ -79,6 +79,7 @@ where
&mut self,
name: &str,
writable: bool,
align: Option<u8>,
data_ctx: &DataContext,
namespace: &ModuleNamespace<Self>,
) -> ModuleResult<Self::CompiledData>;