[Lldb-commits] [PATCH] D56564: [SymbolFile]

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 10 15:01:00 PST 2019


zturner created this revision.
zturner added reviewers: labath, clayborg, davide.

  Previously all of these functions accepted a SymbolContext&.
  While a CompileUnit is one member of a SymbolContext, there
  are also many others, and by passing such a monolithic parameter
  in this way it makes the requirements and assumptions of the
  API unclear for both callers as well as implementors.
  
  All these methods need is a CompileUnit.  By limiting the
  parameter type in this way, we simplify the code as well as
  make it self-documenting for both implementers and users.
  
  This patch changes the following methods:
      * ParseCompileUnitLanguage(const SymbolContext&)
      * ParseCompileUnitFunctions(const SymbolContext&)
      * ParseCompileUnitLineTable(const SymbolContext&)
      * ParseCompileUnitDebugMacros(const SymbolContext&)
      * ParseCompileUnitSupportFiles(const SymbolContext&)
      * ParseTypesForCompileUnit(const SymbolContext&)
  
  to accept only a CompileUnit&, which is both necessary and
  sufficient for them to complete their task.

Note that this is purely mechanical, so it's not necessary to review the whole patch in detail unless you really want to.  The main change can be viewed in the first file.


https://reviews.llvm.org/D56564

Files:
  lldb/include/lldb/Symbol/SymbolFile.h
  lldb/include/lldb/Symbol/SymbolVendor.h
  lldb/source/Core/Module.cpp
  lldb/source/Core/SearchFilter.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
  lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
  lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
  lldb/source/Symbol/CompileUnit.cpp
  lldb/source/Symbol/SymbolVendor.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56564.181166.patch
Type: text/x-patch
Size: 57510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190110/2d30f122/attachment-0001.bin>


More information about the lldb-commits mailing list