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

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 1 15:47:50 PST 2017

zturner added a comment.

In https://reviews.llvm.org/D40745#942913, @jingham wrote:

> I'm sure this is just a "quick and dirty implementation" thing, but depending on the output of Dump functions doesn't seem like a great idea for long term stable testing.
> Those functions are meant to be useful for debugging lldb, and gathering data when you can't get repro cases.  They probably don't want to have all the detail you might need, and are laid out for readability, so they are no more than ad hoc structured.
> For instance, your dumpClangASTContext finds it's way to CompileUnit::Dump which doesn't actually call m_types->Dump.  That's probably because it was so noisy as to render the CU dump useless, though it was commented out before the sources were imported to llvm.org so I don't know for sure.
> Because of that, this command is not currently useful for the purpose for which it was intended.  I think at present it doesn't actually dump anything that actually gets put into the AST, it just dumps Symbol file information which is not relevant, CU structures, Function blocks.

I definitely agree we would want to re-write the dumping logic to be in the tool itself, so that it can be designed with the purpose in mind.  I could probably rename this command to be 'symbols' (even then, we'd probably want to re-write the logic for it), but at least this gets the skeleton in place.


More information about the lldb-commits mailing list