From 8f45c9cc6232e5b841bc92b7f2ea9a792574c317 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 15 Sep 2014 17:19:16 +0000 Subject: 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 --- clang/lib/Frontend/InitPreprocessor.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Frontend/InitPreprocessor.cpp') diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index d691d19730b..daff9ce9114 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -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"); -- cgit v1.2.3