================
@@ -318,8 +319,67 @@ 
getExplicitAndImplicitNVPTXTargetFeatures(clang::DiagnosticsEngine &diags,
   return llvm::join(featuresVec, ",");
 }
 
+enum ppcCPU { prePwr8, prePwr10 };
+static std::optional<ppcCPU> ppcType(std::string &cpu) {
+  return llvm::StringSwitch<std::optional<ppcCPU>>(cpu)
+      .Case("future", std::nullopt)
+      .Case("pwr11", std::nullopt)
+      .Case("pwr10", std::nullopt)
+      .Case("pwr9", prePwr10)
+      .Case("pwr8", prePwr10)
+      .Default(prePwr8);
+}
+
+static std::string
+getExplicitAndImplicitPPCTargetFeatures(clang::DiagnosticsEngine &diags,
+                                        TargetOptions &targetOpts,
----------------
jeanPerier wrote:

I find it really tricky that this version is modifying the targetOpts while the 
other similar versions for AMD and NVPTX are not.

Why is this required for PPC and not the other platform with implicit target 
features?

https://github.com/llvm/llvm-project/pull/169860
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to