[FileCheck] Introduce substitution subclasses
authorThomas Preud'homme <thomasp@graphcore.ai>
Thu, 23 May 2019 00:10:29 +0000 (00:10 +0000)
committerThomas Preud'homme <thomasp@graphcore.ai>
Thu, 23 May 2019 00:10:29 +0000 (00:10 +0000)
commitf3b9bb3d69eb5468ac1c02b748f53da6328a7089
tree2f0f9616892b6d73076e4a7fb238756f354bfbfa
parent1a944d27b2b7fdd81106ac8e1ade2b6f5a8477dc
[FileCheck] Introduce substitution subclasses

Summary:
With now a clear distinction between string and numeric substitutions,
this patch introduces separate classes to represent them with a parent
class implementing the common interface. Diagnostics in
printSubstitutions() are also adapted to not require knowing which
substitution is being looked at since it does not hinder clarity and
makes the implementation simpler.

Reviewers: jhenderson, jdenny, probinson, arichardson

Subscribers: llvm-commits, probinson, arichardson, hiraditya

Tags: #llvm

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

llvm-svn: 361446
llvm/include/llvm/Support/FileCheck.h
llvm/lib/Support/FileCheck.cpp
llvm/test/FileCheck/numeric-defines.txt
llvm/test/FileCheck/string-defines.txt
llvm/test/FileCheck/verbose.txt
llvm/unittests/Support/FileCheckTest.cpp