| ... | ... | @@ -1139,9 +1139,6 @@ static LLVMValueRef get_return_err_fn(CodeGen *g) { |
| 1139 | 1139 | LLVMSetFunctionCallConv(fn_val, get_llvm_cc(g, CallingConventionUnspecified)); |
| 1140 | 1140 | addLLVMFnAttr(fn_val, "nounwind"); |
| 1141 | 1141 | add_uwtable_attr(g, fn_val); |
| 1142 | | // Error return trace memory is in the stack, which is impossible to be at address 0 |
| 1143 | | // on any architecture. |
| 1144 | | addLLVMArgAttr(fn_val, (unsigned)0, "nonnull"); |
| 1145 | 1142 | if (codegen_have_frame_pointer(g)) { |
| 1146 | 1143 | ZigLLVMAddFunctionAttr(fn_val, "no-frame-pointer-elim", "true"); |
| 1147 | 1144 | ZigLLVMAddFunctionAttr(fn_val, "no-frame-pointer-elim-non-leaf", nullptr); |
| ... | ... | @@ -2058,13 +2055,9 @@ static LLVMValueRef get_merge_err_ret_traces_fn_val(CodeGen *g) { |
| 2058 | 2055 | LLVMSetFunctionCallConv(fn_val, get_llvm_cc(g, CallingConventionUnspecified)); |
| 2059 | 2056 | addLLVMFnAttr(fn_val, "nounwind"); |
| 2060 | 2057 | add_uwtable_attr(g, fn_val); |
| 2061 | | // Error return trace memory is in the stack, which is impossible to be at address 0 |
| 2062 | | // on any architecture. |
| 2063 | | addLLVMArgAttr(fn_val, (unsigned)0, "nonnull"); |
| 2064 | 2058 | addLLVMArgAttr(fn_val, (unsigned)0, "noalias"); |
| 2065 | 2059 | addLLVMArgAttr(fn_val, (unsigned)0, "writeonly"); |
| 2066 | | // Error return trace memory is in the stack, which is impossible to be at address 0 |
| 2067 | | // on any architecture. |
| 2060 | |
| 2068 | 2061 | addLLVMArgAttr(fn_val, (unsigned)1, "nonnull"); |
| 2069 | 2062 | addLLVMArgAttr(fn_val, (unsigned)1, "noalias"); |
| 2070 | 2063 | addLLVMArgAttr(fn_val, (unsigned)1, "readonly"); |
| ... | ... | @@ -5571,7 +5564,8 @@ static LLVMValueRef ir_render_await(CodeGen *g, IrExecutable *executable, IrInst |
| 5571 | 5564 | LLVMValueRef awaiter_ret_ptr_ptr = LLVMBuildStructGEP(g->builder, target_frame_ptr, coro_ret_start + 1, ""); |
| 5572 | 5565 | if (result_loc == nullptr) { |
| 5573 | 5566 | // no copy needed |
| 5574 | | LLVMBuildStore(g->builder, zero, awaiter_ret_ptr_ptr); |
| 5567 | LLVMBuildStore(g->builder, LLVMConstNull(LLVMGetElementType(LLVMTypeOf(awaiter_ret_ptr_ptr))), |
| 5568 | awaiter_ret_ptr_ptr); |
| 5575 | 5569 | } else { |
| 5576 | 5570 | LLVMBuildStore(g->builder, result_loc, awaiter_ret_ptr_ptr); |
| 5577 | 5571 | } |