[all-commits] [llvm/llvm-project] 217808: Separate DIERef vs. user_id_t: m_function_scope_qu...

Jan Kratochvil via All-commits all-commits at lists.llvm.org
Mon Feb 17 07:35:50 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 21780888791837b575d227a9a69c1afee9e4c29d
      https://github.com/llvm/llvm-project/commit/21780888791837b575d227a9a69c1afee9e4c29d
  Author: Jan Kratochvil <jan.kratochvil at redhat.com>
  Date:   2020-02-17 (Mon, 17 Feb 2020)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h

  Log Message:
  -----------
  Separate DIERef vs. user_id_t: m_function_scope_qualified_name_map

As discussed in https://reviews.llvm.org/D73206#1871895 there is both
`DIERef` and `user_id_t` and sometimes (for DWZ) we need to encode Main
CU into them and sometimes we cannot as it is unavailable at that point
and at the same time not even needed.

I have also noticed `DIERef` and `user_id_t` in fact contain the same
information which can be seen in SymbolFileDWARF::GetUID.

SB* API/ABI is already using `user_id_t` and it needs to encode Main CU
for DWZ. Therefore what about making `DIERef` the identifier not
containing Main CU and `user_id_t` the identifier containing Main CU?

It is sort of a revert of D63322.

I find this patch as a NFC cleanup to the codebase - to satisfy a new
premise `user_id_t` is used as little as possible and thus only for
external interfaces which must not deal with MainCU in any way.

Its larger goal is to satisfy a plan to implement DWZ support.

Differential Revision: https://reviews.llvm.org/D74637




More information about the All-commits mailing list