From deeddeced312a21b8454336cfab9fe2b58863cf8 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 5 Feb 2015 18:56:03 +0000 Subject: 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 --- clang/test/CodeGen/exceptions-seh-finally.c | 2 +- clang/test/CodeGen/exceptions-seh-leave.c | 2 +- clang/test/CodeGen/exceptions-seh.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/test/CodeGen') diff --git a/clang/test/CodeGen/exceptions-seh-finally.c b/clang/test/CodeGen/exceptions-seh-finally.c index 722fc377495..4cd82d0972e 100644 --- a/clang/test/CodeGen/exceptions-seh-finally.c +++ b/clang/test/CodeGen/exceptions-seh-finally.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fexceptions -fms-extensions -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s void abort(void) __attribute__((noreturn)); void might_crash(void); diff --git a/clang/test/CodeGen/exceptions-seh-leave.c b/clang/test/CodeGen/exceptions-seh-leave.c index 86161f297e4..2033c87105f 100644 --- a/clang/test/CodeGen/exceptions-seh-leave.c +++ b/clang/test/CodeGen/exceptions-seh-leave.c @@ -1,4 +1,4 @@ -// RUN: not %clang_cc1 -triple x86_64-pc-win32 -fexceptions -fms-extensions -emit-llvm -o - %s 2>&1 | FileCheck %s +// RUN: not %clang_cc1 -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - %s 2>&1 | FileCheck %s // This is a codegen test because we only emit the diagnostic when we start // generating code. diff --git a/clang/test/CodeGen/exceptions-seh.c b/clang/test/CodeGen/exceptions-seh.c index fcd90b99132..98b9de5d59d 100644 --- a/clang/test/CodeGen/exceptions-seh.c +++ b/clang/test/CodeGen/exceptions-seh.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fexceptions -fms-extensions -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s // FIXME: Perform this outlining automatically CodeGen. void try_body(int numerator, int denominator, int *myres) { -- cgit v1.2.3