[FileCheck] Store line numbers as optional values
authorThomas Preud'homme <thomasp@graphcore.ai>
Mon, 15 Jul 2019 19:04:56 +0000 (19:04 +0000)
committerThomas Preud'homme <thomasp@graphcore.ai>
Mon, 15 Jul 2019 19:04:56 +0000 (19:04 +0000)
commit99f2a108707ebf015571101b113fc03b30ad79b9
treeb20ad4a7b50fb54212f52b90db32e869304579ba
parent42e90ed7717e09a1e0fb21027e8346707b60c896
[FileCheck] Store line numbers as optional values

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.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya

Tags: #llvm

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

llvm-svn: 366109
llvm/include/llvm/Support/FileCheck.h
llvm/lib/Support/FileCheck.cpp
llvm/unittests/Support/FileCheckTest.cpp