[Lldb-commits] [PATCH] D59430: Update DwarfDebugInfoEntry to use llvm::Error and llvm::Expected
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 15 13:29:02 PDT 2019
aprantl added inline comments.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:218
+ assert(offset < cu->GetNextCompileUnitOffset() &&
+ debug_info_data.ValidOffset(offset));
----------------
Should this be a lldb_assert() followed by `return make_error` instead?
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:1170
const dw_offset_t die_offset, Stream &s) {
- if (dwarf2Data == NULL) {
- s.PutCString("NULL");
- return false;
- }
+ assert(dwarf2Data);
----------------
Instead of passing a pointer and asserting, wouldn't it be better to pass a `SymbolFileDWARF &`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59430/new/
https://reviews.llvm.org/D59430
More information about the lldb-commits
mailing list