Skip to content

Commit eef57cb

Browse files
committed
Pass Option<Span> to codegen_unwind_terminate
In preparation for unwinding support.
1 parent 0103c58 commit eef57cb

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

src/base.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
566566
);
567567
}
568568
TerminatorKind::UnwindTerminate(reason) => {
569-
codegen_unwind_terminate(fx, source_info, *reason);
569+
codegen_unwind_terminate(fx, Some(source_info.span), *reason);
570570
}
571571
TerminatorKind::UnwindResume => {
572572
// FIXME implement unwinding
@@ -1117,18 +1117,10 @@ pub(crate) fn codegen_panic_nounwind<'tcx>(
11171117

11181118
pub(crate) fn codegen_unwind_terminate<'tcx>(
11191119
fx: &mut FunctionCx<'_, '_, 'tcx>,
1120-
source_info: mir::SourceInfo,
1120+
span: Option<Span>,
11211121
reason: UnwindTerminateReason,
11221122
) {
1123-
let args = [];
1124-
1125-
codegen_panic_inner(
1126-
fx,
1127-
reason.lang_item(),
1128-
&args,
1129-
UnwindAction::Terminate(UnwindTerminateReason::Abi),
1130-
Some(source_info.span),
1131-
);
1123+
codegen_panic_inner(fx, reason.lang_item(), &[], UnwindAction::Unreachable, span);
11321124
}
11331125

11341126
fn codegen_panic_inner<'tcx>(

src/compiler_builtins.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,4 @@ builtin_functions! {
6767
fn malloc(size: size_t) -> *mut c_void;
6868
fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
6969
fn free(p: *mut c_void) -> ();
70-
7170
}

0 commit comments

Comments
 (0)