[all-commits] [llvm/llvm-project] a118f5: Fix type lookup bug where wrong decl context was b...

Greg Clayton via All-commits all-commits at lists.llvm.org
Tue Jun 11 13:58:49 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a118f5f398bf099ec76ebf889234ebbc58b28f0c
      https://github.com/llvm/llvm-project/commit/a118f5f398bf099ec76ebf889234ebbc58b28f0c
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2024-06-11 (Tue, 11 Jun 2024)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
    A lldb/test/API/functionalities/type_types/Makefile
    A lldb/test/API/functionalities/type_types/TestFindTypes.py
    A lldb/test/API/functionalities/type_types/main.cpp
    M lldb/unittests/SymbolFile/DWARF/DWARFDIETest.cpp

  Log Message:
  -----------
  Fix type lookup bug where wrong decl context was being used for a DIE. (#94846)

The function that calculated the declaration context for a DIE was incorrectly transparently traversing acrosss DW_TAG_subprogram dies when climbing the parent DIE chain. This meant that types defined in functions would appear to have the declaration context of anything above the function. I fixed the GetTypeLookupContextImpl(...) function in DWARFDIE.cpp to not transparently skip over functions, lexical blocks and inlined functions and compile and type units. Added a test to verify things are working.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list