[PATCH] D60382: FileCheck [2/12]: Stricter parsing of -D option

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 07:44:20 PDT 2019


thopre added a comment.

In D60382#1464197 <https://reviews.llvm.org/D60382#1464197>, @probinson wrote:

> Wouldn't it be preferable to put the command-line option validation in the driver, rather than here?
>  The division of responsibilities between the driver and the library is really not clear-cut; normally I'd expect the driver to do option parsing/validation and the library to simply accept the list.  (I understand that FileCheck currently isn't always organized that way, but it's something I'd like to see happen.)


If the library was only used by the FileCheck executable I would agree but since it is used as a library by some of the tests I believe it makes sense to test here. Some of the code could go away if the library was receiving global defines as a vector of pair of StringRef but the validation of variable name would still be necessary IMO.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60382/new/

https://reviews.llvm.org/D60382





More information about the llvm-commits mailing list