1*67e74705SXin Li // We force the target to unknown because clang's default behavior for 2*67e74705SXin Li // exception handling is target dependent. 3*67e74705SXin Li // RUN: %clang -### -target unknown %s 2>&1 | FileCheck %s -check-prefix=DEFAULT 4*67e74705SXin Li // DEFAULT: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions" 5*67e74705SXin Li // 6*67e74705SXin Li // RUN: %clang -### -fexceptions %s 2>&1 | FileCheck %s -check-prefix=ON1 7*67e74705SXin Li // ON1: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions" 8*67e74705SXin Li // 9*67e74705SXin Li // RUN: %clang -### -fno-exceptions -fcxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=ON2 10*67e74705SXin Li // ON2: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions" 11*67e74705SXin Li // 12*67e74705SXin Li // RUN: %clang -### -fno-cxx-exceptions -fexceptions %s 2>&1 | FileCheck %s -check-prefix=ON3 13*67e74705SXin Li // ON3: "-cc1" {{.*}} "-fcxx-exceptions" "-fexceptions" 14*67e74705SXin Li // 15*67e74705SXin Li // RUN: %clang -### -fno-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF1 16*67e74705SXin Li // OFF1-NOT: "-cc1" {{.*}} "-fcxx-exceptions" 17*67e74705SXin Li // 18*67e74705SXin Li // RUN: %clang -### -fno-cxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF2 19*67e74705SXin Li // OFF2-NOT: "-cc1" {{.*}} "-fcxx-exceptions" 20*67e74705SXin Li // 21*67e74705SXin Li // RUN: %clang -### -fcxx-exceptions -fno-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF3 22*67e74705SXin Li // OFF3-NOT: "-cc1" {{.*}} "-fcxx-exceptions" 23*67e74705SXin Li // 24*67e74705SXin Li // RUN: %clang -### -fexceptions -fno-cxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF4 25*67e74705SXin Li // OFF4-NOT: "-cc1" {{.*}} "-fcxx-exceptions" 26*67e74705SXin Li // 27*67e74705SXin Li // RUN: %clang -### -target x86_64-scei-ps4 %s 2>&1 | FileCheck %s -check-prefix=PS4-OFF 28*67e74705SXin Li // PS4-OFF-NOT: "-cc1" {{.*}} "-f{{(cxx-)?}}exceptions" 29