Add -fseh-exceptions for MinGW-w64

This adds a flag called -fseh-exceptions that uses the native Windows
.pdata and .xdata unwind mechanism to throw exceptions. The other EH
possibilities are DWARF and SJLJ exceptions.

Patch by Martell Malone!

Reviewed By: asl, rnk

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

llvm-svn: 217790
This commit is contained in:
Reid Kleckner
2014-09-15 17:19:16 +00:00
parent 49dd4283ed
commit 8f45c9cc62
8 changed files with 40 additions and 0 deletions

View File

@@ -556,6 +556,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
Builder.defineMacro("__GXX_RTTI");
if (LangOpts.SjLjExceptions)
Builder.defineMacro("__USING_SJLJ_EXCEPTIONS__");
if (LangOpts.SEHExceptions)
Builder.defineMacro("__SEH__");
if (LangOpts.Deprecated)
Builder.defineMacro("__DEPRECATED");