[PowerPC] Do not special case Darwin on PowerPC in target cpu handling

Summary: This patch removes the special handling for Darwin on PowerPC in the default target cpu handling, because Darwin is no longer supported on the PowerPC platform.

Reviewers: hubert.reinterpretcast, daltenty

Reviewed By: hubert.reinterpretcast

Subscribers: wuzish, nemanjai, shchenz, steven.zhang, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81115
This commit is contained in:
stevewan 2020-06-05 19:54:00 -04:00 committed by Steven Wan
parent 32c09d527c
commit 61cd264068
1 changed files with 13 additions and 13 deletions

View File

@ -294,19 +294,19 @@ std::string tools::getCPUName(const ArgList &Args, const llvm::Triple &T,
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;
}