]> granicus.if.org Git - clang/commit
clang-cl: Map /EHs- to -fno-exceptions
authorReid Kleckner <reid@kleckner.net>
Fri, 27 Jun 2014 17:02:02 +0000 (17:02 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 27 Jun 2014 17:02:02 +0000 (17:02 +0000)
commitba02d7e2a8adb18f8b4ca6e486a68105a31c52ca
treeee30c116af0de60de3b6871ab2c24ab5e54ea56a
parenta7effd2e25558b216d02389d3ee655173ffcea6e
clang-cl: Map /EHs- to -fno-exceptions

This isn't 100% compatible with MSVC, but it's close enough.  MSVC's /EH
flag doesn't really control exceptions so much as how to clean up after
an exception is thrown.  The upshot is that cl.exe /EHs- will compile
try, throw, and catch statements with a warning, but clang-cl will
reject such constructs with a hard error.  We can't compile such EH
constructs anyway, but this may matter to consumers of the AST.

Reviewers: hans

Differential Revision: http://reviews.llvm.org/D4317

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211909 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/CLCompatOptions.td
lib/Driver/Tools.cpp
test/Driver/cl-eh.cpp [new file with mode: 0644]
test/Driver/cl-fallback.c