blob: a5faed228e0545ec96adff94808868f234e2fd46 [file] [log] [blame]
Filipe Cabecinhas566e5842015-02-05 19:48:48 +00001// We force the target to unknown because clang's default behavior for
2// exception handling is target dependent.
3// RUN: %clang -### -target unknown %s 2>&1 | FileCheck %s -check-prefix=DEFAULT
Chandler Carruth306f98c2011-02-28 07:38:09 +00004// DEFAULT: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions"
5//
6// RUN: %clang -### -fexceptions %s 2>&1 | FileCheck %s -check-prefix=ON1
7// ON1: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions"
8//
9// RUN: %clang -### -fno-exceptions -fcxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=ON2
10// ON2: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions"
11//
12// RUN: %clang -### -fno-cxx-exceptions -fexceptions %s 2>&1 | FileCheck %s -check-prefix=ON3
13// ON3: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions"
14//
15// RUN: %clang -### -fno-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF1
16// OFF1-NOT: "-cc1" {{.*}} "-fcxx-exceptions"
17//
18// RUN: %clang -### -fno-cxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF2
19// OFF2-NOT: "-cc1" {{.*}} "-fcxx-exceptions"
20//
21// RUN: %clang -### -fcxx-exceptions -fno-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF3
22// OFF3-NOT: "-cc1" {{.*}} "-fcxx-exceptions"
23//
24// RUN: %clang -### -fexceptions -fno-cxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF4
25// OFF4-NOT: "-cc1" {{.*}} "-fcxx-exceptions"
Andrea Di Biagiob4f5d5c2015-02-06 13:02:39 +000026//
27// RUN: %clang -### -target x86_64-scei-ps4 %s 2>&1 | FileCheck %s -check-prefix=PS4-OFF
28// PS4-OFF-NOT: "-cc1" {{.*}} "-f{{(cxx-)?}}exceptions"