[Lldb-commits] [PATCH] D40745: Add a clang-ast subcommand to lldb-test

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 1 23:03:53 PST 2017


On Fri, Dec 1, 2017 at 3:50 PM Jim Ingham via Phabricator <
reviews at reviews.llvm.org> wrote:

> jingham added a comment.
>
> Cool.  We do need to make sure people don't start writing tests against it
> yet, however.  That would be wasted effort.
>

I don't think it follows that it would be a wasted effort.  Anything that
increases test coverage today is the exact opposite of a wasted effort.
Currently it prints useful information about symbols.  The format may not
have been designed for writing tests against, but it is not that bad
either.  Symbols, sections, and headers are printed on individual lines

I don't think we should build up a suite of several hundred debug info
tests around this particular format, but I don't think we should hesitate
to add some when an opportunity presents itself either.  Often what the
best format actually is only becomes evident through experience (i.e.
iterations).

A first idea might be to understand why each type shows up 3 times in the
output.  E.g.

0BA597D8:   Type{0x0000005f} , compiler_type = 0x0ba34d70 signed char **
0BA597D8:   Type{0x0000005f} , compiler_type = 0x0ba34d70 signed char **
...
0BA597D8:   Type{0x0000005f} , compiler_type = 0x0ba34d70 signed char **

could be just a bug in the dump function, but another possibility is that
we are actually storing the same thing 3 times.  If that is the case, then
after fixing it, a test could then verify that a line that currently prints
3 times only prints once after a fix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171202/7fecd630/attachment.html>


More information about the lldb-commits mailing list