[cfe-commits] r67173 - /cfe/trunk/include/clang/Driver/Arg.h

Daniel Dunbar daniel at zuster.org
Tue Mar 17 23:20:33 PDT 2009


Author: ddunbar
Date: Wed Mar 18 01:20:32 2009
New Revision: 67173

URL: http://llvm.org/viewvc/llvm-project?rev=67173&view=rev
Log:
Driver: Make Arg::Claimed mutable. 
 - This is unfortunate but necessary to retain any utility for const.

Modified:
    cfe/trunk/include/clang/Driver/Arg.h

Modified: cfe/trunk/include/clang/Driver/Arg.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Arg.h?rev=67173&r1=67172&r2=67173&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/Arg.h (original)
+++ cfe/trunk/include/clang/Driver/Arg.h Wed Mar 18 01:20:32 2009
@@ -57,7 +57,7 @@
     /// Flag indicating whether this argument was used to effect
     /// compilation; used for generating "argument unused"
     /// diagnostics.
-    bool Claimed;
+    mutable bool Claimed;
 
   protected:
     Arg(ArgClass Kind, const Option *Opt, unsigned Index);
@@ -78,7 +78,7 @@
     
     // FIXME: We need to deal with derived arguments and set the bit
     // in the original argument; not the derived one.
-    void claim() { Claimed = true; }
+    void claim() const { Claimed = true; }
 
     virtual unsigned getNumValues() const = 0;
     virtual const char *getValue(const ArgList &Args, unsigned N=0) const = 0;





More information about the cfe-commits mailing list