From f22ad38ea7a5577b7ff48648973f90a010c9cdbd Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Tue, 4 Jul 2023 20:26:05 -0400 Subject: [PATCH] [mono][llvm] Fix another crash when using opaque pointers. (#88397) --- src/mono/mono/mini/mini-llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c index c0b8cda575aec..13388e8913d84 100644 --- a/src/mono/mono/mini/mini-llvm.c +++ b/src/mono/mono/mini/mini-llvm.c @@ -7712,7 +7712,7 @@ MONO_RESTORE_WARNING addresses [ins->sreg1] = build_alloca_address (ctx, t); g_assert (values [ins->sreg1]); } - LLVMBuildStore (builder, convert (ctx, values [ins->sreg1], LLVMGetElementType (LLVMTypeOf (addresses [ins->sreg1]->value))), addresses [ins->sreg1]->value); + LLVMBuildStore (builder, convert (ctx, values [ins->sreg1], addresses [ins->sreg1]->type), addresses [ins->sreg1]->value); addresses [ins->dreg] = addresses [ins->sreg1]; } else { LLVMTypeRef etype = type_to_llvm_type (ctx, t);