This is an archive of the discontinued LLVM Phabricator instance.

[FileCheck] Store line numbers as optional values
ClosedPublic

Authored by thopre on Jul 12 2019, 7:59 AM.

Details

Summary

Processing of command-line definition of variable and logic around
implicit not directives both reuse parsing code that expects a line
number to be defined. So far, a special line number of 0 was used for
those users of the parsing code where a line number does not make sense.
This commit instead represents line numbers as Optional values so that
they can be None for those cases.

Diff Detail

Repository
rL LLVM

Event Timeline

thopre created this revision.Jul 12 2019, 7:59 AM

Looks good, aside from one question.

llvm/lib/Support/FileCheck.cpp
186 ↗(On Diff #209487)

Is the IsPseudo field here redundant now? Are there pseudo variables with a defined line number?

thopre updated this revision to Diff 209813.Jul 15 2019, 5:47 AM
thopre marked 2 inline comments as done.

Address review comment

llvm/lib/Support/FileCheck.cpp
186 ↗(On Diff #209487)

No indeed and even if there as it's irrelevant. What matters is whether the Definition line number is same the current line.

This revision is now accepted and ready to land.Jul 15 2019, 5:56 AM
This revision was automatically updated to reflect the committed changes.