[all-commits] [llvm/llvm-project] 219ccd: [lldb/Utility] Use APSInt in the Scalar class

Pavel Labath via All-commits all-commits at lists.llvm.org
Thu Aug 27 06:06:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 219ccdfddecb963971ad14b5c14220b896d2c2e7
      https://github.com/llvm/llvm-project/commit/219ccdfddecb963971ad14b5c14220b896d2c2e7
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-08-27 (Thu, 27 Aug 2020)

  Changed paths:
    M lldb/include/lldb/Utility/Scalar.h
    M lldb/source/Utility/Scalar.cpp
    M lldb/unittests/Utility/ScalarTest.cpp

  Log Message:
  -----------
  [lldb/Utility] Use APSInt in the Scalar class

This enables us to further simplify some code because it no longer needs
to switch on the signedness of the type (APSInt handles that).


  Commit: 9f5927e42bf4a7448dc9dd3a1550d1126c595dad
      https://github.com/llvm/llvm-project/commit/9f5927e42bf4a7448dc9dd3a1550d1126c595dad
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-08-27 (Thu, 27 Aug 2020)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    A lldb/test/Shell/SymbolFile/DWARF/DW_AT_location-DW_AT_const_value.s

  Log Message:
  -----------
  [lldb/DWARF] Fix handling of variables with both location and const_value attributes

Class-level static constexpr variables can have both DW_AT_const_value
(in the "declaration") and a DW_AT_location (in the "definition")
attributes. Our code was trying to handle this, but it was brittle and
hard to follow (and broken) because it was processing the attributes in
the order in which they were found.

Refactor the code to make the intent clearer -- DW_AT_location trumps
DW_AT_const_value, and fix the bug which meant that we were not
displaying these variables properly (the culprit was the delayed parsing
of the const_value attribute due to a need to fetch the variable type.

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


Compare: https://github.com/llvm/llvm-project/compare/4e29d2566941...9f5927e42bf4


More information about the All-commits mailing list