LLVM  14.0.0git
Public Member Functions | Friends | List of all members
llvm::gsym::DwarfTransformer Class Reference

A class that transforms the DWARF in a DWARFContext into GSYM information by populating the GsymCreator object that it is constructed with. More...

#include "llvm/DebugInfo/GSYM/DwarfTransformer.h"

Public Member Functions

 DwarfTransformer (DWARFContext &D, raw_ostream &OS, GsymCreator &G)
 Create a DWARF transformer. More...
 
llvm::Error convert (uint32_t NumThreads)
 Extract the DWARF from the supplied object file and convert it into the Gsym format in the GsymCreator object that is passed in. More...
 
llvm::Error verify (StringRef GsymPath)
 

Friends

class DwarfTransformerTest
 

Detailed Description

A class that transforms the DWARF in a DWARFContext into GSYM information by populating the GsymCreator object that it is constructed with.

This class supports converting all DW_TAG_subprogram DIEs into gsym::FunctionInfo objects that includes line table information and inline function information. Creating a separate class to transform this data allows this class to be unit tested.

Definition at line 32 of file DwarfTransformer.h.

Constructor & Destructor Documentation

◆ DwarfTransformer()

llvm::gsym::DwarfTransformer::DwarfTransformer ( DWARFContext D,
raw_ostream OS,
GsymCreator G 
)
inline

Create a DWARF transformer.

Parameters
DThe DWARF to use when converting to GSYM.
OSThe stream to log warnings and non fatal issues to.
GThe GSYM creator to populate with the function information from the debug info.

Definition at line 43 of file DwarfTransformer.h.

Member Function Documentation

◆ convert()

Error DwarfTransformer::convert ( uint32_t  NumThreads)

Extract the DWARF from the supplied object file and convert it into the Gsym format in the GsymCreator object that is passed in.

Returns an error if something fatal is encountered.

Returns
An error indicating any fatal issues that happen when parsing the DWARF, or Error::success() if all goes well.

Definition at line 428 of file DwarfTransformer.cpp.

References llvm::DWARFContext::compile_units(), llvm::raw_ostream::flush(), llvm::gsym::GsymCreator::getNumFunctionInfos(), llvm::hardware_concurrency(), pool, and llvm::Error::success().

◆ verify()

llvm::Error DwarfTransformer::verify ( StringRef  GsymPath)

Friends And Related Function Documentation

◆ DwarfTransformerTest

friend class DwarfTransformerTest
friend

Definition at line 85 of file DwarfTransformer.h.


The documentation for this class was generated from the following files: