mirror of https://github.com/microsoft/clang.git
[Driver] Stop passing -fseh-exceptions for x86_64-windows-msvc
-fseh-exceptions is only meaningful for MinGW targets, and that driver already has logic to pass either -fdwarf-exceptions or -fseh-exceptions as appropriate. -fseh-exceptions is just a no-op for MSVC triples, and passing it to cc1 causes unnecessary confusion. Differential Revision: https://reviews.llvm.org/D47850 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1fb1450822
commit
f7a73f32af
|
@ -471,8 +471,6 @@ ObjCRuntime ToolChain::getDefaultObjCRuntime(bool isNonFragile) const {
|
||||||
|
|
||||||
llvm::ExceptionHandling
|
llvm::ExceptionHandling
|
||||||
ToolChain::GetExceptionModel(const llvm::opt::ArgList &Args) const {
|
ToolChain::GetExceptionModel(const llvm::opt::ArgList &Args) const {
|
||||||
if (Triple.isOSWindows() && Triple.getArch() != llvm::Triple::x86)
|
|
||||||
return llvm::ExceptionHandling::WinEH;
|
|
||||||
return llvm::ExceptionHandling::None;
|
return llvm::ExceptionHandling::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue