LLVM 20.0.0git
|
This class is a helper to create output DIE tree. More...
#include "DWARFLinker/Parallel/DIEGenerator.h"
Public Member Functions | |
DIEGenerator (BumpPtrAllocator &Allocator, DwarfUnit &CU) | |
DIEGenerator (DIE *OutputDIE, BumpPtrAllocator &Allocator, DwarfUnit &CU) | |
DIE * | createDIE (dwarf::Tag DieTag, uint32_t OutOffset) |
Creates a DIE of specified tag DieTag and OutOffset . | |
DIE * | getDIE () |
void | addChild (DIE *Child) |
Adds a specified Child to the current DIE. | |
std::pair< DIEValue &, size_t > | addScalarAttribute (dwarf::Attribute Attr, dwarf::Form AttrForm, uint64_t Value) |
Adds specified scalar attribute to the current DIE. | |
std::pair< DIEValue &, size_t > | addLocationAttribute (dwarf::Attribute Attr, dwarf::Form AttrForm, ArrayRef< uint8_t > Bytes) |
Adds specified location attribute to the current DIE. | |
std::pair< DIEValue &, size_t > | addBlockAttribute (dwarf::Attribute Attr, dwarf::Form AttrForm, ArrayRef< uint8_t > Bytes) |
Adds specified block or exprloc attribute to the current DIE. | |
std::pair< DIEValue &, size_t > | addLocListAttribute (dwarf::Attribute Attr, dwarf::Form AttrForm, uint64_t Value) |
Adds specified location list attribute to the current DIE. | |
std::pair< DIEValue &, size_t > | addIndexedStringAttribute (dwarf::Attribute Attr, dwarf::Form AttrForm, uint64_t Idx) |
Adds indexed string attribute. | |
std::pair< DIEValue &, size_t > | addStringPlaceholderAttribute (dwarf::Attribute Attr, dwarf::Form AttrForm) |
Adds string attribute with dummy offset to the current DIE. | |
std::pair< DIEValue &, size_t > | addInplaceString (dwarf::Attribute Attr, StringRef String) |
Adds inplace string attribute to the current DIE. | |
size_t | finalizeAbbreviations (bool CHILDREN_yes, OffsetsPtrVector *OffsetsList) |
Creates appreviations for the current DIE. | |
Protected Member Functions | |
template<typename T > | |
std::pair< DIEValue &, size_t > | addAttribute (dwarf::Attribute Attr, dwarf::Form AttrForm, T &&Value) |
Protected Attributes | |
BumpPtrAllocator & | Allocator |
DwarfUnit & | CU |
DIE * | OutputDIE = nullptr |
This class is a helper to create output DIE tree.
Definition at line 22 of file DIEGenerator.h.
|
inline |
Definition at line 24 of file DIEGenerator.h.
|
inline |
Definition at line 27 of file DIEGenerator.h.
|
inlineprotected |
Definition at line 160 of file DIEGenerator.h.
References llvm::DIEValueList::addValue(), Allocator, OutputDIE, and llvm::DIEValue::sizeOf().
Referenced by addBlockAttribute(), addIndexedStringAttribute(), addLocationAttribute(), addLocListAttribute(), addScalarAttribute(), and addStringPlaceholderAttribute().
|
inline |
Adds specified block or exprloc attribute to the current DIE.
Definition at line 71 of file DIEGenerator.h.
References addAttribute(), Allocator, assert(), llvm::Block, and llvm::ArrayRef< T >::size().
Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneBlockAttr().
|
inline |
Adds a specified Child
to the current DIE.
Definition at line 42 of file DIEGenerator.h.
References llvm::DIE::addChild(), assert(), and OutputDIE.
Referenced by llvm::dwarf_linker::parallel::CompileUnit::cloneDIE().
|
inline |
Adds indexed string attribute.
Definition at line 100 of file DIEGenerator.h.
References addAttribute(), assert(), and Idx.
Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneStringAttr().
|
inline |
Adds inplace string attribute to the current DIE.
Definition at line 116 of file DIEGenerator.h.
References llvm::DIEValueList::addValue(), Allocator, llvm::Block, OutputDIE, and llvm::String.
|
inline |
Adds specified location attribute to the current DIE.
Definition at line 57 of file DIEGenerator.h.
References addAttribute(), Allocator, llvm::DIELoc::setSize(), and llvm::ArrayRef< T >::size().
Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneBlockAttr().
|
inline |
Adds specified location list attribute to the current DIE.
Definition at line 93 of file DIEGenerator.h.
References addAttribute().
Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneScalarAttr().
|
inline |
Adds specified scalar attribute to the current DIE.
Definition at line 50 of file DIEGenerator.h.
References addAttribute().
Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::clone(), llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneAddressAttr(), llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneDieRefAttr(), llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneScalarAttr(), and llvm::dwarf_linker::parallel::TypeUnit::createDIETree().
|
inline |
Adds string attribute with dummy offset to the current DIE.
Definition at line 109 of file DIEGenerator.h.
References addAttribute(), and assert().
Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneStringAttr(), and llvm::dwarf_linker::parallel::TypeUnit::createDIETree().
|
inline |
Creates a DIE of specified tag DieTag
and OutOffset
.
Definition at line 31 of file DIEGenerator.h.
References Allocator, llvm::DIE::get(), OutputDIE, and llvm::DIE::setOffset().
Referenced by llvm::dwarf_linker::parallel::TypeUnit::createDIETree().
|
inline |
Creates appreviations for the current DIE.
Returns value of abbreviation number. Updates offsets with the size of abbreviation number.
Definition at line 137 of file DIEGenerator.h.
References llvm::dwarf::DW_CHILDREN_yes, llvm::DIE::generateAbbrev(), llvm::DIE::getAbbrevNumber(), llvm::DIEAbbrev::getNumber(), llvm::getULEB128Size(), OutputDIE, llvm::DIE::setAbbrevNumber(), and llvm::DIEAbbrev::setChildrenFlag().
Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::finalizeAbbreviations().
|
inline |
Definition at line 39 of file DIEGenerator.h.
References OutputDIE.
|
protected |
Definition at line 169 of file DIEGenerator.h.
Referenced by addAttribute(), addBlockAttribute(), addInplaceString(), addLocationAttribute(), and createDIE().
|
protected |
Definition at line 172 of file DIEGenerator.h.
|
protected |
Definition at line 175 of file DIEGenerator.h.
Referenced by addAttribute(), addChild(), addInplaceString(), createDIE(), finalizeAbbreviations(), and getDIE().