DWARF: Unify form size handling code
authorPavel Labath <labath@google.com>
Wed, 14 Mar 2018 09:39:54 +0000 (09:39 +0000)
committerPavel Labath <labath@google.com>
Wed, 14 Mar 2018 09:39:54 +0000 (09:39 +0000)
commit322711f5290715b1e6f3da6c215e91760e93b408
treed22f7cc01859a2789548c625f27bbb6d0ccfb3e8
parentbc683cced825ac6fc31c73cc7a539021c9c14284
DWARF: Unify form size handling code

Summary:
This patch replaces the two switches which are deducing the size of
various forms with a single implementation. I have put the new
implementation into BinaryFormat, to avoid introducing dependencies
between the two independent libraries (DebugInfo and CodeGen) that need
this functionality.

Reviewers: aprantl, JDevlieghere, dblaikie

Subscribers: llvm-commits

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

llvm-svn: 327486
14 files changed:
llvm/include/llvm/BinaryFormat/Dwarf.h
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
llvm/lib/BinaryFormat/Dwarf.cpp
llvm/lib/CodeGen/AsmPrinter/DIE.cpp
llvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
llvm/tools/llvm-dwp/llvm-dwp.cpp
llvm/unittests/BinaryFormat/DwarfTest.cpp
llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp