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)
commitc542d379958d1e44744aa9474f79c6732264121d
tree4c36fa226ce237afbb60828ae990a548b435f382
parent4632e1eec1f2e5225a8ba37fe05d57e74c4a8001
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

llvm-svn: 211909
clang/include/clang/Driver/CLCompatOptions.td
clang/lib/Driver/Tools.cpp
clang/test/Driver/cl-eh.cpp [new file with mode: 0644]
clang/test/Driver/cl-fallback.c