[all-commits] [llvm/llvm-project] 4e10a1: [DebugInfo] Make DIELocList::SizeOf() more explici...

Igor Kudrin via All-commits all-commits at lists.llvm.org
Mon Aug 3 01:05:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e10a18972a4569fe6b13e60becb44514b35c52e
      https://github.com/llvm/llvm-project/commit/4e10a18972a4569fe6b13e60becb44514b35c52e
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-08-03 (Mon, 03 Aug 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DIE.cpp

  Log Message:
  -----------
  [DebugInfo] Make DIELocList::SizeOf() more explicit. NFCI.

DIELocList is used with a limited number of DWARF forms, see the only
place where it is instantiated, DwarfCompileUnit::addLocationList().

The patch marks the unexpected execution path in DIELocList::SizeOf()
as unreachable, to reduce ambiguity.

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


  Commit: 8feff8d14f75aafe4af77a6295d59d28e7a72829
      https://github.com/llvm/llvm-project/commit/8feff8d14f75aafe4af77a6295d59d28e7a72829
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-08-03 (Mon, 03 Aug 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h

  Log Message:
  -----------
  [DebugInfo] Fix a comment and a variable name. NFC.

DebugLocListIndex keeps the index of an entry list, not the offset.

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


  Commit: f98e03a35ded30893095f71be933ffc754d71d37
      https://github.com/llvm/llvm-project/commit/f98e03a35ded30893095f71be933ffc754d71d37
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-08-03 (Mon, 03 Aug 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DIE.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp

  Log Message:
  -----------
  [DebugInfo] Fix misleading using of DWARF forms with DIELabel. NFCI.

DIELabel can emit only 32- or 64-bit values, while it was created in
some places with DW_FORM_udata, which implies emitting uleb128.
Nevertheless, these places also expected to emit U32 or U64, but just
used a misleading DWARF form. The patch updates those places to use more
appropriate DWARF forms and restricts DIELabel::SizeOf() to accept only
forms that are actually used in the LLVM codebase.

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


  Commit: 414b9bec6deb542f7ca729585b1e592cac8ccb30
      https://github.com/llvm/llvm-project/commit/414b9bec6deb542f7ca729585b1e592cac8ccb30
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2020-08-03 (Mon, 03 Aug 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DIE.cpp

  Log Message:
  -----------
  [DebugInfo] Make DIEDelta::SizeOf() more explicit. NFCI.

The patch restricts DIEDelta::SizeOf() to accept only DWARF forms that
are actually used in the LLVM codebase. This should make the use of the
class more explicit and help to avoid issues similar to fixed in D83958
and D84094.

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


Compare: https://github.com/llvm/llvm-project/compare/9c3f6fb68807...414b9bec6deb


More information about the All-commits mailing list