HomePhabricator

Recommit: Detect incorrect FileCheck variable CLI definition

Authored by thopre on Feb 5 2019, 6:17 AM.

Description

Recommit: Detect incorrect FileCheck variable CLI definition

Summary:
While the backend code of FileCheck relies on definition of variable
from the command-line to have an equal sign '=' and a variable name
before that, the frontend does not actually enforce it. This leads to
FileCheck crashing when invoked with invalid syntax for the -D option.

This patch adds the missing validation in the frontend. It also makes
the -D option an AlwaysPrefix option to be able to detect -D=FOO as
being a define without variable and -D as missing its value.

Copyright:

  • Linaro (changes in version 2 of revision D55940)
  • GraphCore (changes in later versions)

Reviewers: jdenny

Subscribers: JonChesterfield, hiraditya, kristina, probinson,
llvm-commits

Differential Revision: https://reviews.llvm.org/D55940

llvm-svn: 353173

Details

Committed
thopreFeb 5 2019, 6:17 AM
Differential Revision
D55940: Detect incorrect FileCheck variable CLI definition
Parents
rGf929a0f81b6f: Recommit: Add support for prefix-only CLI options
Branches
Unknown
Tags
Unknown