Destruct landing_pad return value before passing it to cg_ssa
This commit is contained in:
parent
f9805a2186
commit
213ced1c43
@ -1119,18 +1119,18 @@ fn set_personality_fn(&mut self, _personality: RValue<'gcc>) {
|
|||||||
// TODO(antoyo)
|
// TODO(antoyo)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cleanup_landing_pad(&mut self, _ty: Type<'gcc>, _pers_fn: RValue<'gcc>) -> RValue<'gcc> {
|
fn cleanup_landing_pad(&mut self, _pers_fn: RValue<'gcc>) -> (RValue<'gcc>, RValue<'gcc>) {
|
||||||
let field1 = self.context.new_field(None, self.u8_type.make_pointer(), "landing_pad_field_1");
|
(
|
||||||
let field2 = self.context.new_field(None, self.i32_type, "landing_pad_field_1");
|
self.current_func().new_local(None, self.u8_type.make_pointer(), "landing_pad0")
|
||||||
let struct_type = self.context.new_struct_type(None, "landing_pad", &[field1, field2]);
|
.to_rvalue(),
|
||||||
self.current_func().new_local(None, struct_type.as_type(), "landing_pad")
|
self.current_func().new_local(None, self.i32_type, "landing_pad1").to_rvalue(),
|
||||||
.to_rvalue()
|
)
|
||||||
// TODO(antoyo): Properly implement unwinding.
|
// TODO(antoyo): Properly implement unwinding.
|
||||||
// the above is just to make the compilation work as it seems
|
// the above is just to make the compilation work as it seems
|
||||||
// rustc_codegen_ssa now calls the unwinding builder methods even on panic=abort.
|
// rustc_codegen_ssa now calls the unwinding builder methods even on panic=abort.
|
||||||
}
|
}
|
||||||
|
|
||||||
fn resume(&mut self, _exn: RValue<'gcc>) {
|
fn resume(&mut self, _exn0: RValue<'gcc>, _exn1: RValue<'gcc>) {
|
||||||
// TODO(bjorn3): Properly implement unwinding.
|
// TODO(bjorn3): Properly implement unwinding.
|
||||||
self.unreachable();
|
self.unreachable();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user