[Lldb-commits] [PATCH] D44739: [SymbolFileDWARF] Replace FixedFormSizes with llvm::dwarf::getFixedFormByteSize

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 21 08:13:14 PDT 2018


labath created this revision.
labath added reviewers: JDevlieghere, clayborg.

The llvm function is practically a drop-in replacement. There may be
slight differences in performance as the llvm version uses a switch
whereas our version used a lookup table, but I can't say which way that
will go. (In practice, the compiler will also turn the switch into a jump
table.)

The thing we definitely gain by this is support for new forms that
haven't been added to our tables (e.g. DW_FORM_data16) and the ability
to represent forms of size 0 like DW_FORM_implicit_const (which we
couldn't represent because we used 0 to mean "size unknown"). The thing
we definitely lose is 150 lines of code.


https://reviews.llvm.org/D44739

Files:
  source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
  source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
  source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
  source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
  source/Plugins/SymbolFile/DWARF/DWARFUnit.h
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44739.139303.patch
Type: text/x-patch
Size: 20515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180321/a182ba78/attachment-0001.bin>


More information about the lldb-commits mailing list