[cfe-dev] [LLVMdev] Unwind behaviour in Clang/LLVM

Renato Golin renato.golin at linaro.org
Tue Feb 11 01:40:44 PST 2014


On 10 February 2014 14:44, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> Just that: unwind tables are output for the function, even if nothing
> else seems to say they are necessary.

Right, I shall rely on that behaviour when preparing my patch and we
shall see how it behaves on EHABI land. Maybe shouldEmitMoves will
have to change, but I'm hoping it doesn't.


> The semantics uwtable is just "make sure it is possible to unwind past
> this function". It doesn't include anything more,
> like the ability to run destructors. It is used for ABIs that require
> it for use in debuggers and profilers.

Well, that meaning fails when you have both uwtable and nounwind,
which means: "generate a CantUnwind table".


> I am not too sure about nounwind. I think it is more about using
> unwind for control flow in the language. Having it allows us
> to prune information used for exception handling.

nounwind translates into "doesNotThrow()", which is *also* used on
"needsUnwindTables()" which is used in "needsCFIMoves()".

It's not simple. ;)

cheers,
--renato




More information about the cfe-dev mailing list