r360081 - [MinGW] Use SEH by default on AArch64
Martin Storsjo via cfe-commits
cfe-commits at lists.llvm.org
Mon May 6 14:19:01 PDT 2019
Author: mstorsjo
Date: Mon May 6 14:19:01 2019
New Revision: 360081
URL: http://llvm.org/viewvc/llvm-project?rev=360081&view=rev
Log:
[MinGW] Use SEH by default on AArch64
The implementation of SEH is pretty mature at this point.
Differential Revision: https://reviews.llvm.org/D61591
Modified:
cfe/trunk/lib/Driver/ToolChains/MinGW.cpp
cfe/trunk/test/Driver/windows-exceptions.cpp
Modified: cfe/trunk/lib/Driver/ToolChains/MinGW.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/MinGW.cpp?rev=360081&r1=360080&r2=360081&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/MinGW.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/MinGW.cpp Mon May 6 14:19:01 2019
@@ -436,7 +436,8 @@ bool toolchains::MinGW::IsUnwindTablesDe
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::isPICDefaultForc
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;
}
Modified: cfe/trunk/test/Driver/windows-exceptions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/windows-exceptions.cpp?rev=360081&r1=360080&r2=360081&view=diff
==============================================================================
--- cfe/trunk/test/Driver/windows-exceptions.cpp (original)
+++ cfe/trunk/test/Driver/windows-exceptions.cpp Mon May 6 14:19:01 2019
@@ -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
More information about the cfe-commits
mailing list