This commit is contained in:
Antoni Boucher 2023-01-03 08:56:00 -05:00
parent b0cf0e8c06
commit 71d7e561bd
2 changed files with 18 additions and 0 deletions

View file

@ -1210,6 +1210,14 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
fn cleanup_landing_pad(&mut self, _ty: Type<'gcc>, pers_fn: RValue<'gcc>) -> RValue<'gcc> {
self.set_personality_fn(pers_fn);
/*
* Matching GCC exception handling with LLVM:
*
* GCC LLVM
* CATCH_EXPR landing pad catch clause
* TRY_FINALLY_EXPR cleanup
*/
self.cleanup_blocks.borrow_mut().insert(self.block);
// FIXME: we're probably not creating a real cleanup pad here.