[Lldb-commits] [PATCH] D67994: Modify lldb-test to print out ASTs from symbol file

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 2 10:27:16 PDT 2019

shafik added a comment.

In D67994#1683934 <https://reviews.llvm.org/D67994#1683934>, @labath wrote:

> In D67994#1683440 <https://reviews.llvm.org/D67994#1683440>, @shafik wrote:
> > I believe this is due to us being lazy as to when we import.
> Yes, but doesn't calling `Module::ParseAllDebugSymbols` force us to parse everything?  "image dump ast" does dump only the things that have been parsed, but that doesn't mean it lldb-test needs to do that too.
> IOW, I was not saying you should use "image dump ast" to write the test you wanted to write. I was merely saying that we should try to make "lldb-test -dump-ast" use the same dumping code as "image dump ast" does (assuming the latter outputs the kind of data that you need, but it seems to me that it does...). "image dump ast" can remain lazy, and only show the things that have been parsed so far (which is also useful sometimes), while "lldb-test" can do whatever it takes to parse everything (I would hope that is merely calling Module::ParseAllDebugSymbols).

In order to reuse the functionality we would need to import the complete clang ASTs to the scratch AST context and that would end up being a lot more work then the current approach. So I stuck with the current approach.



More information about the lldb-commits mailing list