|
LLVM 24.0.0git
|
Stores all information relating to a compile unit, be it in its original instance in the object file to its brand new cloned and generated DIE tree. More...
#include "llvm/DWARFLinker/Classic/DWARFLinkerCompileUnit.h"
Classes | |
| struct | AccelInfo |
| struct | DIEInfo |
| Information gathered about a DIE in the object file. More... | |
Public Member Functions | |
| CompileUnit (DWARFUnit &OrigUnit, const DWARFFile &File, unsigned ID, bool CanUseODR, StringRef ClangModuleName) | |
| DWARFUnit & | getOrigUnit () const |
| const DWARFFile & | getContainingFile () const |
| Returns the input file containing the original unit. | |
| unsigned | getUniqueID () const |
| void | createOutputDIE () |
| DIE * | getOutputUnitDIE () const |
| dwarf::Tag | getTag () const |
| bool | hasODR () const |
| bool | isClangModule () const |
| LLVM_ABI uint16_t | getLanguage () |
| LLVM_ABI StringRef | getSysRoot () |
| Return the DW_AT_LLVM_sysroot of the compile unit or an empty StringRef. | |
| const std::string & | getClangModuleName () const |
| DIEInfo & | getInfo (unsigned Idx) |
| const DIEInfo & | getInfo (unsigned Idx) const |
| DIEInfo & | getInfo (const DWARFDie &Die) |
| uint64_t | getStartOffset () const |
| uint64_t | getNextUnitOffset () const |
| void | setStartOffset (uint64_t DebugInfoSize) |
| std::optional< uint64_t > | getLowPc () const |
| uint64_t | getHighPc () const |
| bool | hasLabelAt (uint64_t Addr) const |
| const RangesTy & | getFunctionRanges () const |
| const RngListAttributesTy & | getRangesAttributes () |
| std::optional< PatchLocation > | getUnitRangesAttribute () const |
| const LocListAttributesTy & | getLocationAttributes () const |
| const StmtSeqListAttributesTy & | getStmtSeqListAttributes () const |
| LLVM_ABI void | markEverythingAsKept () |
| Mark every DIE in this unit as kept. | |
| LLVM_ABI uint64_t | computeNextUnitOffset (uint16_t DwarfVersion) |
| Compute the end offset for this unit. | |
| LLVM_ABI void | noteForwardReference (DIE *Die, const CompileUnit *RefUnit, DeclContext *Ctxt, PatchLocation Attr) |
Keep track of a forward reference to DIE Die in RefUnit by Attr. | |
| LLVM_ABI void | fixupForwardReferences () |
| Apply all fixups recorded by noteForwardReference(). | |
| LLVM_ABI void | addLabelLowPc (uint64_t LabelLowPc, int64_t PcOffset) |
Add the low_pc of a label that is relocated by applying offset PCOffset. | |
| LLVM_ABI void | addFunctionRange (uint64_t LowPC, uint64_t HighPC, int64_t PCOffset) |
Add a function range [LowPC, HighPC) that is relocated by applying offset PCOffset. | |
| LLVM_ABI void | noteRangeAttribute (const DIE &Die, PatchLocation Attr) |
| Keep track of a DW_AT_range attribute that we will need to patch up later. | |
| LLVM_ABI void | noteLocationAttribute (PatchLocation Attr) |
| Keep track of a location attribute pointing to a location list in the debug_loc section. | |
| LLVM_ABI void | noteStmtSeqListAttribute (PatchLocation Attr) |
| LLVM_ABI void | addNamespaceAccelerator (const DIE *Die, DwarfStringPoolEntryRef Name) |
| Add a name accelerator entry for Die with Name. | |
| LLVM_ABI void | addNameAccelerator (const DIE *Die, DwarfStringPoolEntryRef Name, bool SkipPubnamesSection=false) |
| Add a name accelerator entry for Die with Name. | |
| LLVM_ABI void | addObjCAccelerator (const DIE *Die, DwarfStringPoolEntryRef Name, bool SkipPubnamesSection=false) |
Add various accelerator entries for Die with Name which is stored in the string table at Offset. | |
| LLVM_ABI void | addTypeAccelerator (const DIE *Die, DwarfStringPoolEntryRef Name, bool ObjcClassImplementation, uint32_t QualifiedNameHash) |
Add a type accelerator entry for Die with Name which is stored in the string table at Offset. | |
| const std::vector< AccelInfo > & | getPubnames () const |
| const std::vector< AccelInfo > & | getPubtypes () const |
| const std::vector< AccelInfo > & | getNamespaces () const |
| const std::vector< AccelInfo > & | getObjC () const |
| MCSymbol * | getLabelBegin () |
| void | setLabelBegin (MCSymbol *S) |
Stores all information relating to a compile unit, be it in its original instance in the object file to its brand new cloned and generated DIE tree.
Definition at line 66 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 111 of file DWARFLinkerCompileUnit.h.
References if().
Referenced by fixupForwardReferences(), and noteForwardReference().
Add a function range [LowPC, HighPC) that is relocated by applying offset PCOffset.
Definition at line 162 of file DWARFLinkerCompileUnit.cpp.
References uint64_t.
| void CompileUnit::addLabelLowPc | ( | uint64_t | LabelLowPc, |
| int64_t | PcOffset ) |
Add the low_pc of a label that is relocated by applying offset PCOffset.
Definition at line 158 of file DWARFLinkerCompileUnit.cpp.
References uint64_t.
| void llvm::CompileUnit::addNameAccelerator | ( | const DIE * | Die, |
| DwarfStringPoolEntryRef | Name, | ||
| bool | SkipPubnamesSection = false ) |
Add a name accelerator entry for Die with Name.
Definition at line 200 of file DWARFLinkerCompileUnit.cpp.
| void llvm::CompileUnit::addNamespaceAccelerator | ( | const DIE * | Die, |
| DwarfStringPoolEntryRef | Name ) |
Add a name accelerator entry for Die with Name.
Definition at line 189 of file DWARFLinkerCompileUnit.cpp.
| void llvm::CompileUnit::addObjCAccelerator | ( | const DIE * | Die, |
| DwarfStringPoolEntryRef | Name, | ||
| bool | SkipPubnamesSection = false ) |
Add various accelerator entries for Die with Name which is stored in the string table at Offset.
Name must be an Objective-C selector.
Definition at line 194 of file DWARFLinkerCompileUnit.cpp.
| void llvm::CompileUnit::addTypeAccelerator | ( | const DIE * | Die, |
| DwarfStringPoolEntryRef | Name, | ||
| bool | ObjcClassImplementation, | ||
| uint32_t | QualifiedNameHash ) |
Add a type accelerator entry for Die with Name which is stored in the string table at Offset.
Definition at line 206 of file DWARFLinkerCompileUnit.cpp.
Compute the end offset for this unit.
Must be called after the CU's DIEs have been cloned.
Definition at line 124 of file DWARFLinkerCompileUnit.cpp.
References uint64_t.
|
inline |
Definition at line 139 of file DWARFLinkerCompileUnit.h.
| void llvm::CompileUnit::fixupForwardReferences | ( | ) |
Apply all fixups recorded by noteForwardReference().
Definition at line 140 of file DWARFLinkerCompileUnit.cpp.
References assert(), CompileUnit(), llvm::dwarf_linker::classic::DeclContext::getCanonicalDIEOffset(), llvm::DIE::getOffset(), getStartOffset(), llvm::dwarf_linker::classic::DeclContext::hasCanonicalDIE(), llvm::Ref, and llvm::dwarf_linker::classic::PatchLocation::set().
|
inline |
Definition at line 161 of file DWARFLinkerCompileUnit.h.
Returns the input file containing the original unit.
Definition at line 135 of file DWARFLinkerCompileUnit.h.
Definition at line 183 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 180 of file DWARFLinkerCompileUnit.h.
References uint64_t.
Definition at line 166 of file DWARFLinkerCompileUnit.h.
References llvm::DWARFUnit::getDIEIndex(), and getOrigUnit().
Definition at line 163 of file DWARFLinkerCompileUnit.h.
Definition at line 164 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 293 of file DWARFLinkerCompileUnit.h.
| uint16_t llvm::CompileUnit::getLanguage | ( | ) |
Definition at line 49 of file DWARFLinkerCompileUnit.cpp.
References llvm::DWARFDie::getLanguage(), getOrigUnit(), and llvm::DWARFUnit::getUnitDIE().
|
inline |
Definition at line 191 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 179 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 290 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 172 of file DWARFLinkerCompileUnit.h.
References uint64_t.
Definition at line 291 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 132 of file DWARFLinkerCompileUnit.h.
Referenced by getInfo(), getLanguage(), and getSysRoot().
|
inline |
Definition at line 147 of file DWARFLinkerCompileUnit.h.
References llvm::DIEUnit::getUnitDie().
|
inline |
Definition at line 288 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 289 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 185 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 171 of file DWARFLinkerCompileUnit.h.
References uint64_t.
Referenced by fixupForwardReferences().
|
inline |
Definition at line 197 of file DWARFLinkerCompileUnit.h.
| StringRef llvm::CompileUnit::getSysRoot | ( | ) |
Return the DW_AT_LLVM_sysroot of the compile unit or an empty StringRef.
Definition at line 56 of file DWARFLinkerCompileUnit.cpp.
References getOrigUnit(), llvm::DWARFUnit::getUnitDIE(), llvm::StringRef::str(), and llvm::dwarf::toStringRef().
|
inline |
Definition at line 153 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 137 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 187 of file DWARFLinkerCompileUnit.h.
Definition at line 181 of file DWARFLinkerCompileUnit.h.
References uint64_t.
|
inline |
Definition at line 155 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 156 of file DWARFLinkerCompileUnit.h.
| void llvm::CompileUnit::markEverythingAsKept | ( | ) |
Mark every DIE in this unit as kept.
This function also marks variables as InDebugMap so that they appear in the reconstructed accelerator tables.
Definition at line 64 of file DWARFLinkerCompileUnit.cpp.
References llvm::Data, llvm::DIE::getTag(), I, llvm::inFunctionScope(), and llvm::dwarf::isTlsAddressOp().
| void llvm::CompileUnit::noteForwardReference | ( | DIE * | Die, |
| const CompileUnit * | RefUnit, | ||
| DeclContext * | Ctxt, | ||
| PatchLocation | Attr ) |
Keep track of a forward reference to DIE Die in RefUnit by Attr.
Keep track of a forward cross-cu reference from this unit to Die that lives in RefUnit.
The attribute should be fixed up later to point to the absolute offset of Die in the debug_info section or to the canonical offset of Ctxt if it is non-null.
Definition at line 135 of file DWARFLinkerCompileUnit.cpp.
References CompileUnit().
| void llvm::CompileUnit::noteLocationAttribute | ( | PatchLocation | Attr | ) |
Keep track of a location attribute pointing to a location list in the debug_loc section.
Definition at line 181 of file DWARFLinkerCompileUnit.cpp.
| void llvm::CompileUnit::noteRangeAttribute | ( | const DIE & | Die, |
| PatchLocation | Attr ) |
Keep track of a DW_AT_range attribute that we will need to patch up later.
Definition at line 172 of file DWARFLinkerCompileUnit.cpp.
References llvm::DIE::getTag().
| void llvm::CompileUnit::noteStmtSeqListAttribute | ( | PatchLocation | Attr | ) |
Definition at line 185 of file DWARFLinkerCompileUnit.cpp.
|
inline |
Definition at line 294 of file DWARFLinkerCompileUnit.h.
|
inline |
Definition at line 173 of file DWARFLinkerCompileUnit.h.
References uint64_t.