invoke and unwind

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

invoke and unwind

Ryan M. Lefever
If an unwind instruction is called, is the does it define a return value
for the corresponding invoke instruction?  In other words, when we get
to the exception label, will the value returned by the invoke
instruction be defined?  If so, how is it defined?

Regards,
Ryan
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: invoke and unwind

Chris Lattner
On Wed, 15 Nov 2006, Ryan M. Lefever wrote:
> If an unwind instruction is called, is the does it define a return value
> for the corresponding invoke instruction?  In other words, when we get
> to the exception label, will the value returned by the invoke
> instruction be defined?  If so, how is it defined?

No it doesn't.  The return value of the invoke is only live in the normal
dest, not in the unwind dest.  You can consider the invoke result to
dominate the normal dest but not the unwind dest.

To communicate from an exception handler to the catch use a global
variable or thread-local storage.  This is what the C++ runtime does.

-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev