From: Martin Storsjo Date: Mon, 6 May 2019 21:19:01 +0000 (+0000) Subject: [MinGW] Use SEH by default on AArch64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d653c3f8e2168eb215fc2f74728b664947f7a478;p=clang [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 --- 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