diff --git a/src/mono/mono/mini/mini-llvm.c b/src/mono/mono/mini/mini-llvm.c index bebc547c89b077..17ab00ff58dac7 100644 --- a/src/mono/mono/mini/mini-llvm.c +++ b/src/mono/mono/mini/mini-llvm.c @@ -1593,7 +1593,7 @@ sig_to_llvm_sig_full (EmitContext *ctx, MonoMethodSignature *sig, LLVMCallInfo * ret_type = LLVMStructType (members, 1, FALSE); } else if (cinfo->ret.pair_storage [0] == LLVMArgNone && cinfo->ret.pair_storage [1] == LLVMArgNone) { /* Empty struct */ - ret_type = LLVMVoidType (); + ret_type = LLVMStructType (NULL, 0, FALSE); } else if (cinfo->ret.pair_storage [0] == LLVMArgInIReg && cinfo->ret.pair_storage [1] == LLVMArgInIReg) { LLVMTypeRef members [2]; @@ -4950,6 +4950,9 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref, /* Empty struct */ break; + if (LLVMTypeOf (lcall) == LLVMStructType (NULL, 0, FALSE)) + break; + if (!addresses [ins->dreg]) addresses [ins->dreg] = build_alloca_address (ctx, sig->ret);