From: Saleem Abdulrasool Date: Mon, 17 Nov 2014 22:11:07 +0000 (+0000) Subject: CodeGen: make a check stricter X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39e69447760154d579e94f708cd327583e281114;p=clang CodeGen: make a check stricter 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 --- diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index 2e8f1ed976..b147b436bf 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp @@ -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; }