[PATCH] D70779: AArch64: add support for newer Apple CPUs
Florian Hahn via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 28 01:54:38 PST 2019
fhahn added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:143
MtuneLowerCase = llvm::sys::getHostCPUName();
- if (MtuneLowerCase == "cyclone") {
+ if (MtuneLowerCase == "cyclone" || MtuneLowerCase.find("apple") == 0) {
Features.push_back("+zcm");
----------------
kristof.beyls wrote:
> t.p.northover wrote:
> > fhahn wrote:
> > > It might be slightly more obvious to use MtuneLowerCAse.StartsWith("apple")
> > I'd have preferred to, but unfortnately it's a `std::string` so doesn't have that function.
> At least not until C++20... https://en.cppreference.com/w/cpp/string/basic_string/starts_with
> I'd have preferred to, but unfortnately it's a std::string so doesn't have that function.
Ah yes, that's unfortunate. I somehow assumed it being a StringRef without expanding the context....
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70779/new/
https://reviews.llvm.org/D70779
More information about the cfe-commits
mailing list