llvm-project/lldb/lit/SymbolFile
Pavel Labath 1a8630ac28 DWARFContext: Return empty data extractors instead of null pointers
Summary:
There are several reasons for doing this:
- generally, there's no reason to differentiate between a section being
  absent and it being present, but empty
- it matches more closely what llvm DWARF parser is doing (which also
  doesn't differentiate the two cases)
- SymbolFileDWARF also doesn't differentiate the two cases, which makes
  porting the rest of sections easier
- it fixes a bug in how the return-null-if-empty logic was implemented
  (it returned nullptr only the second time we tried to get the
  debug_aranges section), which meant that we hit an assert when trying
  to parse an empty-but-present section

Reviewers: JDevlieghere, clayborg, aprantl

Subscribers: zturner, lldb-commits

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

llvm-svn: 360874
2019-05-16 11:19:02 +00:00
..
Breakpad Breakpad: Generate unwind plans from STACK CFI records 2019-05-13 11:25:35 +00:00
DWARF DWARFContext: Return empty data extractors instead of null pointers 2019-05-16 11:19:02 +00:00
Inputs [lldb] [lit/SymbolFile] Avoid -nostdlib in target-symbols-add-unwind.test 2019-04-13 09:49:39 +00:00
NativePDB [NativePDB] Fix tests after r360569 2019-05-13 15:06:13 +00:00
PDB [NativePDB] Add anonymous namespaces support 2019-04-22 07:14:40 +00:00
target-symbols-add-unwind.test [lldb] [lit/SymbolFile] Avoid -nostdlib in target-symbols-add-unwind.test 2019-04-13 09:49:39 +00:00