Skip to content

Commit 151bd81

Browse files
committed
fixup! fix julia_alignment
1 parent 1e674d1 commit 151bd81

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/cgutils.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,11 +1171,9 @@ static unsigned julia_alignment(Value* /*ptr*/, jl_value_t *jltype, unsigned ali
11711171
{
11721172
if (!alignment) {
11731173
alignment = jl_datatype_align(jltype);
1174+
assert(alignment <= JL_HEAP_ALIGNMENT);
1175+
assert(JL_HEAP_ALIGNMENT % alignment == 0);
11741176
}
1175-
if (alignment > JL_HEAP_ALIGNMENT)
1176-
// Requested alignment exceeds strictest alignment promised in heap, so return the heap alignment.
1177-
return JL_HEAP_ALIGNMENT;
1178-
assert(JL_HEAP_ALIGNMENT % alignment == 0);
11791177
return alignment;
11801178
}
11811179

0 commit comments

Comments
 (0)