mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-14 23:33:15 +00:00
Another minor fix to OdinLLVMBuildTransmute
This commit is contained in:
@@ -2878,7 +2878,7 @@ LLVMValueRef OdinLLVMBuildTransmute(lbProcedure *p, LLVMValueRef val, LLVMTypeRe
|
||||
LLVMValueRef ptr = LLVMBuildAlloca(p->builder, dst_type, "");
|
||||
LLVMPositionBuilderAtEnd(p->builder, p->curr_block->block);
|
||||
i64 max_align = gb_max(lb_alignof(src_type), lb_alignof(dst_type));
|
||||
max_align = gb_max(max_align, 4);
|
||||
max_align = gb_min(max_align, 4);
|
||||
LLVMSetAlignment(ptr, cast(unsigned)max_align);
|
||||
|
||||
LLVMValueRef nptr = LLVMBuildPointerCast(p->builder, ptr, LLVMPointerType(src_type, 0), "");
|
||||
|
||||
Reference in New Issue
Block a user