LLVM: llvm::dwarf_linker::parallel::DIEAttributeCloner Class Reference (original) (raw)
This class creates clones of input DIE attributes. More...
#include "[DWARFLinker/Parallel/DIEAttributeCloner.h](DIEAttributeCloner%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| DIEAttributeCloner (DIE *OutDIE, CompileUnit &InUnit, CompileUnit *OutUnit, const DWARFDebugInfoEntry *InputDieEntry, DIEGenerator &Generator, std::optional< int64_t > FuncAddressAdjustment, std::optional< int64_t > VarAddressAdjustment, bool HasLocationExpressionAddress) | |
| DIEAttributeCloner (DIE *OutDIE, CompileUnit &InUnit, TypeUnit *OutUnit, const DWARFDebugInfoEntry *InputDieEntry, DIEGenerator &Generator, std::optional< int64_t > FuncAddressAdjustment, std::optional< int64_t > VarAddressAdjustment, bool HasLocationExpressionAddress) | |
| void | clone () |
| Clone attributes of input DIE. | |
| unsigned | finalizeAbbreviations (bool HasChildrenToClone) |
| Create abbreviations for the output DIE after all attributes are cloned. | |
| unsigned | getOutOffset () |
| Protected Attributes | |
|---|---|
| DIE * | OutDIE = nullptr |
| Output DIE. | |
| CompileUnit & | InUnit |
| Input compilation unit. | |
| CompileUnit::OutputUnitVariantPtr | OutUnit |
| Output unit(either "plain" compilation unit, either artificial type unit). | |
| SectionDescriptor & | DebugInfoOutputSection |
| .debug_info section descriptor. | |
| const DWARFDebugInfoEntry * | InputDieEntry = nullptr |
| Input DIE entry. | |
| uint32_t | InputDIEIdx = 0 |
| Input DIE index. | |
| DIEGenerator & | Generator |
| Output DIE generator. | |
| std::optional< int64_t > | FuncAddressAdjustment |
| Relocation adjustment for the function address ranges. | |
| std::optional< int64_t > | VarAddressAdjustment |
| Relocation adjustment for the variable locations. | |
| bool | HasLocationExpressionAddress = false |
| Indicates whether InputDieEntry has an location attribute containg address expression. | |
| unsigned | AttrOutOffset = 0 |
| Output offset after all attributes. | |
| OffsetsPtrVector | PatchesOffsets |
| Patches for the cloned attributes. | |
| bool | Use_DW_FORM_strp = false |
| This flag forces using DW_FORM_strp for string attributes. |
This class creates clones of input DIE attributes.
It enumerates attributes of input DIE, creates clone for each attribute, adds cloned attribute to the output DIE.
Definition at line 47 of file DIEAttributeCloner.h.
| llvm::dwarf_linker::parallel::DIEAttributeCloner::DIEAttributeCloner ( DIE * OutDIE, CompileUnit & InUnit, CompileUnit * OutUnit, const DWARFDebugInfoEntry * InputDieEntry, DIEGenerator & Generator, std::optional< int64_t > FuncAddressAdjustment, std::optional< int64_t > VarAddressAdjustment, bool HasLocationExpressionAddress ) | inline |
|---|
◆ DIEAttributeCloner() [2/3]
| llvm::dwarf_linker::parallel::DIEAttributeCloner::DIEAttributeCloner ( DIE * OutDIE, CompileUnit & InUnit, TypeUnit * OutUnit, const DWARFDebugInfoEntry * InputDieEntry, DIEGenerator & Generator, std::optional< int64_t > FuncAddressAdjustment, std::optional< int64_t > VarAddressAdjustment, bool HasLocationExpressionAddress ) | inline |
|---|
◆ DIEAttributeCloner() [3/3]
Definition at line 85 of file DIEAttributeCloner.h.
References llvm::dwarf_linker::DebugInfo, DebugInfoOutputSection, FuncAddressAdjustment, Generator, HasLocationExpressionAddress, InputDieEntry, InputDIEIdx, InUnit, OutDIE, OutUnit, Use_DW_FORM_strp, and VarAddressAdjustment.
◆ clone()
| void DIEAttributeCloner::clone | ( | ) |
|---|
Clone attributes of input DIE.
Definition at line 16 of file DIEAttributeCloner.cpp.
References AttrInfo, AttrOutOffset, cloneAddressAttr(), cloneBlockAttr(), cloneDieRefAttr(), cloneScalarAttr(), cloneStringAttr(), llvm::Data, DebugInfoOutputSection, llvm::dwarf_linker::DebugStrOffsets, llvm::DWARFFormValue::extractValue(), llvm::dwarf::FormEncodingString(), Generator, llvm::getULEB128Size(), InputDieEntry, InputDIEIdx, InUnit, llvm::Offset, OutDIE, OutUnit, PatchesOffsets, shouldSkipAttribute(), and llvm::DWARFFormValue::skipValue().
◆ cloneAddressAttr()
Clone address attribute.
Definition at line 580 of file DIEAttributeCloner.cpp.
References llvm::DWARFAbbreviationDeclaration::AttributeSpec::Attr, AttrInfo, llvm::DWARFAbbreviationDeclaration::AttributeSpec::Form, FuncAddressAdjustment, Generator, llvm::DWARFFormValue::getRawUValue(), InputDieEntry, InUnit, llvm_unreachable, OutUnit, and VarAddressAdjustment.
Referenced by clone().
◆ cloneBlockAttr()
Clone block or exprloc attribute.
Definition at line 521 of file DIEAttributeCloner.cpp.
References assert(), llvm::DWARFAbbreviationDeclaration::AttributeSpec::Attr, AttrInfo, AttrOutOffset, llvm::Data, llvm::ArrayRef< T >::data(), DebugInfoOutputSection, llvm::DWARFFormValue::FC_Block, llvm::DWARFFormValue::FC_Exprloc, llvm::DWARFAbbreviationDeclaration::AttributeSpec::Form, Generator, llvm::DWARFFormValue::getAsBlock(), HasLocationExpressionAddress, InUnit, llvm::DWARFFormValue::isFormClass(), llvm::DWARFAttribute::mayHaveLocationExpr(), OutUnit, PatchesOffsets, llvm::ArrayRef< T >::size(), and VarAddressAdjustment.
Referenced by clone().
◆ cloneDieRefAttr()
Clone attribute referencing another DIE.
Definition at line 236 of file DIEAttributeCloner.cpp.
References assert(), llvm::DWARFAbbreviationDeclaration::AttributeSpec::Attr, AttrOutOffset, DebugInfoOutputSection, Generator, InputDieEntry, InputDIEIdx, InUnit, llvm::dwarf_linker::parallel::CompileUnit::DIEInfo::needToPlaceInTypeTable(), OutDIE, OutUnit, PatchesOffsets, and llvm::dwarf_linker::parallel::Resolve.
Referenced by clone().
◆ cloneScalarAttr()
Clone scalar attribute.
Definition at line 304 of file DIEAttributeCloner.cpp.
References llvm::DWARFAbbreviationDeclaration::AttributeSpec::Attr, AttrInfo, AttrOutOffset, llvm::dwarf_linker::DebugAddr, DebugInfoOutputSection, llvm::dwarf_linker::DebugLine, llvm::dwarf_linker::DebugMacinfo, llvm::dwarf_linker::DebugMacro, llvm::dwarf_linker::DebugStrOffsets, llvm::dwarf::doesFormBelongToClass(), llvm::DWARFFormValue::FC_SectionOffset, llvm::DWARFAbbreviationDeclaration::AttributeSpec::Form, FuncAddressAdjustment, Generator, llvm::DWARFFormValue::getAsSectionOffset(), llvm::DWARFFormValue::getAsSignedConstant(), llvm::DWARFFormValue::getAsUnsignedConstant(), InputDieEntry, InputDIEIdx, InUnit, llvm::Macro, llvm::DWARFAttribute::mayHaveLocationList(), llvm::Offset, OutDIE, OutUnit, PatchesOffsets, and VarAddressAdjustment.
Referenced by clone().
◆ cloneStringAttr()
Clone string attribute.
Definition at line 182 of file DIEAttributeCloner.cpp.
References llvm::DWARFAbbreviationDeclaration::AttributeSpec::Attr, AttrInfo, AttrOutOffset, DebugInfoOutputSection, llvm::DWARFAbbreviationDeclaration::AttributeSpec::Form, Generator, InputDIEIdx, InUnit, OutDIE, OutUnit, PatchesOffsets, llvm::String, llvm::dwarf::toString(), and Use_DW_FORM_strp.
Referenced by clone().
◆ finalizeAbbreviations()
| unsigned DIEAttributeCloner::finalizeAbbreviations | ( | bool | HasChildrenToClone | ) |
|---|
◆ getOutOffset()
| unsigned llvm::dwarf_linker::parallel::DIEAttributeCloner::getOutOffset ( ) | inline |
|---|
◆ shouldSkipAttribute()
◆ AttrInfo
AttributesInfo llvm::dwarf_linker::parallel::DIEAttributeCloner::AttrInfo
◆ AttrOutOffset
| unsigned llvm::dwarf_linker::parallel::DIEAttributeCloner::AttrOutOffset = 0 | protected |
|---|
◆ DebugInfoOutputSection
| SectionDescriptor& llvm::dwarf_linker::parallel::DIEAttributeCloner::DebugInfoOutputSection | protected |
|---|
◆ FuncAddressAdjustment
| std::optional<int64_t> llvm::dwarf_linker::parallel::DIEAttributeCloner::FuncAddressAdjustment | protected |
|---|
◆ Generator
| DIEGenerator& llvm::dwarf_linker::parallel::DIEAttributeCloner::Generator | protected |
|---|
◆ HasLocationExpressionAddress
| bool llvm::dwarf_linker::parallel::DIEAttributeCloner::HasLocationExpressionAddress = false | protected |
|---|
◆ InputDieEntry
◆ InputDIEIdx
| uint32_t llvm::dwarf_linker::parallel::DIEAttributeCloner::InputDIEIdx = 0 | protected |
|---|
◆ InUnit
| CompileUnit& llvm::dwarf_linker::parallel::DIEAttributeCloner::InUnit | protected |
|---|
◆ OutDIE
| DIE* llvm::dwarf_linker::parallel::DIEAttributeCloner::OutDIE = nullptr | protected |
|---|
◆ OutUnit
◆ PatchesOffsets
| OffsetsPtrVector llvm::dwarf_linker::parallel::DIEAttributeCloner::PatchesOffsets | protected |
|---|
◆ Use_DW_FORM_strp
| bool llvm::dwarf_linker::parallel::DIEAttributeCloner::Use_DW_FORM_strp = false | protected |
|---|
◆ VarAddressAdjustment
| std::optional<int64_t> llvm::dwarf_linker::parallel::DIEAttributeCloner::VarAddressAdjustment | protected |
|---|
The documentation for this class was generated from the following files:
- lib/DWARFLinker/Parallel/DIEAttributeCloner.h
- lib/DWARFLinker/Parallel/DIEAttributeCloner.cpp