aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-01-30 01:04:16 +0000
committerReid Kleckner <reid@kleckner.net>2015-01-30 01:04:16 +0000
commitab80f18f5799785f2abbf3839bde9f76b50fd64c (patch)
tree3abe9b515a8c207bc6d5928cc0dc854b61d0601e /clang/lib/Driver/Tools.cpp
parent8b3334d9092b11ba54e4f4d075740ae3234330d8 (diff)
downloadllvm-ab80f18f5799785f2abbf3839bde9f76b50fd64c.zip
llvm-ab80f18f5799785f2abbf3839bde9f76b50fd64c.tar.gz
llvm-ab80f18f5799785f2abbf3839bde9f76b50fd64c.tar.bz2
clang-cl: Enable -fexceptions but not -fcxx-exceptions by default
This enables proper IRgen of SEH constructs. llvm-svn: 227528
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 91cf841..84c3228 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -4820,10 +4820,10 @@ void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs) const {
const Driver &D = getToolChain().getDriver();
EHFlags EH = parseClangCLEHFlags(D, Args);
// FIXME: Do something with NoExceptC.
- if (EH.Synch || EH.Asynch) {
- CmdArgs.push_back("-fexceptions");
+ if (EH.Synch || EH.Asynch)
CmdArgs.push_back("-fcxx-exceptions");
- }
+ // Always add -fexceptions to allow SEH __try.
+ CmdArgs.push_back("-fexceptions");
// /EP should expand to -E -P.
if (Args.hasArg(options::OPT__SLASH_EP)) {