[Lldb-commits] [PATCH] D70647: RFC 3/3: Remove DWARFDIE dependency from functions moved by D70646
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 26 12:59:11 PST 2019
jankratochvil planned changes to this revision.
jankratochvil marked 2 inline comments as done.
jankratochvil added inline comments.
================
Comment at: lldb/include/lldb/Symbol/TypeSystem.h:108-110
+ virtual DWARFASTParser *GetDWARFParser(SymbolFileDWARF &dwarf) {
+ return nullptr;
+ }
----------------
labath wrote:
> This part looks pretty dodgy. I'd like to avoid introducing plugin references in non-plugin code. It looks like this class isn't particularly clean already (DWARFDIE forward decl), but this seems to make the problem much worse.
>
> Since this class already contains a `SymbolFile` pointer, maybe we could create some kind of a ast-parser constructing method on the SymbolFile class to avoid mentioning the SymbolFileDWARF directly.
>
> If I was doing this, I'd probably try to take this one step further and merge the `GetDWARFParser`/`GetPDBParser` methods (whose only calls are in the relevant symbol file plugins) into a single `GetASTParser` method and do appropriate casts in the plugins themselves.
TBH I did not do the described refactoring, I just used the existing `m_sym_file`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70647/new/
https://reviews.llvm.org/D70647
More information about the lldb-commits
mailing list