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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Feb 11 06:12:52 PST 2014


>> 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".

Why fails? I would read a "generate a CantUnwind table" as a table
that a debugger or profiler can use, but lacks information to allow an
exception to be handled.

>> 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

Cheers,
Rafael



More information about the cfe-dev mailing list