We implement structured exception handling (SEH) by generating filter functions for functions that use exceptions. Currently, we use associative comdats to ensure that the filter functions are preserved if and only if the functions we generated them for are preserved. This can lead to problems when generating COFF objects - LLVM may decide to inline a function that uses SEH and remove its body, at which point we will end up with a comdat that COFF cannot represent. To avoid running into that situation, this change makes us not use associative comdats for SEH filter functions. We can still get the benefits we used the associative comdats for: we will always preserve filter functions we use, and dead stripping can eliminate the ones we don't use.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
With this change, LLVM, Clang, and lld compile using LTO and pass tests on Windows. Without the change, the tests fail to compile ("Associative COMDAT symbol ... does not exist", https://bugs.llvm.org//show_bug.cgi?id=31974).
Comment Actions
LGTM. The fact that we didn't apply the comdat when the try was internal indicates that we've encountered this before.