[llvm-dev] Resurrect Bug18710 (Only generate .ARM.exidx and ARM.extab when needed with EHABI)
Christian Bruel via llvm-dev
llvm-dev at lists.llvm.org
Mon Apr 3 01:53:48 PDT 2017
After a few comments and rethought, it seems that the support needed to
disable the cantunwind emission when the exception tables are not needed
is best handled with a change of the uwtable attribute semantic rather
than adding a new hidden flag.
So, for the ARM EHABI I propose the uwtable/nounwind semantic to be
nil (default) : : do not need an entry <- this is the change
nounwind : Function does not throw
uwtable : Need an entry because an exception might
uwtable + nounwind : Need an entry even if no exception pass by
so "nil" really means "no table" and is orthogonal with uwtable.
then uwtable is only set when the exceptions are enabled (regardless of
and nounwind is only set when the function cannot throw (regardless of
This makes -f[no]-unwind-tables, -f[no]-exceptions effective
A (logical) consequence is that the unwind directives (.fnstart,.fnend)
are only emitted if uwtable is set, so the few llvm tests that expected
the uwtable attribute to be the default need to be adapted.
(For some reasons, no notification was sent to the Subscribers (at least
for llvm-commits). Maybe I'm still doing something wrong with Phabricator ?)
Thanks for your feedback,
More information about the llvm-dev