LLVM 23.0.0git
llvm::dwarf_linker::parallel::AcceleratorRecordsSaver Class Reference

This class helps to store information for accelerator entries. More...

#include "DWARFLinker/Parallel/AcceleratorRecordsSaver.h"

Public Member Functions

 AcceleratorRecordsSaver (LinkingGlobalData &GlobalData, CompileUnit &InUnit, CompileUnit *OutUnit)
 AcceleratorRecordsSaver (LinkingGlobalData &GlobalData, CompileUnit &InUnit, TypeUnit *OutUnit)
void save (const DWARFDebugInfoEntry *InputDieEntry, DIE *OutDIE, AttributesInfo &AttrInfo, TypeEntry *TypeEntry)
 Save accelerator info for the specified OutDIE inside OutUnit.

Protected Member Functions

 AcceleratorRecordsSaver (LinkingGlobalData &GlobalData, CompileUnit &InUnit, CompileUnit::OutputUnitVariantPtr OutUnit)
void saveObjC (const DWARFDebugInfoEntry *InputDieEntry, DIE *OutDIE, AttributesInfo &AttrInfo)
void saveNameRecord (const DWARFDebugInfoEntry *InputDieEntry, StringEntry *Name, DIE *OutDIE, dwarf::Tag Tag, bool AvoidForPubSections)
void saveNamespaceRecord (const DWARFDebugInfoEntry *InputDieEntry, StringEntry *Name, DIE *OutDIE, dwarf::Tag Tag, TypeEntry *TypeEntry)
void saveObjCNameRecord (const DWARFDebugInfoEntry *InputDieEntry, StringEntry *Name, DIE *OutDIE, dwarf::Tag Tag)
void saveTypeRecord (const DWARFDebugInfoEntry *InputDieEntry, StringEntry *Name, DIE *OutDIE, dwarf::Tag Tag, uint32_t QualifiedNameHash, bool ObjcClassImplementation, TypeEntry *TypeEntry)
std::optional< uint64_tgetDefiningParentOutOffset (const DWARFDebugInfoEntry *InputDieEntry)
 Return the output offset of InputDieEntry's immediate non-declaration parent, for use as the DW_IDX_parent field of a name index entry.

Protected Attributes

LinkingGlobalDataGlobalData
 Global linking data.
CompileUnitInUnit
 Comiple unit corresponding to input DWARF.
CompileUnit::OutputUnitVariantPtr OutUnit
 Compile unit or Artificial type unit corresponding to the output DWARF.

Detailed Description

This class helps to store information for accelerator entries.

It prepares accelerator info for the certain DIE and store it inside OutUnit.

Definition at line 24 of file AcceleratorRecordsSaver.h.

Constructor & Destructor Documentation

◆ AcceleratorRecordsSaver() [1/3]

llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::AcceleratorRecordsSaver ( LinkingGlobalData & GlobalData,
CompileUnit & InUnit,
CompileUnit * OutUnit )
inline

◆ AcceleratorRecordsSaver() [2/3]

llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::AcceleratorRecordsSaver ( LinkingGlobalData & GlobalData,
CompileUnit & InUnit,
TypeUnit * OutUnit )
inline

Definition at line 31 of file AcceleratorRecordsSaver.h.

References AcceleratorRecordsSaver(), GlobalData, InUnit, and OutUnit.

◆ AcceleratorRecordsSaver() [3/3]

llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::AcceleratorRecordsSaver ( LinkingGlobalData & GlobalData,
CompileUnit & InUnit,
CompileUnit::OutputUnitVariantPtr OutUnit )
inlineprotected

Definition at line 42 of file AcceleratorRecordsSaver.h.

References GlobalData, InUnit, and OutUnit.

Member Function Documentation

◆ getDefiningParentOutOffset()

std::optional< uint64_t > AcceleratorRecordsSaver::getDefiningParentOutOffset ( const DWARFDebugInfoEntry * InputDieEntry)
protected

Return the output offset of InputDieEntry's immediate non-declaration parent, for use as the DW_IDX_parent field of a name index entry.

Matches classic's one-level lookup: does not walk past a pruned or declaration parent to find a surviving ancestor. Returns std::nullopt if there is no usable parent.

Definition at line 213 of file AcceleratorRecordsSaver.cpp.

References llvm::DWARFDebugInfoEntry::getParentIdx(), InUnit, and llvm::dwarf::toUnsigned().

Referenced by saveNameRecord(), saveNamespaceRecord(), saveObjCNameRecord(), and saveTypeRecord().

◆ save()

◆ saveNameRecord()

void AcceleratorRecordsSaver::saveNameRecord ( const DWARFDebugInfoEntry * InputDieEntry,
StringEntry * Name,
DIE * OutDIE,
dwarf::Tag Tag,
bool AvoidForPubSections )
protected

◆ saveNamespaceRecord()

void AcceleratorRecordsSaver::saveNamespaceRecord ( const DWARFDebugInfoEntry * InputDieEntry,
StringEntry * Name,
DIE * OutDIE,
dwarf::Tag Tag,
TypeEntry * TypeEntry )
protected

◆ saveObjC()

◆ saveObjCNameRecord()

void AcceleratorRecordsSaver::saveObjCNameRecord ( const DWARFDebugInfoEntry * InputDieEntry,
StringEntry * Name,
DIE * OutDIE,
dwarf::Tag Tag )
protected

◆ saveTypeRecord()

void AcceleratorRecordsSaver::saveTypeRecord ( const DWARFDebugInfoEntry * InputDieEntry,
StringEntry * Name,
DIE * OutDIE,
dwarf::Tag Tag,
uint32_t QualifiedNameHash,
bool ObjcClassImplementation,
TypeEntry * TypeEntry )
protected

Member Data Documentation

◆ GlobalData

LinkingGlobalData& llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::GlobalData
protected

Global linking data.

Definition at line 71 of file AcceleratorRecordsSaver.h.

Referenced by AcceleratorRecordsSaver(), AcceleratorRecordsSaver(), AcceleratorRecordsSaver(), save(), and saveObjC().

◆ InUnit

CompileUnit& llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::InUnit
protected

Comiple unit corresponding to input DWARF.

Definition at line 74 of file AcceleratorRecordsSaver.h.

Referenced by AcceleratorRecordsSaver(), AcceleratorRecordsSaver(), AcceleratorRecordsSaver(), getDefiningParentOutOffset(), and save().

◆ OutUnit

CompileUnit::OutputUnitVariantPtr llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::OutUnit
protected

Compile unit or Artificial type unit corresponding to the output DWARF.

Definition at line 77 of file AcceleratorRecordsSaver.h.

Referenced by AcceleratorRecordsSaver(), AcceleratorRecordsSaver(), AcceleratorRecordsSaver(), saveNameRecord(), saveNamespaceRecord(), saveObjCNameRecord(), and saveTypeRecord().


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