From: Reid Kleckner Date: Wed, 8 Jul 2015 18:27:10 +0000 (+0000) Subject: [SEH] Re-enable SEH on x86 Windows after r241699 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebb999818ea5fa05299cb386c0b396b16b66232b;p=clang [SEH] Re-enable SEH on x86 Windows after r241699 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241704 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index 2c32e8c22b..fed69a8281 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -812,7 +812,8 @@ public: /// \brief Whether the target supports SEH __try. bool isSEHTrySupported() const { return getTriple().isOSWindows() && - getTriple().getArch() == llvm::Triple::x86_64; + (getTriple().getArch() == llvm::Triple::x86 || + getTriple().getArch() == llvm::Triple::x86_64); } /// \brief Return true if {|} are normal characters in the asm string. diff --git a/test/CodeGen/exceptions-seh-finally.c b/test/CodeGen/exceptions-seh-finally.c index 513a1f3c89..772e28306b 100644 --- a/test/CodeGen/exceptions-seh-finally.c +++ b/test/CodeGen/exceptions-seh-finally.c @@ -1,6 +1,5 @@ // RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s -// FIXME: Re-enable 32-bit SEH. -// RUNX: %clang_cc1 %s -triple i686-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple i686-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s void abort(void) __attribute__((noreturn)); void might_crash(void); diff --git a/test/CodeGen/exceptions-seh.c b/test/CodeGen/exceptions-seh.c index 702125b07a..9707a9a31b 100644 --- a/test/CodeGen/exceptions-seh.c +++ b/test/CodeGen/exceptions-seh.c @@ -1,8 +1,7 @@ // RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - \ // RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=X64 -// FIXME: Re-enable 32-bit SEH. -// RUNX: %clang_cc1 %s -triple i686-pc-win32 -fms-extensions -emit-llvm -o - \ -// RUNX: | FileCheck %s --check-prefix=CHECK --check-prefix=X86 +// RUN: %clang_cc1 %s -triple i686-pc-win32 -fms-extensions -emit-llvm -o - \ +// RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=X86 void try_body(int numerator, int denominator, int *myres) { *myres = numerator / denominator;