nickdesaulniers accepted this revision.
nickdesaulniers added a comment.
This revision is now accepted and ready to land.

Thanks for the patch!



================
Comment at: clang/lib/Driver/ToolChains/Arch/PPC.cpp:37
 
-/// getPPCTargetCPU - Get the (LLVM) name of the PowerPC cpu we are targeting.
-std::string ppc::getPPCTargetCPU(const ArgList &Args, const llvm::Triple &T) {
-  if (Arg *A = Args.getLastArg(clang::driver::options::OPT_mcpu_EQ)) {
-    StringRef CPUName = A->getValue();
-
-    // Clang/LLVM does not actually support code generation
-    // for the 405 CPU. However, there are uses of this CPU ID
-    // in projects that previously used GCC and rely on Clang
-    // accepting it. Clang has always ignored it and passed the
-    // generic CPU ID to the back end.
-    if (CPUName == "generic" || CPUName == "405")
+static std::string getLLVMPPCCpuName(StringRef CPUName, const llvm::Triple &T) 
{
+  // Clang/LLVM does not actually support code generation
----------------
The casing of the function name is a bit awkward, consider something perhaps 
more concise like `normalizeCPUName` and retaining the comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144967

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to