diff options
author | Yitzhak Mandelbaum <yitzhakm@google.com> | 2019-10-29 20:26:34 -0400 |
---|---|---|
committer | Yitzhak Mandelbaum <yitzhakm@google.com> | 2019-11-06 10:28:34 -0500 |
commit | ce2b5cb6decb5cce32adde0d23bdea521da0908b (patch) | |
tree | 25912835259108e62820d67cf36a6f3226e8fd5f /llvm/lib/Support/CommandLine.cpp | |
parent | e1f8c8a16f441aed3aaa6262f932854b74e4f97c (diff) | |
download | bcm5719-llvm-ce2b5cb6decb5cce32adde0d23bdea521da0908b.tar.gz bcm5719-llvm-ce2b5cb6decb5cce32adde0d23bdea521da0908b.zip |
[libTooling] Simplify type structure of `Stencil`s.
Summary:
Currently, stencils are defined as a sequence of `StencilParts`. This
differentiation adds an unneeded layer of complexity to the definition of
Stencils. This change significantly simplifies the type structure: a stencil is
now conceptually any object implementing `StencilInterface` and `Stencil` is
just a thin wrapper for pointers to this interface.
To account for the sequencing that was supported by the old `Stencil` type, we
introduce a sequencing class that implements `StencilInterface`. That is,
sequences are just another kind of Stencil and no longer have any special
status.
Corresponding to this change in the type structure, we change the way `cat` is
used (and defined). `cat` bundles multiple features: it builds a stencil from a
sequence of subcomponents and admits multiple different types for its arguments,
while coercing them into the right type. Previously, `cat` was also used to
coerce a single `StencilPart` into a `Stencil`. With that distinction gone, many
uses of `cat` (e.g. in the tests) are unnecessary and have, therefore, been
removed.
Reviewers: gribozavr
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D69613
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions