[PATCH] D14471: [AArch64] Fix a crash in driver

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 10 11:34:48 PST 2015


ahatanak added a comment.

I think I understand some of your concerns, but I'm not sure I fully understand what you are suggesting.

I think I can use macro __aarch64__ to have getAArch64TargetCPU return "native" when the compiler is not run on an AArch64 platform, but it doesn't sound like that was what you had in mind?

if (CPU == "native")
#ifdef __aarch64__

  return llvm::sys::getHostCPUName();

#else

  return "native"; // or "return CPU"

#endif

This requires fewer changes than the patch I proposed and it will print "native" in the error message, which is what I am looking for.


http://reviews.llvm.org/D14471





More information about the cfe-commits mailing list