This revision was automatically updated to reflect the committed changes.
Closed by commit rG61cd264068ee: [PowerPC] Do not special case Darwin on 
PowerPC in target cpu handling (authored by stevewan).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81115/new/

https://reviews.llvm.org/D81115

Files:
  clang/lib/Driver/ToolChains/CommonArgs.cpp


Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -294,19 +294,19 @@
     std::string TargetCPUName = ppc::getPPCTargetCPU(Args);
     // LLVM may default to generating code for the native CPU,
     // but, like gcc, we default to a more generic option for
-    // each architecture. (except on AIX or Darwin)
-    if (TargetCPUName.empty()) {
-      if (T.isOSAIX())
-        TargetCPUName = "pwr4";
-      else if (!T.isOSDarwin()) {
-        if (T.getArch() == llvm::Triple::ppc64)
-          TargetCPUName = "ppc64";
-        else if (T.getArch() == llvm::Triple::ppc64le)
-          TargetCPUName = "ppc64le";
-        else
-          TargetCPUName = "ppc";
-      }
-    }
+    // each architecture. (except on AIX)
+    if (!TargetCPUName.empty())
+      return TargetCPUName;
+
+    if (T.isOSAIX())
+      TargetCPUName = "pwr4";
+    else if (T.getArch() == llvm::Triple::ppc64le)
+      TargetCPUName = "ppc64le";
+    else if (T.getArch() == llvm::Triple::ppc64)
+      TargetCPUName = "ppc64";
+    else
+      TargetCPUName = "ppc";
+
     return TargetCPUName;
   }
 


Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -294,19 +294,19 @@
     std::string TargetCPUName = ppc::getPPCTargetCPU(Args);
     // LLVM may default to generating code for the native CPU,
     // but, like gcc, we default to a more generic option for
-    // each architecture. (except on AIX or Darwin)
-    if (TargetCPUName.empty()) {
-      if (T.isOSAIX())
-        TargetCPUName = "pwr4";
-      else if (!T.isOSDarwin()) {
-        if (T.getArch() == llvm::Triple::ppc64)
-          TargetCPUName = "ppc64";
-        else if (T.getArch() == llvm::Triple::ppc64le)
-          TargetCPUName = "ppc64le";
-        else
-          TargetCPUName = "ppc";
-      }
-    }
+    // each architecture. (except on AIX)
+    if (!TargetCPUName.empty())
+      return TargetCPUName;
+
+    if (T.isOSAIX())
+      TargetCPUName = "pwr4";
+    else if (T.getArch() == llvm::Triple::ppc64le)
+      TargetCPUName = "ppc64le";
+    else if (T.getArch() == llvm::Triple::ppc64)
+      TargetCPUName = "ppc64";
+    else
+      TargetCPUName = "ppc";
+
     return TargetCPUName;
   }
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to