[Lldb-commits] [PATCH] D62246: DWARF: Implement DW_AT_signature lookup for type unit support

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 23 05:14:26 PDT 2019


labath added inline comments.


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:255
     TypeList *type_list = dwarf->GetTypeList();
     if (type_ptr == NULL) {
+
----------------
aprantl wrote:
> Not your code, but it would be easier to follow the logic if we pulled these cases up front:
> 
> ```
>   if (type_ptr == DIE_IS_BEING_PARSED)
>      return type_sp;
>   if (type_ptr)
>       return type_ptr->shared_from_this();
> ...
> ```
Done in r361471.


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h:74
 
+  std::vector<std::pair<uint64_t, uint32_t>> m_type_hash_to_unit_index;
+
----------------
clayborg wrote:
> llvm::DenseMap?
A sorted vector is the [[ http://llvm.org/docs/ProgrammersManual.html#dss-sortedvectormap | recommended ]] approach for sets and maps with an insert-then-query pattern. Also, a `DenseMap` would blow up if one of the type signatures happened to be `0xfff...f`.


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

https://reviews.llvm.org/D62246





More information about the lldb-commits mailing list