Move offset_guard_size to the memory style

This commit is contained in:
Syrus
2020-07-07 15:58:46 -07:00
parent 98f2e8fe26
commit 416b76ab34
5 changed files with 36 additions and 21 deletions

View File

@@ -622,7 +622,7 @@ impl<'ctx, 'a> CtxType<'ctx, 'a> {
"",
)
.unwrap();
if memory_plan.style == MemoryStyle::Dynamic {
if matches!(memory_plan.style, MemoryStyle::Dynamic { .. }) {
let current_length_ptr = cache_builder
.build_struct_gep(
memory_definition_ptr,