[LLVMdev] RFC: Exception Handling Proposal II
Renato Golin
rengolin at systemcall.org
Thu Nov 25 03:25:17 PST 2010
On 25 November 2010 11:03, Duncan Sands <baldrick at free.fr> wrote:
> I don't understand what you are saying. Cleanups (e.g. destructors)
Hi Duncan,
Cleanup landing pads normally call destructors, but they're not a
destructor themselves. I'm simply saying that compiler generated
blocks (such as cleanups) should never depend on user variables.
But I get what you're saying. If a cleanup area calls a destructor,
and destructors use user values, they have an indirect conditional
dependency that cannot be solved at compile time, unless you have a
way to normalize the call graph to disambiguate all dominance
analysis.
> I don't get what you are talking about here. You can access any variables
> you like, whether local or global, in a catch handler. They are not passed
> to the handler via llvm.eh.exception or llvm.eh.selector, they are simply
> accessed directly (the unwinder restores registers etc making this
> possible).
Destructors and Catch areas are user code, you could access any
variable as pleased.
Cleanup areas are compiler code, those were the ones I was talking about.
> In Ada you can throw and exception inside a destructor and it does not lead
> to program termination.
Ok, sorry. I should stop thinking C++ here.... it's difficult, but
I'll try... ;)
cheers,
--renato
More information about the llvm-dev
mailing list