[PATCH] D35373: Use delegation instead of inheritance

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 11:15:17 PDT 2017


rafael created this revision.
Herald added a subscriber: aprantl.

This changes DwarfContext to delegate to DwarfObj instead of having pure virtual methods.

With this DwarfContextInMemory is a trivial class that uses a new implementation of a DwarfObj which can be in a .cpp file.

This is more verbose than I was hopping for, but does allow lld to just implement a DwarfObj. Let me know if you think this is too verbose and I can subclass DwarfContext in lld instead.


https://reviews.llvm.org/D35373

Files:
  include/llvm/DebugInfo/DWARF/DWARFContext.h
  include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h
  include/llvm/DebugInfo/DWARF/DWARFSection.h
  include/llvm/DebugInfo/DWARF/DWARFUnit.h
  lib/DebugInfo/DWARF/DWARFContext.cpp
  lib/DebugInfo/DWARF/DWARFDataExtractor.cpp
  lib/DebugInfo/DWARF/DWARFUnit.cpp
  lib/DebugInfo/DWARF/DWARFVerifier.cpp
  tools/dsymutil/DwarfLinker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35373.106472.patch
Type: text/x-patch
Size: 51547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170713/82307dfd/attachment.bin>


More information about the llvm-commits mailing list