[PATCH] D70779: AArch64: add support for newer Apple CPUs

Kristof Beyls via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 28 01:42:43 PST 2019


kristof.beyls 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");
----------------
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


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

https://reviews.llvm.org/D70779





More information about the cfe-commits mailing list