mstorsjo updated this revision to Diff 178513.
mstorsjo marked an inline comment as done.
mstorsjo added a comment.
Moved the added code to `toolchains::MinGW::IsUnwindTablesDefault`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55749/new/
https://reviews.llvm.org/D55749
Files:
lib/Driver/ToolChains/MinGW.cpp
test/Driver/windows-exceptions.cpp
Index: test/Driver/windows-exceptions.cpp
===================================================================
--- test/Driver/windows-exceptions.cpp
+++ test/Driver/windows-exceptions.cpp
@@ -2,8 +2,11 @@
// 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
MSVC-NOT: -fdwarf-exceptions
MSVC-NOT: -fseh-exceptions
MINGW-DWARF: -fdwarf-exceptions
+MINGW-SEH: -munwind-tables
MINGW-SEH: -fseh-exceptions
Index: lib/Driver/ToolChains/MinGW.cpp
===================================================================
--- lib/Driver/ToolChains/MinGW.cpp
+++ lib/Driver/ToolChains/MinGW.cpp
@@ -429,6 +429,12 @@
}
bool toolchains::MinGW::IsUnwindTablesDefault(const ArgList &Args) const {
+ Arg *ExceptionArg = Args.getLastArg(options::OPT_fsjlj_exceptions,
+ options::OPT_fseh_exceptions,
+ options::OPT_fdwarf_exceptions);
+ if (ExceptionArg &&
+ ExceptionArg->getOption().matches(options::OPT_fseh_exceptions))
+ return true;
return getArch() == llvm::Triple::x86_64;
}
Index: test/Driver/windows-exceptions.cpp
===================================================================
--- test/Driver/windows-exceptions.cpp
+++ test/Driver/windows-exceptions.cpp
@@ -2,8 +2,11 @@
// 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
MSVC-NOT: -fdwarf-exceptions
MSVC-NOT: -fseh-exceptions
MINGW-DWARF: -fdwarf-exceptions
+MINGW-SEH: -munwind-tables
MINGW-SEH: -fseh-exceptions
Index: lib/Driver/ToolChains/MinGW.cpp
===================================================================
--- lib/Driver/ToolChains/MinGW.cpp
+++ lib/Driver/ToolChains/MinGW.cpp
@@ -429,6 +429,12 @@
}
bool toolchains::MinGW::IsUnwindTablesDefault(const ArgList &Args) const {
+ Arg *ExceptionArg = Args.getLastArg(options::OPT_fsjlj_exceptions,
+ options::OPT_fseh_exceptions,
+ options::OPT_fdwarf_exceptions);
+ if (ExceptionArg &&
+ ExceptionArg->getOption().matches(options::OPT_fseh_exceptions))
+ return true;
return getArch() == llvm::Triple::x86_64;
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits