]> granicus.if.org Git - clang/commit
stop using associative comdats for SEH filter functions
authorBob Haarman <llvm@inglorion.net>
Wed, 22 Feb 2017 20:29:39 +0000 (20:29 +0000)
committerBob Haarman <llvm@inglorion.net>
Wed, 22 Feb 2017 20:29:39 +0000 (20:29 +0000)
commit9d5a4118c5348361e2e11269603b2784534388c2
tree768015569f0da6fc79b098a5736f59b321eeb551
parent95d9d223071f5b1e9da9058020c241a7e3828fa6
stop using associative comdats for SEH filter functions

Summary: 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.

Reviewers: rnk, pcc, ruiu

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D30117

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295872 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGException.cpp
test/CodeGenCXX/exceptions-seh.cpp