Hi Anton,

> Please find attached patch, which fixes LLVM's behaviour during code
> emission in LPs.
> 
> Currently AddLandingPad() function emits llvm.eh.exception only for
> TRY_EXCEPT blocks. But sometimes (see, e.g. g++.dg/eh/unexpected1.C) gcc
> generates code of form:
> 
> try {
>  throw();
> } finally {
>  ....
>  Unwind_Resume();
> }
> 
> so, the exception is rethrown upper. In order to correctly handle this
> situation we should emit landing pad info for TRY_FINALLY blocks also.
> Attached patch does this.

while this patch works, I think it is suboptimal in some cases.
I am still investigating how to avoid this suboptimality.  I suggest
this patch be put on hold for a day or two until I have finished.

Ciao,

Duncan.
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to