Author: rnk Date: Thu Oct 8 12:29:07 2015 New Revision: 249704 URL: http://llvm.org/viewvc/llvm-project?rev=249704&view=rev Log: [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. Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/cl-eh.cpp Modified: cfe/trunk/lib/Driver/Tools.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=249704&r1=249703&r2=249704&view=diff ============================================================================== --- cfe/trunk/lib/Driver/Tools.cpp (original) +++ cfe/trunk/lib/Driver/Tools.cpp Thu Oct 8 12:29:07 2015 @@ -5392,10 +5392,6 @@ static EHFlags parseClangCLEHFlags(const } } - // FIXME: Disable C++ EH completely, until it becomes more reliable. Users - // can use -Xclang to manually enable C++ EH until then. - EH = EHFlags(); - return EH; } Modified: cfe/trunk/test/Driver/cl-eh.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-eh.cpp?rev=249704&r1=249703&r2=249704&view=diff ============================================================================== --- cfe/trunk/test/Driver/cl-eh.cpp (original) +++ cfe/trunk/test/Driver/cl-eh.cpp Thu Oct 8 12:29:07 2015 @@ -1,11 +1,9 @@ // Note: %s must be preceded by --, otherwise it may be interpreted as a // command-line option, e.g. on Mac where %s is commonly under /Users. -// FIXME: When C++ EH works, we can make this flag turn things back on. - // RUN: %clang_cl /c /EHsc -### -- %s 2>&1 | FileCheck -check-prefix=EHsc %s -// EHsc-NOT: "-fcxx-exceptions" -// EHsc-NOT: "-fexceptions" +// EHsc: "-fcxx-exceptions" +// EHsc: "-fexceptions" // RUN: %clang_cl /c /EHs-c- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_c_ %s // EHs_c_-NOT: "-fcxx-exceptions" @@ -16,12 +14,12 @@ // EHs_EHc_-NOT: "-fexceptions" // RUN: %clang_cl /c /EHs- /EHs -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHs %s -// EHs_EHs-NOT: "-fcxx-exceptions" -// EHs_EHs-NOT: "-fexceptions" +// EHs_EHs: "-fcxx-exceptions" +// EHs_EHs: "-fexceptions" // RUN: %clang_cl /c /EHs- /EHsa -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHa %s -// EHs_EHa-NOT: "-fcxx-exceptions" -// EHs_EHa-NOT: "-fexceptions" +// EHs_EHa: "-fcxx-exceptions" +// EHs_EHa: "-fexceptions" // RUN: %clang_cl /c /EHinvalid -### -- %s 2>&1 | FileCheck -check-prefix=EHinvalid %s // EHinvalid: error: invalid value 'invalid' in '/EH' _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits