diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 01380f9e1985aa..1f083de405f0af 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -459,9 +459,9 @@ static bool addExceptionArgs(const ArgList &Args, types::ID InputType, } if (types::isCXX(InputType)) { - // Disable C++ EH by default on XCore and PS4. + // Disable C++ EH by default on XCore and PS4/PS5. bool CXXExceptionsEnabled = - Triple.getArch() != llvm::Triple::xcore && !Triple.isPS4(); + Triple.getArch() != llvm::Triple::xcore && !Triple.isPS(); Arg *ExceptionArg = Args.getLastArg( options::OPT_fcxx_exceptions, options::OPT_fno_cxx_exceptions, options::OPT_fexceptions, options::OPT_fno_exceptions); diff --git a/clang/test/Driver/clang-exception-flags.cpp b/clang/test/Driver/clang-exception-flags.cpp index a5faed228e0545..af63a0ab03be21 100644 --- a/clang/test/Driver/clang-exception-flags.cpp +++ b/clang/test/Driver/clang-exception-flags.cpp @@ -24,5 +24,6 @@ // RUN: %clang -### -fexceptions -fno-cxx-exceptions %s 2>&1 | FileCheck %s -check-prefix=OFF4 // OFF4-NOT: "-cc1" {{.*}} "-fcxx-exceptions" // -// RUN: %clang -### -target x86_64-scei-ps4 %s 2>&1 | FileCheck %s -check-prefix=PS4-OFF -// PS4-OFF-NOT: "-cc1" {{.*}} "-f{{(cxx-)?}}exceptions" +// RUN: %clang -### -target x86_64-scei-ps4 %s 2>&1 | FileCheck %s -check-prefix=PS-OFF +// RUN: %clang -### -target x86_64-sie-ps5 %s 2>&1 | FileCheck %s -check-prefix=PS-OFF +// PS-OFF-NOT: "-cc1" {{.*}} "-f{{(cxx-)?}}exceptions"