[PATCH] D47850: [Driver] Stop passing -fseh-exceptions for x86_64-windows-msvc
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 6 15:54:58 PDT 2018
smeenai created this revision.
smeenai added reviewers: compnerd, mstorsjo, rnk.
Herald added subscribers: JDevlieghere, aprantl.
-fseh-exceptions is only meaningful for MinGW targets, and that driver
already has logic to pass either -fdwarf-exceptiosn or -fseh-exceptions
as appropriate. -fseh-exceptions is just a no-op for MSVC triples, and
passing it to cc1 causes unnecessary confusion.
Repository:
rC Clang
https://reviews.llvm.org/D47850
Files:
lib/Driver/ToolChain.cpp
test/Driver/windows-exceptions.cpp
Index: test/Driver/windows-exceptions.cpp
===================================================================
--- /dev/null
+++ test/Driver/windows-exceptions.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang -target i686-windows-msvc -c %s -### 2>&1 | FileCheck -check-prefix=MSVC %s
+// 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
+
+MSVC-NOT: -fdwarf-exceptions
+MSVC-NOT: -fseh-exceptions
+MINGW-DWARF: -fdwarf-exceptions
+MINGW-SEH: -fseh-exceptions
Index: lib/Driver/ToolChain.cpp
===================================================================
--- lib/Driver/ToolChain.cpp
+++ lib/Driver/ToolChain.cpp
@@ -471,8 +471,6 @@
llvm::ExceptionHandling
ToolChain::GetExceptionModel(const llvm::opt::ArgList &Args) const {
- if (Triple.isOSWindows() && Triple.getArch() != llvm::Triple::x86)
- return llvm::ExceptionHandling::WinEH;
return llvm::ExceptionHandling::None;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47850.150212.patch
Type: text/x-patch
Size: 1118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180606/40bf9511/attachment.bin>
More information about the cfe-commits
mailing list