[Lldb-commits] [PATCH] D61942: DWARFContext: Return empty data extractors instead of null pointers

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 15 09:01:08 PDT 2019


aprantl accepted this revision.
aprantl added inline comments.
This revision is now accepted and ready to land.


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFContext.h:26
 
-  const DWARFDataExtractor *getOrLoadArangesData();
+  const DWARFDataExtractor &getOrLoadArangesData();
 };
----------------
lgtm


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp:44
 llvm::Error
 DWARFDebugAranges::extract(const DWARFDataExtractor &debug_aranges_data) {
   lldb::offset_t offset = 0;
----------------
lgtm


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp:49
       m_context.getOrLoadArangesData();
-  if (debug_aranges_data) {
-    llvm::Error error = m_cu_aranges_up->extract(*debug_aranges_data);
-    if (error)
-      return std::move(error);
-  }
+  if (llvm::Error error = m_cu_aranges_up->extract(debug_aranges_data))
+    return std::move(error);
----------------
ltgm


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61942/new/

https://reviews.llvm.org/D61942





More information about the lldb-commits mailing list