[PATCH] D65707: [FileCheck] Document FILECHECK_OPTS in -help
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 13:57:18 PDT 2019
jdenny marked 2 inline comments as done.
jdenny added inline comments.
================
Comment at: llvm/utils/FileCheck/FileCheck.cpp:27-29
+static cl::extrahelp FileCheckOptsEnv(
+ "\nOptions are parsed from the environment variable FILECHECK_OPTS and\n"
+ "from the command line.\n");
----------------
thopre wrote:
> jdenny wrote:
> > thopre wrote:
> > > Do I read this right and the options in effect are the union of those specified in FILECHECK_OPTS and those on the command-line?
> > Yes.
> >
> > Interestingly, `FILECHECK_OPTS` is parsed before command-line options. However, at the time I implemented `FILECHECK_OPTS`, the only option I found where the order of multiple occurrences mattered was `-D`, and it gives precedence to earlier occurrences. That's surely wrong, and I think multiple definitions for the same variable should be an error instead, but I haven't found time to propose something.
> Alright, LGTM then. I'm not sure about forbidding multiple definitions of the same variable, I think it makes sense to redefine a variable in a CHECK directive (eg. lots of tests with REG being defined, although --enable-var-scope should probably be used in that case). It makes less sense on the command-line for sure and I would agree making it an error.
I just meant on the command line. Thanks for the review!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65707/new/
https://reviews.llvm.org/D65707
More information about the llvm-commits
mailing list