Skip to content

Commit 213ced1

Browse files
committed
Destruct landing_pad return value before passing it to cg_ssa
1 parent f9805a2 commit 213ced1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/builder.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,18 +1119,18 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
11191119
// TODO(antoyo)
11201120
}
11211121

1122-
fn cleanup_landing_pad(&mut self, _ty: Type<'gcc>, _pers_fn: RValue<'gcc>) -> RValue<'gcc> {
1123-
let field1 = self.context.new_field(None, self.u8_type.make_pointer(), "landing_pad_field_1");
1124-
let field2 = self.context.new_field(None, self.i32_type, "landing_pad_field_1");
1125-
let struct_type = self.context.new_struct_type(None, "landing_pad", &[field1, field2]);
1126-
self.current_func().new_local(None, struct_type.as_type(), "landing_pad")
1127-
.to_rvalue()
1122+
fn cleanup_landing_pad(&mut self, _pers_fn: RValue<'gcc>) -> (RValue<'gcc>, RValue<'gcc>) {
1123+
(
1124+
self.current_func().new_local(None, self.u8_type.make_pointer(), "landing_pad0")
1125+
.to_rvalue(),
1126+
self.current_func().new_local(None, self.i32_type, "landing_pad1").to_rvalue(),
1127+
)
11281128
// TODO(antoyo): Properly implement unwinding.
11291129
// the above is just to make the compilation work as it seems
11301130
// rustc_codegen_ssa now calls the unwinding builder methods even on panic=abort.
11311131
}
11321132

1133-
fn resume(&mut self, _exn: RValue<'gcc>) {
1133+
fn resume(&mut self, _exn0: RValue<'gcc>, _exn1: RValue<'gcc>) {
11341134
// TODO(bjorn3): Properly implement unwinding.
11351135
self.unreachable();
11361136
}

0 commit comments

Comments
 (0)