[Lldb-commits] [PATCH] D70647: RFC 3/3: Remove DWARFDIE dependency from functions moved by D70646

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 25 02:42:58 PST 2019


labath added inline comments.


================
Comment at: lldb/include/lldb/Symbol/TypeSystem.h:108-110
+  virtual DWARFASTParser *GetDWARFParser(SymbolFileDWARF &dwarf) {
+    return nullptr;
+  }
----------------
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.


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