[PATCH] D82084: [DebugInfo] Refactored out `debug_line.dwo` emission from `DwarfTypeUnit` to `DwarfDebug`

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 17:31:44 PDT 2020


dblaikie added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:405
   // 0, referencing the comp_dir of all the type units that use it.
-  MCDwarfDwoLineTable SplitTypeUnitFileTable;
+  std::unique_ptr<MCDwarfDwoLineTable> SplitUnitLineTable = nullptr;
   /// @}
----------------
SouraVX wrote:
> dblaikie wrote:
> > What's the motivation for this change to use unique_ptr here?
> The intent/motivation here is that, we don't want to leak memory and simplify memory management(at least for pointers). 
> Does this introduces any overhead(to whole thing) ?? or may introduce other potential bugs/undesired behavior that I'm not aware of ? 
> Happy to roll back.
Not sure I follow why there would be memory leaks or complications if this remained as it was before the patch - what concerns did you have about the way the code was phrased previously (using an MCDwarfDwoLineTable value, without unique_ptr or other indirection)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82084





More information about the llvm-commits mailing list