[Lldb-commits] [PATCH] D46888: [DWARF] Have HashedNameToDIE store a DataExtractor by value

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 15 09:19:22 PDT 2018


labath created this revision.
labath added reviewers: clayborg, JDevlieghere.
Herald added a subscriber: aprantl.

The DataExtractors are cheap to copy so there is no reason to store them
by reference. Also, in my upcoming indexing refactor I am planning to
remove the apple tables data extractor members from the SymbolFileDWARF
class, so there will not be a DataExtractor with a suitable lifetime to
refer to.


https://reviews.llvm.org/D46888

Files:
  source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h


Index: source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
===================================================================
--- source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
+++ source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
@@ -156,8 +156,8 @@
                               lldb::offset_t *hash_data_offset_ptr,
                               Pair &pair) const override;
 
-    const lldb_private::DWARFDataExtractor &m_data;
-    const lldb_private::DWARFDataExtractor &m_string_table;
+    lldb_private::DWARFDataExtractor m_data;
+    lldb_private::DWARFDataExtractor m_string_table;
     std::string m_name;
   };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46888.146852.patch
Type: text/x-patch
Size: 630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180515/56bbe563/attachment.bin>


More information about the lldb-commits mailing list