]> granicus.if.org Git - clang/commitdiff
Driver: Make Arg::Claimed mutable.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 18 Mar 2009 06:20:32 +0000 (06:20 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 18 Mar 2009 06:20:32 +0000 (06:20 +0000)
 - This is unfortunate but necessary to retain any utility for const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67173 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Arg.h

index a8c9bd209765fce9b840780ba84042086f55d8b7..6d4cea81e39a5e92bb64bbba4c825b581ebd3b86 100644 (file)
@@ -57,7 +57,7 @@ namespace driver {
     /// 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 @@ namespace driver {
     
     // 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;