From: Daniel Dunbar Date: Wed, 18 Mar 2009 06:20:32 +0000 (+0000) Subject: Driver: Make Arg::Claimed mutable. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=456422c7eccee0e74893eb52b7fcd9171b6ea079;p=clang Driver: Make Arg::Claimed mutable. - 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 --- diff --git a/include/clang/Driver/Arg.h b/include/clang/Driver/Arg.h index a8c9bd2097..6d4cea81e3 100644 --- a/include/clang/Driver/Arg.h +++ b/include/clang/Driver/Arg.h @@ -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;