summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-05-06 21:19:01 +0000
committerMartin Storsjo <martin@martin.st>2019-05-06 21:19:01 +0000
commit5e100de2c7d34aa62c5e52b99ef8e9cc1d16c51a (patch)
treee8e82925d3ebf71be630334371340890cb68c661
parent899f3cd5817e410402a2f39a636a3bb4b119b3e2 (diff)
downloadbcm5719-llvm-5e100de2c7d34aa62c5e52b99ef8e9cc1d16c51a.tar.gz
bcm5719-llvm-5e100de2c7d34aa62c5e52b99ef8e9cc1d16c51a.zip
[MinGW] Use SEH by default on AArch64
The implementation of SEH is pretty mature at this point. Differential Revision: https://reviews.llvm.org/D61591 llvm-svn: 360081
-rw-r--r--clang/lib/Driver/ToolChains/MinGW.cpp5
-rw-r--r--clang/test/Driver/windows-exceptions.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp
index 048cfde414d..0e1873cce25 100644
--- a/clang/lib/Driver/ToolChains/MinGW.cpp
+++ b/clang/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/clang/test/Driver/windows-exceptions.cpp b/clang/test/Driver/windows-exceptions.cpp
index 2eefe22bcdb..5aa4743eba5 100644
--- a/clang/test/Driver/windows-exceptions.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud