Commit Graph

7 Commits

Author SHA1 Message Date
Reid Kleckner b6776e0d07 [clang-cl] Make /EHs turn on C++ EH once again
C++ exceptions are still off by default, which is similar to how C++
cleanups are off by default in MSVC.

If you use clang instead of clang-cl, exceptions are also still off by
default. In the future, when C++ EH is proven to be stable, we may flip
the default for that driver to be consistent with other platforms.

llvm-svn: 249704
2015-10-08 17:29:07 +00:00
Yaron Keren b1db6e888b Erase REQUIRES: shell-preserves-root from more tests, see r242312.
llvm-svn: 242321
2015-07-15 19:42:18 +00:00
Reid Kleckner 5c6efed3f5 [clang-cl] Disable C++ exceptions a different way
Rather than making -fexceptions a core option that enables C++ EH in
clang-cl, users can use the '-Xclang -fexceptions -Xclang
-fcxx-exceptions' flag set. We weren't going to expose -fexceptions in
clang-cl in the long run, so this way we don't add and then remove a
flag.

llvm-svn: 242176
2015-07-14 18:16:48 +00:00
Reid Kleckner 0bb1fc410b Disable C++ EH by default for clang-cl and MSVC environments
We don't need any more bug reports from users telling us that MSVC-style
C++ exceptions are broken. Developers and adventurous users can still
test the existing functionality by passing along -fexceptions to either
clang or clang-cl.

llvm-svn: 241952
2015-07-10 22:25:44 +00:00
Reid Kleckner deeddeced3 Re-land r228258 and make clang-cl's /EHs- disable -fexceptions again
After r228258, Clang started emitting C++ EH IR that LLVM wasn't ready
to deal with, even when exceptions were disabled with /EHs-. This time,
make /EHs- turn off -fexceptions while still emitting exceptional
constructs in functions using __try.  Since Sema rejects C++ exception
handling constructs before CodeGen, landingpads should only appear in
such functions as the result of a __try.

llvm-svn: 228329
2015-02-05 18:56:03 +00:00
Reid Kleckner ab80f18f57 clang-cl: Enable -fexceptions but not -fcxx-exceptions by default
This enables proper IRgen of SEH constructs.

llvm-svn: 227528
2015-01-30 01:04:16 +00:00
Reid Kleckner c542d37995 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
2014-06-27 17:02:02 +00:00