[Lldb-commits] [PATCH] D142672: [lldb] Make SBSection::GetSectionData call Section::GetSectionData.

Jorge Gorbe Moya via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 26 16:53:39 PST 2023


jgorbe marked an inline comment as done.
jgorbe added inline comments.


================
Comment at: lldb/source/API/SBSection.cpp:187-189
+    DataExtractorSP result_data_sp =
+        std::make_shared<DataExtractor>(section_data, offset, size);
+    sb_data.SetOpaque(result_data_sp);
----------------
dblaikie wrote:
> Probably either use `std::move` when passing `result_data_sp` to `SetOpaque`, or roll the expressions together (to avoid an unnecessary copy of a ref counted smart pointer, that would cause extra increment/decrement of the ref count)
Done, inlined `result_data_sp` into the `SetOpaque` call. Thanks!


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

https://reviews.llvm.org/D142672



More information about the lldb-commits mailing list