1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/test/CodeGen/WinEH
Dave Lee 8f61c481f3 Make x86 __ehhandler comdat if parent function is
Summary:
This change comes from using lld for i686-windows-msvc. Before this change, lld
emits an error of:

    error: relocation against symbol in discarded section: .xdata

It's possible that this could be addressed in lld, but I think this change is
reasonable on its own.

At a high level, this is being generated:

    A (.text comdat) -> B (.text) -> C (.xdata comdat)

Where A is a C++ inline function, which references B, an exception handler
thunk, which references C, the exception handling info.

With this structure, lld will error when applying relocations to B if the C it
references has been discarded (some other C has been selected).

This change checks if A is comdat, and if so places the exception registration
thunk (B) in the comdata group of A (and B).

It appears that MSVC makes the __ehhandler function comdat.

Is it possible that duplicate thunks are being emitted into the final binary
with other linkers, or are they stripping the unused thunks?

Reviewers: rnk, majnemer, compnerd, smeenai

Reviewed By: rnk, compnerd

Subscribers: llvm-commits

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

llvm-svn: 316219
2017-10-20 17:04:43 +00:00
..
lit.local.cfg
wineh-asm.ll [WinEH] Don't remove unannotated inline-asm calls 2016-02-26 00:04:25 +00:00
wineh-cloning.ll [PR27284] Reverse the ownership between DICompileUnit and DISubprogram. 2016-04-15 15:57:41 +00:00
wineh-comdat.ll Make x86 __ehhandler comdat if parent function is 2017-10-20 17:04:43 +00:00
wineh-demotion.ll
wineh-intrinsics-invalid.ll
wineh-intrinsics.ll
wineh-nested-unwind.ll [WinEH] Visit 'unwind to caller' catchswitches nested in catchswitches 2016-02-23 07:18:15 +00:00
wineh-no-demotion.ll
wineh-noret-cleanup.ll Avoid infinite loops in branch folding 2016-12-12 23:05:38 +00:00
wineh-setjmp.ll [WinEH] Make setjmp work correctly with EH 2016-02-29 19:16:03 +00:00
wineh-statenumbering-cleanups.ll
wineh-statenumbering.ll [WinEH] Optimize WinEH state stores 2016-02-17 18:37:11 +00:00