summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-10-08 17:29:07 +0000
committerReid Kleckner <rnk@google.com>2015-10-08 17:29:07 +0000
commitb6776e0d0707c0ff3ef89ee9d1783d569a79870a (patch)
treefa8a88108874e3e269ae09524b7be29ac0e33caf
parentad60be9bdc88914e2232e10df99e245ff97ab7a3 (diff)
downloadbcm5719-llvm-b6776e0d0707c0ff3ef89ee9d1783d569a79870a.tar.gz
bcm5719-llvm-b6776e0d0707c0ff3ef89ee9d1783d569a79870a.zip
[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
-rw-r--r--clang/lib/Driver/Tools.cpp4
-rw-r--r--clang/test/Driver/cl-eh.cpp14
2 files changed, 6 insertions, 12 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 0738f1384a5..f4aac07c130 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -5392,10 +5392,6 @@ static EHFlags parseClangCLEHFlags(const Driver &D, const ArgList &Args) {
}
}
- // 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;
}
diff --git a/clang/test/Driver/cl-eh.cpp b/clang/test/Driver/cl-eh.cpp
index 352c6f1543c..1745616ea9b 100644
--- a/clang/test/Driver/cl-eh.cpp
+++ b/clang/test/Driver/cl-eh.cpp
@@ -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'
OpenPOWER on IntegriCloud