================
@@ -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,
----------------
kkwli wrote:
We want to get the list from `llvm::PPC::getPPCDefaultTargetFeatures` for PPC.
On other platforms, it relies on the list obtained from the
`createTargetMachine` call.
https://github.com/llvm/llvm-project/pull/169860
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits