LLVM  12.0.0git
Classes | Functions
DwarfTransformer.cpp File Reference
#include <thread>
#include <unordered_set>
#include "llvm/DebugInfo/DIContext.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/DebugInfo/GSYM/DwarfTransformer.h"
#include "llvm/DebugInfo/GSYM/FunctionInfo.h"
#include "llvm/DebugInfo/GSYM/GsymCreator.h"
#include "llvm/DebugInfo/GSYM/GsymReader.h"
#include "llvm/DebugInfo/GSYM/InlineInfo.h"
Include dependency graph for DwarfTransformer.cpp:

Go to the source code of this file.


struct  llvm::gsym::CUInfo


static DWARFDie GetParentDeclContextDIE (DWARFDie &Die)
static Optional< uint32_tgetQualifiedNameIndex (DWARFDie &Die, uint64_t Language, GsymCreator &Gsym)
 Get the GsymCreator string table offset for the qualified name for the DIE passed in. More...
static bool hasInlineInfo (DWARFDie Die, uint32_t Depth)
static void parseInlineInfo (GsymCreator &Gsym, CUInfo &CUI, DWARFDie Die, uint32_t Depth, FunctionInfo &FI, InlineInfo &parent)
static void convertFunctionLineTable (raw_ostream &Log, CUInfo &CUI, DWARFDie Die, GsymCreator &Gsym, FunctionInfo &FI)

Function Documentation

◆ convertFunctionLineTable()

static void convertFunctionLineTable ( raw_ostream Log,
DWARFDie  Die,
GsymCreator Gsym,
FunctionInfo FI 

◆ GetParentDeclContextDIE()

static DWARFDie GetParentDeclContextDIE ( DWARFDie Die)

◆ getQualifiedNameIndex()

static Optional<uint32_t> getQualifiedNameIndex ( DWARFDie Die,
uint64_t  Language,
GsymCreator Gsym 

Get the GsymCreator string table offset for the qualified name for the DIE passed in.

This function will avoid making copies of any strings in the GsymCreator when possible. We don't need to copy a string when the string comes from our .debug_str section or is an inlined string in the .debug_info. If we create a qualified name string in this function by combining multiple strings in the DWARF string table or info, we will make a copy of the string when we add it to the string table.

Definition at line 130 of file DwarfTransformer.cpp.

References llvm::DWARFDie::findRecursively(), llvm::DWARFDie::getName(), GetParentDeclContextDIE(), llvm::gsym::GsymCreator::insertString(), llvm::AMDGPU::HSAMD::Kernel::Key::Language, llvm::LinkageName, llvm::None, llvm::ShortName, and llvm::dwarf::toString().

Referenced by parseInlineInfo().

◆ hasInlineInfo()

static bool hasInlineInfo ( DWARFDie  Die,
uint32_t  Depth 

Definition at line 186 of file DwarfTransformer.cpp.

References llvm::DWARFDie::children(), llvm::Depth, and llvm::DWARFDie::getTag().

Referenced by parseInlineInfo().

◆ parseInlineInfo()

static void parseInlineInfo ( GsymCreator Gsym,
DWARFDie  Die,
uint32_t  Depth,
FunctionInfo FI,
InlineInfo parent