]> granicus.if.org Git - clang/commitdiff
CodeGen: make a check stricter
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 17 Nov 2014 22:11:07 +0000 (22:11 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 17 Nov 2014 22:11:07 +0000 (22:11 +0000)
When targeting Windows itanium (a MSVC environment), use itanium style
exceptions rather than SEH.  Existing test cases already test this code path.
Applying this change ensures that tests wont break due to a parallel change in
LLVM (to correctly report isMSVCEnvironment).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222179 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGException.cpp

index 2e8f1ed976f90506f8df0c6f42bd6aee146500fa..b147b436bfb336382c78a760993b77591d031c5a 100644 (file)
@@ -425,7 +425,7 @@ llvm::Value *CodeGenFunction::getSelectorFromSlot() {
 
 void CodeGenFunction::EmitCXXThrowExpr(const CXXThrowExpr *E,
                                        bool KeepInsertionPoint) {
-  if (CGM.getTarget().getTriple().isWindowsMSVCEnvironment()) {
+  if (CGM.getTarget().getTriple().isKnownWindowsMSVCEnvironment()) {
     ErrorUnsupported(E, "throw expression");
     return;
   }
@@ -597,7 +597,7 @@ void CodeGenFunction::EmitEndEHSpec(const Decl *D) {
 }
 
 void CodeGenFunction::EmitCXXTryStmt(const CXXTryStmt &S) {
-  if (CGM.getTarget().getTriple().isWindowsMSVCEnvironment()) {
+  if (CGM.getTarget().getTriple().isKnownWindowsMSVCEnvironment()) {
     ErrorUnsupported(&S, "try statement");
     return;
   }