[cfe-dev] How to know the relative orders of the options passed to Clang driver

Dmitri Gribenko gribozavr at gmail.com
Wed Oct 31 06:44:36 PDT 2012


On Wed, Oct 31, 2012 at 1:25 PM, Mahesha HS <mahesha.llvm at gmail.com> wrote:
> Is there any straightforward mechanism to know the relative orders of
> the options passed to Clang driver?  "ArgList"  implements an ordered
> collection of driver arguments. Is there any functionality within this
> class to get the relative orders of the options passed by the user?

Please take a look at hasFlag().  For example:

>  Opts.ConstStrings = Args.hasFlag(OPT_fconst_strings, OPT_fno_const_strings,
>                                   Opts.ConstStrings);

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-dev mailing list