efriedma added inline comments.

================
Comment at: lib/Basic/Targets/ARM.cpp:345
   // get default FPU features
+  llvm::ARM::ArchKind Arch = llvm::ARM::parseArch(getTriple().getArchName());
   unsigned FPUKind = llvm::ARM::getDefaultFPU(CPU, Arch);
----------------
fhahn wrote:
> Is there a reason we re-compute the Arch from the triple here, but use the 
> member variable ArchKind above? Shouldn't they both be the same ?
ArchKind is based on the triple and the CPU, where "Arch" is just based on the 
triple, so "Arch" was returning the wrong thing in some cases.

Actually, looking a bit more, we should probably be calling parseCPUArch here 
to get the right behavior, rather than depending on the member.  (It doesn't 
usually matter, but it could make a difference for code using "target" 
attribute, I guess.  That feature needs a lot more work, though.)


Repository:
  rC Clang

https://reviews.llvm.org/D45240



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

Reply via email to