Avoid over-aligning the return value in the -Cpanic=abort case
This commit is contained in:
parent
d45ce5aed6
commit
1920f817ca
1 changed files with 4 additions and 2 deletions
|
@ -858,8 +858,10 @@ fn try_intrinsic(
|
|||
) {
|
||||
if bx.sess().no_landing_pads() {
|
||||
bx.call(func, &[data], None);
|
||||
let ptr_align = bx.tcx().data_layout.pointer_align.abi;
|
||||
bx.store(bx.const_null(bx.type_i8p()), dest, ptr_align);
|
||||
// Return 0 unconditionally from the intrinsic call;
|
||||
// we can never unwind.
|
||||
let ret_align = bx.tcx().data_layout.i32_align.abi;
|
||||
bx.store(bx.const_i32(0), dest, ret_align);
|
||||
} else if wants_msvc_seh(bx.sess()) {
|
||||
codegen_msvc_try(bx, func, data, local_ptr, dest);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue