vsk added inline comments.

================
Comment at: lib/Driver/Tools.cpp:1163
@@ -1162,3 +1162,3 @@
   // FIXME: Should this be picked by checking the target triple instead?
-  if (Args.getLastArg(options::OPT_arch))
+  if ((A = Args.getLastArg(options::OPT_arch)))
     return "cyclone";
----------------
ahatanak wrote:
> vsk wrote:
> > vsk wrote:
> > > ahatanak wrote:
> > > > Is there a test case for this change? I don't think this was needed to 
> > > > pass the tests you added?
> > > Good point, I'll work up a test case.
> > Actually, none of the callers of `getAArch64TargetCPU' fail when 
> > CPU="cyclone" (afaict).
> > 
> > Do you have a suggestion for how I can test this? I made the change here to 
> > make the function's contract more consistent, but can leave it out if you 
> > object.
> I couldn't find a test case for this either.
> 
> I think we should leave it out if the contract of the function is to get the 
> string passed by either -mtune or -mcpu in "A", but we can leave it in if 
> it's supposed to get one of the strings passed by -mtune, -mcpu, or -arch.
All right, IMO it makes more sense to leave out -arch. I'll omit this change 
and update the doxygen for the function.


https://reviews.llvm.org/D23643



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

Reply via email to