[Lldb-commits] [PATCH] D61942: DWARFContext: Return empty data extractors instead of null pointers
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed May 15 06:29:36 PDT 2019
labath created this revision.
labath added reviewers: JDevlieghere, clayborg, aprantl.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6631 bytes
Desc: not available
More information about the lldb-commits