diff options
author | Martin Storsjo <martin@martin.st> | 2019-05-06 21:19:01 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2019-05-06 21:19:01 +0000 |
commit | d653c3f8e2168eb215fc2f74728b664947f7a478 (patch) | |
tree | 4cd6b8da5eccf9e5120d996c9459f494385cbc28 | |
parent | 03fbaba68257f6ebdec4aceec394580bd29e0b13 (diff) |
[MinGW] Use SEH by default on AArch64
The implementation of SEH is pretty mature at this point.
Differential Revision: https://reviews.llvm.org/D61591
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360081 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/ToolChains/MinGW.cpp | 5 | ||||
-rw-r--r-- | test/Driver/windows-exceptions.cpp | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/Driver/ToolChains/MinGW.cpp b/lib/Driver/ToolChains/MinGW.cpp index 048cfde414..0e1873cce2 100644 --- a/lib/Driver/ToolChains/MinGW.cpp +++ b/lib/Driver/ToolChains/MinGW.cpp @@ -436,7 +436,8 @@ bool toolchains::MinGW::IsUnwindTablesDefault(const ArgList &Args) const { if (ExceptionArg && ExceptionArg->getOption().matches(options::OPT_fseh_exceptions)) return true; - return getArch() == llvm::Triple::x86_64; + return getArch() == llvm::Triple::x86_64 || + getArch() == llvm::Triple::aarch64; } bool toolchains::MinGW::isPICDefault() const { @@ -451,7 +452,7 @@ bool toolchains::MinGW::isPICDefaultForced() const { llvm::ExceptionHandling toolchains::MinGW::GetExceptionModel(const ArgList &Args) const { - if (getArch() == llvm::Triple::x86_64) + if (getArch() == llvm::Triple::x86_64 || getArch() == llvm::Triple::aarch64) return llvm::ExceptionHandling::WinEH; return llvm::ExceptionHandling::DwarfCFI; } diff --git a/test/Driver/windows-exceptions.cpp b/test/Driver/windows-exceptions.cpp index 2eefe22bcd..5aa4743eba 100644 --- a/test/Driver/windows-exceptions.cpp +++ b/test/Driver/windows-exceptions.cpp @@ -2,8 +2,8 @@ // RUN: %clang -target x86_64-windows-msvc -c %s -### 2>&1 | FileCheck -check-prefix=MSVC %s // RUN: %clang -target i686-windows-gnu -c %s -### 2>&1 | FileCheck -check-prefix=MINGW-DWARF %s // RUN: %clang -target x86_64-windows-gnu -c %s -### 2>&1 | FileCheck -check-prefix=MINGW-SEH %s -// RUN: %clang -target aarch64-windows-gnu -c %s -### 2>&1 | FileCheck -check-prefix=MINGW-DWARF %s -// RUN: %clang -target aarch64-windows-gnu -fseh-exceptions -c %s -### 2>&1 | FileCheck -check-prefix=MINGW-SEH %s +// RUN: %clang -target aarch64-windows-gnu -fdwarf-exceptions -c %s -### 2>&1 | FileCheck -check-prefix=MINGW-DWARF %s +// RUN: %clang -target aarch64-windows-gnu -c %s -### 2>&1 | FileCheck -check-prefix=MINGW-SEH %s MSVC-NOT: -fdwarf-exceptions MSVC-NOT: -fseh-exceptions |