[LLVMdev] More questions on exception handling

Talin viridia at gmail.com
Tue Dec 23 11:08:07 PST 2008


I've read and re-read the LLVM exception handling doc, and there are a
number of things that aren't clear to me.
In the section describing llvm.eh.exception, it says "The backend replaces
this intrinsic with the code that accesses the first argument of a call." I
don't understand this sentence. A call to what? What is meant by 'accesses'
- do you mean 'returns'?

In the paragraph that describes llvm.eh.selector, it says "The first
argument is the reference to the exception structure.", but later down it
says "To express this in LLVM code the landing pad will call
llvm.eh.selector. The arguments are the length of the filter expression (the
number of type infos plus one) ...". This seems contradictory.

If I am calling the _Unwind_ functions directly, do I need to use any of the
llvm.eh.* functions? Can I just use invoke and write my own landing pad?

How do you handle throwing an exception with a catch handler in the same
function? Invoke won't work since it assumes that the exception is being
thrown in a subroutine.

-- 
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081223/dc181e7e/attachment.html>


More information about the llvm-dev mailing list