[clang] 8854d12 - [PS5] Disable exceptions by default

Paul Robinson via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 07:16:24 PDT 2022


Author: Paul Robinson
Date: 2022-04-28T07:16:16-07:00
New Revision: 8854d1244c905b20dd62db3a7430043477e1ad3b

URL: https://github.com/llvm/llvm-project/commit/8854d1244c905b20dd62db3a7430043477e1ad3b
DIFF: https://github.com/llvm/llvm-project/commit/8854d1244c905b20dd62db3a7430043477e1ad3b.diff

LOG: [PS5] Disable exceptions by default

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/Clang.cpp
    clang/test/Driver/clang-exception-flags.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 01380f9e1985..1f083de405f0 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 a5faed228e05..af63a0ab03be 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"


        


More information about the cfe-commits mailing list