]> granicus.if.org Git - clang/commit
[SEH] Add 32-bit lowering for SEH __try
authorReid Kleckner <reid@kleckner.net>
Wed, 1 Jul 2015 17:10:10 +0000 (17:10 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 1 Jul 2015 17:10:10 +0000 (17:10 +0000)
commit0e2d47b82f41fa466aa2a4771a66c29fa80181b9
tree5ec73f887595a7880ad847e5761f459c19872f13
parent979403f2e3937a7f869f6a4ef217695c75cbb3c2
[SEH] Add 32-bit lowering for SEH __try

This re-lands r236052 and adds support for __exception_code().

In 32-bit SEH, the exception code is not available in eax. It is only
available in the filter function, and now we arrange to load it and
store it into an escaped variable in the parent frame.

As a consequence, we have to disable the "catch i8* null" optimization
on 32-bit and always generate a filter function. We can re-enable the
optimization if we detect an __except block that doesn't use the
exception code, but this probably isn't worth optimizing.

Reviewers: majnemer

Differential Revision: http://reviews.llvm.org/D10852

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241171 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/TargetInfo.h
lib/CodeGen/CGException.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenFunction.h
lib/Sema/SemaStmt.cpp
test/CodeGen/exceptions-seh-finally.c
test/CodeGen/exceptions-seh-leave.c
test/CodeGen/exceptions-seh.c