As noted in #6126 the documentation for -fexceptions appears to imply that unwind information is always generated, which isn't the case.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'd prefer to focus the documentation more generically on exceptions, not unwind information specifically. -fexceptions makes code generation change in other ways, and "unwind information" doesn't exist on all targets where exception handling is relevant.
What do you think about e.g. "Allow exceptions to be thrown through Clang compiled stack frames (on many targets, this will enable unwind information for functions that might have an exception thrown through them). This is on by default in x86-64"? Or were you thinking of something else?
Something like that, sure.
Is it actually on by default on x86-64? I don't think the default is target-specific, I think it's just on for default for C++ dialects, and off by default for non-C++ dialects.
I don't see anything x86_64 specific for OPT_fexceptions handling in clang/lib/Driver/ToolChains/Clang.cpp. So perhaps "For most targets, this is enabled by default for C++." It's disabled for the ps4/ps5 toolchains and xcore, hence the "most targets" qualifier.