[Lldb-commits] [PATCH] D49968: DWZ 02/06: Refactor DWARFUnit::ExtractDIEsScoped

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Jul 29 13:26:02 PDT 2018

jankratochvil created this revision.
jankratochvil added a reviewer: clayborg.
Herald added subscribers: JDevlieghere, aprantl.

Change the method of construction from:

  DWARFUnit::ScopedExtractDIEs DWARFUnit::ExtractDIEsScoped()


  DWARFUnit::ScopedExtractDIEs::ScopedExtractDIEs(DWARFUnit *cu)

So that a later patch can implement:

  std::unordered_map<const DWARFUnit *, DWARFUnit::ScopedExtractDIEs>
      .emplace(DWARFUnit *,DWARFUnit *)

so that if the map element already exists `DWARFUnit::ScopedExtractDIEs` is not temporarily constructed. If the caller called `DWARFUnit::ExtractDIEsScoped()` as an `emplace` parameter it would get constructed already in the caller.
Patch also contains what I considered as a general cleanup.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49968.157898.patch
Type: text/x-patch
Size: 4320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180729/eea7ea2e/attachment-0001.bin>

More information about the lldb-commits mailing list