[all-commits] [llvm/llvm-project] 92874d: [DWARFYAML] Refactor emitDebugInfo() to make the l...

Xing GUO via All-commits all-commits at lists.llvm.org
Thu Jul 23 08:00:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 92874d286695d2233a3fc526b07896c3676ec1d3
      https://github.com/llvm/llvm-project/commit/92874d286695d2233a3fc526b07896c3676ec1d3
  Author: Xing GUO <higuoxing at gmail.com>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M lldb/unittests/TestingSupport/Symbol/YAMLModuleTester.cpp
    M llvm/include/llvm/ObjectYAML/DWARFEmitter.h
    M llvm/include/llvm/ObjectYAML/DWARFYAML.h
    M llvm/lib/ObjectYAML/CMakeLists.txt
    M llvm/lib/ObjectYAML/DWARFEmitter.cpp
    R llvm/lib/ObjectYAML/DWARFVisitor.cpp
    R llvm/lib/ObjectYAML/DWARFVisitor.h
    M llvm/lib/ObjectYAML/DWARFYAML.cpp
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp

  Log Message:
  -----------
  [DWARFYAML] Refactor emitDebugInfo() to make the length be inferred.

This patch refactors `emitDebugInfo()` to make the length field be
inferred from its content. Besides, the `Visitor` class is removed in
this patch. The original `Visitor` class helps us determine an
appropriate length and emit the .debug_info section. These two
processes can be merged into one process. Besides, the length field
should be inferred when it's missing rather than when it's zero.

Reviewed By: jhenderson, labath

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




More information about the All-commits mailing list