[LLVMdev] Exception Tables in latest LLVM

Yiannis Tsiouris yiannis.tsiouris at gmail.com
Fri Sep 2 10:43:12 PDT 2011


On 09/02/2011 07:31 PM, Duncan Sands wrote:
> Hi Yiannis,
>
>   
>>>> I have been using llvm 2.8 (i know ancient history!) for a backend that i was
>>>> implementing. I have been trying to port my patches to latest llvm (svn build)
>>>> lately but i have one problem as far as the Exception Handling mechanism is
>>>> concerned. It seems that there are no Exception Tables generated any more such
>>>> as the one below:
>>>>         
> you need to add a landingpad instruction to the start of each basic block with
> is that unwind target of an invoke.  Since you only seem to be interested in
> cleanups, something like this should do:
>
> declare i32 @__gcc_personality_v0(i32, i64, i8*, i8*)
>
> ...
>    invoke void @foo() to label %cont unwind label %lp
>
> lp:
>    %tmp = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* 
> @__gcc_personality_v0 cleanup
>    ...
>
> Ciao, Duncan.
>
>   
This seems to work fine!  Thank you very much Duncan!

Yiannis



More information about the llvm-dev mailing list