[PATCH] add the -mrecip driver flag and process its options

Sanjay Patel spatel at rotateright.com
Fri May 15 08:02:38 PDT 2015


================
Comment at: lib/Driver/Tools.cpp:1662
@@ +1661,3 @@
+    // Ignore the '-' or optional '+' in string comparison.
+    bool IsNegative = (Val[0] == '-');
+    if (IsNegative)
----------------
hfinkel wrote:
> spatel wrote:
> > hfinkel wrote:
> > > Why can these be negative?
> > 'IsNegative' may just be a poor name choice. I followed the lead of similar code in this file and copied that name. 
> > 
> > The '-' prefix on an option means "disable this type of reciprocal".
> > 
> > Please let me know if I've misunderstood your question.
> You did not misunderstand, but I agree, the naming is poor. Let's not replicate it. How about naming it IsDisabled?
> 
Yep - that's better. Will fix.

http://reviews.llvm.org/D8989

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list