aprantl marked 3 inline comments as done.
aprantl added inline comments.

================
Comment at: lldb/include/lldb/Symbol/SymbolFile.h:283-285
+  /// Return a hash for this symbol file, such as a dwo_id.
+  virtual llvm::Optional<uint64_t> GetSymbolHash() { return {}; }
+  
----------------
labath wrote:
> Can we remove this and put a cast in 
> `SymbolFileDWARF::UpdateExternalModuleListIfNeeded` instead? It looks like 
> that function should check that it has really found a dwarf file (and not a 
> pdb for instance) anyway...
> Can we remove this and put a cast in 
> SymbolFileDWARF::UpdateExternalModuleListIfNeeded instead?

We don't have a mechanism to dynamic-cast between SymbolFiles at the moment and 
I think it's difficult to add one, since it's a base class of an open-ended 
plugin hierarchy. We could require all plugins to register in a global enum if 
we don't care about extensibility. I also thought about each class identifying 
itself via a string that is its class name, but then we couldn't implement 
casting to a base-class easily.

If you have any idea for how to do this elegantly I'm more than happy to 
implement it.

> It looks like that function should check that it has really found a dwarf 
> file (and not a pdb for instance) anyway...

Technically, yes, but you'd need DWARF that encodes the path of a PDB to get 
into that situation, so I'm not super concerned about this.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70272/new/

https://reviews.llvm.org/D70272



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to