[PATCH] D14099: [LLVMSymbolize] Move ModuleInfo into a separate class (SymbolizableModule).

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 17:11:00 PDT 2015


samsonov created this revision.
samsonov added reviewers: dblaikie, echristo, rafael.
samsonov added a subscriber: llvm-commits.

This is mostly NFC. It is a first step in cleaning up LLVMSymbolize
library. It removes "ModuleInfo" class which bundles together ObjectFile
and its debug info context in favor of:
  * abstract SymbolizableModule in public headers;
  * SymbolizableObjectFile subclass in implementation.

Additionally, SymbolizableObjectFile is now created via factory, so we
can properly detect object parsing error at this stage instead of keeping
the broken half-parsed object. As a next step, we would be able to
propagate the error all the way back to the library user.

Further improvements might include:
  * factoring out the logic of finding appropriate file with debug info
    for a given object file, and caching all parsed object files into a
    separate class [A].
  * factoring out DILineInfo rendering [B].
This would make what is now a heavyweight "LLVMSymbolizer" a relatively
straightforward class, that calls into [A] to turn filepath into a
SymbolizableModule, delegates actual symbolization to concrete SymbolizableModule
implementation, and lets [C] render the result.

Feel free to express any concerns regarding this plan, or suggest better
alternatives.

http://reviews.llvm.org/D14099

Files:
  include/llvm/DebugInfo/Symbolize/SymbolizableModule.h
  include/llvm/DebugInfo/Symbolize/Symbolize.h
  lib/DebugInfo/Symbolize/CMakeLists.txt
  lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
  lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
  lib/DebugInfo/Symbolize/Symbolize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14099.38485.patch
Type: text/x-patch
Size: 32356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151027/cdd4b928/attachment.bin>


More information about the llvm-commits mailing list