<div class="__aliyun_email_body_block"><div  style="clear:both;">Oh, I got it now. Now there shouldn't be misunderstanding.</div><div  style="clear:both;"><br ></div><div  style="clear:both;">Many Thanks,</div><div  style="clear:both;">Chuanqi</div><div  style="clear:both;"><br ></div><blockquote  style="margin-right:0;margin-top:0;margin-bottom:0;"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">------------------------------------------------------------------</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">From:John McCall <rjmccall@apple.com></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Send Time:2021年12月2日(星期四) 11:34</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">To:chuanqi.xcq <yedeng.yd@linux.alibaba.com></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Cc:James Y Knight <jyknight@google.com>; llvm-dev <llvm-dev@lists.llvm.org>; clang developer list <cfe-dev@lists.llvm.org>; "Fāng-ruì Sòng" <maskray@google.com></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">Subject:Re: What's the difference between llvm `resume` instruction and `__cxa_rethrow`?</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div>On 1 Dec 2021, at 22:00, chuanqi.xcq wrote:<br >> Hi John,<br >><br >> Many thanks for your explanation of Exception Handling!<br >><br >>>  So it depends on what’s in the ellipses, but I believe this code <br >>> is invalid, and landing pads are not supposed to do a resume when <br >>> they’ve said they’re going to catch.<br >>><br >>> I assume the actual source code you’re processing doesn’t <br >>> literally have a catch (...) { throw; }, and instead it calls some <br >>> function that might do a throw;?<br >><br >> I guess I didn't make things clear (or I misunderstood you). I think <br >> the code I posted might be valid.<br ><br >I mean that the generated IR is incorrect because, to correspond to that <br >source code, it needs to be rethrowing within a catch body instead of <br >simply resuming.  That’s what I thought you were asking about.<br ><br >Frankly, I just assumed the structure of your generated coroutine body <br >was correct, or correct enough to show the intent.<br ><br >John.</blockquote><div ><br ></div></div>