[SEH] Delete the 32-bit IR lowering for __finally blocks and use x64
authorReid Kleckner <reid@kleckner.net>
Wed, 1 Jul 2015 21:00:00 +0000 (21:00 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 1 Jul 2015 21:00:00 +0000 (21:00 +0000)
commiteb11c41900a4110ad8f1f088eabab5a57f53a1f4
treef48da955d7b3dcc93c66e026f1d9973ddcfbb550
parent6511c8bb9a7edb0f973b7ba5ca47f4ff049b1bc8
[SEH] Delete the 32-bit IR lowering for __finally blocks and use x64

32-bit finally funclets are intended to be called both directly from the
parent function and indirectly from the EH runtime. Because we aren't
contorting LLVM's X86 prologue to match MSVC's, calling the finally
block directly passes in a different value of EBP than the one that the
runtime provides. We need an adapter thunk to adjust EBP to the expected
value. However, WinEHPrepare already has to solve this problem when
cleanups are not pre-outlined, so we can go ahead and rely on it rather
than duplicating work.

Now we only do the llvm.x86.seh.recoverfp dance for 32-bit SEH filter
functions.

llvm-svn: 241187
clang/lib/CodeGen/CGException.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/CodeGen/exceptions-seh-finally.c
clang/test/CodeGen/exceptions-seh.c