Path: blob/main/contrib/llvm-project/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.h
35292 views
//===- DWARFLinkerCompileUnit.h ---------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIB_DWARFLINKER_PARALLEL_DWARFLINKERCOMPILEUNIT_H9#define LLVM_LIB_DWARFLINKER_PARALLEL_DWARFLINKERCOMPILEUNIT_H1011#include "DWARFLinkerUnit.h"12#include "llvm/DWARFLinker/DWARFFile.h"13#include <optional>1415namespace llvm {16namespace dwarf_linker {17namespace parallel {1819using OffsetToUnitTy = function_ref<CompileUnit *(uint64_t Offset)>;2021struct AttributesInfo;22class SyntheticTypeNameBuilder;23class DIEGenerator;24class TypeUnit;25class DependencyTracker;2627class CompileUnit;2829/// This is a helper structure which keeps a debug info entry30/// with it's containing compilation unit.31struct UnitEntryPairTy {32UnitEntryPairTy() = default;33UnitEntryPairTy(CompileUnit *CU, const DWARFDebugInfoEntry *DieEntry)34: CU(CU), DieEntry(DieEntry) {}3536CompileUnit *CU = nullptr;37const DWARFDebugInfoEntry *DieEntry = nullptr;3839UnitEntryPairTy getNamespaceOrigin();40std::optional<UnitEntryPairTy> getParent();41};4243enum ResolveInterCUReferencesMode : bool {44Resolve = true,45AvoidResolving = false,46};4748/// Stores all information related to a compile unit, be it in its original49/// instance of the object file or its brand new cloned and generated DIE tree.50/// NOTE: we need alignment of at least 8 bytes as we use51/// PointerIntPair<CompileUnit *, 3> in the DependencyTracker.h52class alignas(8) CompileUnit : public DwarfUnit {53public:54/// The stages of new compile unit processing.55enum class Stage : uint8_t {56/// Created, linked with input DWARF file.57CreatedNotLoaded = 0,5859/// Input DWARF is loaded.60Loaded,6162/// Input DWARF is analysed(DIEs pointing to the real code section are63/// discovered, type names are assigned if ODR is requested).64LivenessAnalysisDone,6566/// Check if dependencies have incompatible placement.67/// If that is the case modify placement to be compatible.68UpdateDependenciesCompleteness,6970/// Type names assigned to DIEs.71TypeNamesAssigned,7273/// Output DWARF is generated.74Cloned,7576/// Offsets inside patch records are updated.77PatchesUpdated,7879/// Resources(Input DWARF, Output DWARF tree) are released.80Cleaned,8182/// Compile Unit should be skipped83Skipped84};8586CompileUnit(LinkingGlobalData &GlobalData, unsigned ID,87StringRef ClangModuleName, DWARFFile &File,88OffsetToUnitTy UnitFromOffset, dwarf::FormParams Format,89llvm::endianness Endianess);9091CompileUnit(LinkingGlobalData &GlobalData, DWARFUnit &OrigUnit, unsigned ID,92StringRef ClangModuleName, DWARFFile &File,93OffsetToUnitTy UnitFromOffset, dwarf::FormParams Format,94llvm::endianness Endianess);9596/// Returns stage of overall processing.97Stage getStage() const { return Stage; }9899/// Set stage of overall processing.100void setStage(Stage Stage) { this->Stage = Stage; }101102/// Loads unit line table.103void loadLineTable();104105/// Returns name of the file for the \p FileIdx106/// from the unit`s line table.107StringEntry *getFileName(unsigned FileIdx, StringPool &GlobalStrings);108109/// Returns DWARFFile containing this compile unit.110const DWARFFile &getContaingFile() const { return File; }111112/// Load DIEs of input compilation unit. \returns true if input DIEs113/// successfully loaded.114bool loadInputDIEs();115116/// Reset compile units data(results of liveness analysis, clonning)117/// if current stage greater than Stage::Loaded. We need to reset data118/// as we are going to repeat stages.119void maybeResetToLoadedStage();120121/// Collect references to parseable Swift interfaces in imported122/// DW_TAG_module blocks.123void analyzeImportedModule(const DWARFDebugInfoEntry *DieEntry);124125/// Navigate DWARF tree and set die properties.126void analyzeDWARFStructure() {127analyzeDWARFStructureRec(getUnitDIE().getDebugInfoEntry(), false);128}129130/// Cleanup unneeded resources after compile unit is cloned.131void cleanupDataAfterClonning();132133/// After cloning stage the output DIEs offsets are deallocated.134/// This method copies output offsets for referenced DIEs into DIEs patches.135void updateDieRefPatchesWithClonedOffsets();136137/// Search for subprograms and variables referencing live code and discover138/// dependend DIEs. Mark live DIEs, set placement for DIEs.139bool resolveDependenciesAndMarkLiveness(140bool InterCUProcessingStarted,141std::atomic<bool> &HasNewInterconnectedCUs);142143/// Check dependend DIEs for incompatible placement.144/// Make placement to be consistent.145bool updateDependenciesCompleteness();146147/// Check DIEs to have a consistent marking(keep marking, placement marking).148void verifyDependencies();149150/// Search for type entries and assign names.151Error assignTypeNames(TypePool &TypePoolRef);152153/// Kinds of placement for the output die.154enum DieOutputPlacement : uint8_t {155NotSet = 0,156157/// Corresponding DIE goes to the type table only.158TypeTable = 1,159160/// Corresponding DIE goes to the plain dwarf only.161PlainDwarf = 2,162163/// Corresponding DIE goes to type table and to plain dwarf.164Both = 3,165};166167/// Information gathered about source DIEs.168struct DIEInfo {169DIEInfo() = default;170DIEInfo(const DIEInfo &Other) { Flags = Other.Flags.load(); }171DIEInfo &operator=(const DIEInfo &Other) {172Flags = Other.Flags.load();173return *this;174}175176/// Data member keeping various flags.177std::atomic<uint16_t> Flags = {0};178179/// \returns Placement kind for the corresponding die.180DieOutputPlacement getPlacement() const {181return DieOutputPlacement(Flags & 0x7);182}183184/// Sets Placement kind for the corresponding die.185void setPlacement(DieOutputPlacement Placement) {186auto InputData = Flags.load();187while (!Flags.compare_exchange_weak(InputData,188((InputData & ~0x7) | Placement))) {189}190}191192/// Unsets Placement kind for the corresponding die.193void unsetPlacement() {194auto InputData = Flags.load();195while (!Flags.compare_exchange_weak(InputData, (InputData & ~0x7))) {196}197}198199/// Sets Placement kind for the corresponding die.200bool setPlacementIfUnset(DieOutputPlacement Placement) {201auto InputData = Flags.load();202if ((InputData & 0x7) == NotSet)203if (Flags.compare_exchange_weak(InputData, (InputData | Placement)))204return true;205206return false;207}208209#define SINGLE_FLAG_METHODS_SET(Name, Value) \210bool get##Name() const { return Flags & Value; } \211void set##Name() { \212auto InputData = Flags.load(); \213while (!Flags.compare_exchange_weak(InputData, InputData | Value)) { \214} \215} \216void unset##Name() { \217auto InputData = Flags.load(); \218while (!Flags.compare_exchange_weak(InputData, InputData & ~Value)) { \219} \220}221222/// DIE is a part of the linked output.223SINGLE_FLAG_METHODS_SET(Keep, 0x08)224225/// DIE has children which are part of the linked output.226SINGLE_FLAG_METHODS_SET(KeepPlainChildren, 0x10)227228/// DIE has children which are part of the type table.229SINGLE_FLAG_METHODS_SET(KeepTypeChildren, 0x20)230231/// DIE is in module scope.232SINGLE_FLAG_METHODS_SET(IsInMouduleScope, 0x40)233234/// DIE is in function scope.235SINGLE_FLAG_METHODS_SET(IsInFunctionScope, 0x80)236237/// DIE is in anonymous namespace scope.238SINGLE_FLAG_METHODS_SET(IsInAnonNamespaceScope, 0x100)239240/// DIE is available for ODR type deduplication.241SINGLE_FLAG_METHODS_SET(ODRAvailable, 0x200)242243/// Track liveness for the DIE.244SINGLE_FLAG_METHODS_SET(TrackLiveness, 0x400)245246/// Track liveness for the DIE.247SINGLE_FLAG_METHODS_SET(HasAnAddress, 0x800)248249void unsetFlagsWhichSetDuringLiveAnalysis() {250auto InputData = Flags.load();251while (!Flags.compare_exchange_weak(252InputData, InputData & ~(0x7 | 0x8 | 0x10 | 0x20))) {253}254}255256/// Erase all flags.257void eraseData() { Flags = 0; }258259#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)260LLVM_DUMP_METHOD void dump();261#endif262263bool needToPlaceInTypeTable() const {264return (getKeep() && (getPlacement() == CompileUnit::TypeTable ||265getPlacement() == CompileUnit::Both)) ||266getKeepTypeChildren();267}268269bool needToKeepInPlainDwarf() const {270return (getKeep() && (getPlacement() == CompileUnit::PlainDwarf ||271getPlacement() == CompileUnit::Both)) ||272getKeepPlainChildren();273}274};275276/// \defgroup Group of functions returning DIE info.277///278/// @{279280/// \p Idx index of the DIE.281/// \returns DieInfo descriptor.282DIEInfo &getDIEInfo(unsigned Idx) { return DieInfoArray[Idx]; }283284/// \p Idx index of the DIE.285/// \returns DieInfo descriptor.286const DIEInfo &getDIEInfo(unsigned Idx) const { return DieInfoArray[Idx]; }287288/// \p Idx index of the DIE.289/// \returns DieInfo descriptor.290DIEInfo &getDIEInfo(const DWARFDebugInfoEntry *Entry) {291return DieInfoArray[getOrigUnit().getDIEIndex(Entry)];292}293294/// \p Idx index of the DIE.295/// \returns DieInfo descriptor.296const DIEInfo &getDIEInfo(const DWARFDebugInfoEntry *Entry) const {297return DieInfoArray[getOrigUnit().getDIEIndex(Entry)];298}299300/// \p Die301/// \returns PlainDieInfo descriptor.302DIEInfo &getDIEInfo(const DWARFDie &Die) {303return DieInfoArray[getOrigUnit().getDIEIndex(Die)];304}305306/// \p Die307/// \returns PlainDieInfo descriptor.308const DIEInfo &getDIEInfo(const DWARFDie &Die) const {309return DieInfoArray[getOrigUnit().getDIEIndex(Die)];310}311312/// \p Idx index of the DIE.313/// \returns DieInfo descriptor.314uint64_t getDieOutOffset(uint32_t Idx) {315return reinterpret_cast<std::atomic<uint64_t> *>(&OutDieOffsetArray[Idx])316->load();317}318319/// \p Idx index of the DIE.320/// \returns type entry.321TypeEntry *getDieTypeEntry(uint32_t Idx) {322return reinterpret_cast<std::atomic<TypeEntry *> *>(&TypeEntries[Idx])323->load();324}325326/// \p InputDieEntry debug info entry.327/// \returns DieInfo descriptor.328uint64_t getDieOutOffset(const DWARFDebugInfoEntry *InputDieEntry) {329return reinterpret_cast<std::atomic<uint64_t> *>(330&OutDieOffsetArray[getOrigUnit().getDIEIndex(InputDieEntry)])331->load();332}333334/// \p InputDieEntry debug info entry.335/// \returns type entry.336TypeEntry *getDieTypeEntry(const DWARFDebugInfoEntry *InputDieEntry) {337return reinterpret_cast<std::atomic<TypeEntry *> *>(338&TypeEntries[getOrigUnit().getDIEIndex(InputDieEntry)])339->load();340}341342/// \p Idx index of the DIE.343/// \returns DieInfo descriptor.344void rememberDieOutOffset(uint32_t Idx, uint64_t Offset) {345reinterpret_cast<std::atomic<uint64_t> *>(&OutDieOffsetArray[Idx])346->store(Offset);347}348349/// \p Idx index of the DIE.350/// \p Type entry.351void setDieTypeEntry(uint32_t Idx, TypeEntry *Entry) {352reinterpret_cast<std::atomic<TypeEntry *> *>(&TypeEntries[Idx])353->store(Entry);354}355356/// \p InputDieEntry debug info entry.357/// \p Type entry.358void setDieTypeEntry(const DWARFDebugInfoEntry *InputDieEntry,359TypeEntry *Entry) {360reinterpret_cast<std::atomic<TypeEntry *> *>(361&TypeEntries[getOrigUnit().getDIEIndex(InputDieEntry)])362->store(Entry);363}364365/// @}366367/// Returns value of DW_AT_low_pc attribute.368std::optional<uint64_t> getLowPc() const { return LowPc; }369370/// Returns value of DW_AT_high_pc attribute.371uint64_t getHighPc() const { return HighPc; }372373/// Returns true if there is a label corresponding to the specified \p Addr.374bool hasLabelAt(uint64_t Addr) const { return Labels.count(Addr); }375376/// Add the low_pc of a label that is relocated by applying377/// offset \p PCOffset.378void addLabelLowPc(uint64_t LabelLowPc, int64_t PcOffset);379380/// Resolve the DIE attribute reference that has been extracted in \p381/// RefValue. The resulting DIE might be in another CompileUnit.382/// \returns referenced die and corresponding compilation unit.383/// compilation unit is null if reference could not be resolved.384std::optional<UnitEntryPairTy>385resolveDIEReference(const DWARFFormValue &RefValue,386ResolveInterCUReferencesMode CanResolveInterCUReferences);387388std::optional<UnitEntryPairTy>389resolveDIEReference(const DWARFDebugInfoEntry *DieEntry,390dwarf::Attribute Attr,391ResolveInterCUReferencesMode CanResolveInterCUReferences);392393/// @}394395/// Add a function range [\p LowPC, \p HighPC) that is relocated by applying396/// offset \p PCOffset.397void addFunctionRange(uint64_t LowPC, uint64_t HighPC, int64_t PCOffset);398399/// Returns function ranges of this unit.400const RangesTy &getFunctionRanges() const { return Ranges; }401402/// Clone and emit this compilation unit.403Error404cloneAndEmit(std::optional<std::reference_wrapper<const Triple>> TargetTriple,405TypeUnit *ArtificialTypeUnit);406407/// Clone and emit debug locations(.debug_loc/.debug_loclists).408Error cloneAndEmitDebugLocations();409410/// Clone and emit ranges.411Error cloneAndEmitRanges();412413/// Clone and emit debug macros(.debug_macinfo/.debug_macro).414Error cloneAndEmitDebugMacro();415416// Clone input DIE entry.417std::pair<DIE *, TypeEntry *>418cloneDIE(const DWARFDebugInfoEntry *InputDieEntry,419TypeEntry *ClonedParentTypeDIE, uint64_t OutOffset,420std::optional<int64_t> FuncAddressAdjustment,421std::optional<int64_t> VarAddressAdjustment,422BumpPtrAllocator &Allocator, TypeUnit *ArtificialTypeUnit);423424// Clone and emit line table.425Error cloneAndEmitLineTable(const Triple &TargetTriple);426427/// Clone attribute location axpression.428void cloneDieAttrExpression(const DWARFExpression &InputExpression,429SmallVectorImpl<uint8_t> &OutputExpression,430SectionDescriptor &Section,431std::optional<int64_t> VarAddressAdjustment,432OffsetsPtrVector &PatchesOffsets);433434/// Returns index(inside .debug_addr) of an address.435uint64_t getDebugAddrIndex(uint64_t Addr) {436return DebugAddrIndexMap.getValueIndex(Addr);437}438439/// Returns directory and file from the line table by index.440std::optional<std::pair<StringRef, StringRef>>441getDirAndFilenameFromLineTable(const DWARFFormValue &FileIdxValue);442443/// Returns directory and file from the line table by index.444std::optional<std::pair<StringRef, StringRef>>445getDirAndFilenameFromLineTable(uint64_t FileIdx);446447/// \defgroup Helper methods to access OrigUnit.448///449/// @{450451/// Returns paired compile unit from input DWARF.452DWARFUnit &getOrigUnit() const {453assert(OrigUnit != nullptr);454return *OrigUnit;455}456457const DWARFDebugInfoEntry *458getFirstChildEntry(const DWARFDebugInfoEntry *Die) const {459assert(OrigUnit != nullptr);460return OrigUnit->getFirstChildEntry(Die);461}462463const DWARFDebugInfoEntry *464getSiblingEntry(const DWARFDebugInfoEntry *Die) const {465assert(OrigUnit != nullptr);466return OrigUnit->getSiblingEntry(Die);467}468469DWARFDie getParent(const DWARFDebugInfoEntry *Die) {470assert(OrigUnit != nullptr);471return OrigUnit->getParent(Die);472}473474DWARFDie getDIEAtIndex(unsigned Index) {475assert(OrigUnit != nullptr);476return OrigUnit->getDIEAtIndex(Index);477}478479const DWARFDebugInfoEntry *getDebugInfoEntry(unsigned Index) const {480assert(OrigUnit != nullptr);481return OrigUnit->getDebugInfoEntry(Index);482}483484DWARFDie getUnitDIE(bool ExtractUnitDIEOnly = true) {485assert(OrigUnit != nullptr);486return OrigUnit->getUnitDIE(ExtractUnitDIEOnly);487}488489DWARFDie getDIE(const DWARFDebugInfoEntry *Die) {490assert(OrigUnit != nullptr);491return DWARFDie(OrigUnit, Die);492}493494uint32_t getDIEIndex(const DWARFDebugInfoEntry *Die) const {495assert(OrigUnit != nullptr);496return OrigUnit->getDIEIndex(Die);497}498499uint32_t getDIEIndex(const DWARFDie &Die) const {500assert(OrigUnit != nullptr);501return OrigUnit->getDIEIndex(Die);502}503504std::optional<DWARFFormValue> find(uint32_t DieIdx,505ArrayRef<dwarf::Attribute> Attrs) const {506assert(OrigUnit != nullptr);507return find(OrigUnit->getDebugInfoEntry(DieIdx), Attrs);508}509510std::optional<DWARFFormValue> find(const DWARFDebugInfoEntry *Die,511ArrayRef<dwarf::Attribute> Attrs) const {512if (!Die)513return std::nullopt;514auto AbbrevDecl = Die->getAbbreviationDeclarationPtr();515if (AbbrevDecl) {516for (auto Attr : Attrs) {517if (auto Value = AbbrevDecl->getAttributeValue(Die->getOffset(), Attr,518*OrigUnit))519return Value;520}521}522return std::nullopt;523}524525std::optional<uint32_t> getDIEIndexForOffset(uint64_t Offset) {526return OrigUnit->getDIEIndexForOffset(Offset);527}528529/// @}530531/// \defgroup Methods used for reporting warnings and errors:532///533/// @{534535void warn(const Twine &Warning, const DWARFDie *DIE = nullptr) {536GlobalData.warn(Warning, getUnitName(), DIE);537}538539void warn(Error Warning, const DWARFDie *DIE = nullptr) {540handleAllErrors(std::move(Warning), [&](ErrorInfoBase &Info) {541GlobalData.warn(Info.message(), getUnitName(), DIE);542});543}544545void warn(const Twine &Warning, const DWARFDebugInfoEntry *DieEntry) {546if (DieEntry != nullptr) {547DWARFDie DIE(&getOrigUnit(), DieEntry);548GlobalData.warn(Warning, getUnitName(), &DIE);549return;550}551552GlobalData.warn(Warning, getUnitName());553}554555void error(const Twine &Err, const DWARFDie *DIE = nullptr) {556GlobalData.warn(Err, getUnitName(), DIE);557}558559void error(Error Err, const DWARFDie *DIE = nullptr) {560handleAllErrors(std::move(Err), [&](ErrorInfoBase &Info) {561GlobalData.error(Info.message(), getUnitName(), DIE);562});563}564565/// @}566567/// Save specified accelerator info \p Info.568void saveAcceleratorInfo(const DwarfUnit::AccelInfo &Info) {569AcceleratorRecords.add(Info);570}571572/// Enumerates all units accelerator records.573void574forEachAcceleratorRecord(function_ref<void(AccelInfo &)> Handler) override {575AcceleratorRecords.forEach(Handler);576}577578/// Output unit selector.579class OutputUnitVariantPtr {580public:581OutputUnitVariantPtr(CompileUnit *U);582OutputUnitVariantPtr(TypeUnit *U);583584/// Accessor for common functionality.585DwarfUnit *operator->();586587bool isCompileUnit();588589bool isTypeUnit();590591/// Returns CompileUnit if applicable.592CompileUnit *getAsCompileUnit();593594/// Returns TypeUnit if applicable.595TypeUnit *getAsTypeUnit();596597protected:598PointerUnion<CompileUnit *, TypeUnit *> Ptr;599};600601private:602/// Navigate DWARF tree recursively and set die properties.603void analyzeDWARFStructureRec(const DWARFDebugInfoEntry *DieEntry,604bool IsODRUnavailableFunctionScope);605606struct LinkedLocationExpressionsWithOffsetPatches {607DWARFLocationExpression Expression;608OffsetsPtrVector Patches;609};610using LinkedLocationExpressionsVector =611SmallVector<LinkedLocationExpressionsWithOffsetPatches>;612613/// Emit debug locations.614void emitLocations(DebugSectionKind LocationSectionKind);615616/// Emit location list header.617uint64_t emitLocListHeader(SectionDescriptor &OutLocationSection);618619/// Emit location list fragment.620uint64_t emitLocListFragment(621const LinkedLocationExpressionsVector &LinkedLocationExpression,622SectionDescriptor &OutLocationSection);623624/// Emit the .debug_addr section fragment for current unit.625Error emitDebugAddrSection();626627/// Emit .debug_aranges.628void emitAranges(AddressRanges &LinkedFunctionRanges);629630/// Clone and emit .debug_ranges/.debug_rnglists.631void cloneAndEmitRangeList(DebugSectionKind RngSectionKind,632AddressRanges &LinkedFunctionRanges);633634/// Emit range list header.635uint64_t emitRangeListHeader(SectionDescriptor &OutRangeSection);636637/// Emit range list fragment.638void emitRangeListFragment(const AddressRanges &LinkedRanges,639SectionDescriptor &OutRangeSection);640641/// Insert the new line info sequence \p Seq into the current642/// set of already linked line info \p Rows.643void insertLineSequence(std::vector<DWARFDebugLine::Row> &Seq,644std::vector<DWARFDebugLine::Row> &Rows);645646/// Emits body for both macro sections.647void emitMacroTableImpl(const DWARFDebugMacro *MacroTable,648uint64_t OffsetToMacroTable, bool hasDWARFv5Header);649650/// Creates DIE which would be placed into the "Plain" compile unit.651DIE *createPlainDIEandCloneAttributes(652const DWARFDebugInfoEntry *InputDieEntry, DIEGenerator &PlainDIEGenerator,653uint64_t &OutOffset, std::optional<int64_t> &FuncAddressAdjustment,654std::optional<int64_t> &VarAddressAdjustment);655656/// Creates DIE which would be placed into the "Type" compile unit.657TypeEntry *createTypeDIEandCloneAttributes(658const DWARFDebugInfoEntry *InputDieEntry, DIEGenerator &TypeDIEGenerator,659TypeEntry *ClonedParentTypeDIE, TypeUnit *ArtificialTypeUnit);660661/// Create output DIE inside specified \p TypeDescriptor.662DIE *allocateTypeDie(TypeEntryBody *TypeDescriptor,663DIEGenerator &TypeDIEGenerator, dwarf::Tag DieTag,664bool IsDeclaration, bool IsParentDeclaration);665666/// Enumerate \p DieEntry children and assign names for them.667Error assignTypeNamesRec(const DWARFDebugInfoEntry *DieEntry,668SyntheticTypeNameBuilder &NameBuilder);669670/// DWARFFile containing this compile unit.671DWARFFile &File;672673/// Pointer to the paired compile unit from the input DWARF.674DWARFUnit *OrigUnit = nullptr;675676/// The DW_AT_language of this unit.677std::optional<uint16_t> Language;678679/// Line table for this unit.680const DWARFDebugLine::LineTable *LineTablePtr = nullptr;681682/// Cached resolved paths from the line table.683/// The key is <UniqueUnitID, FileIdx>.684using ResolvedPathsMap = DenseMap<unsigned, StringEntry *>;685ResolvedPathsMap ResolvedFullPaths;686StringMap<StringEntry *> ResolvedParentPaths;687688/// Maps an address into the index inside .debug_addr section.689IndexedValuesMap<uint64_t> DebugAddrIndexMap;690691std::unique_ptr<DependencyTracker> Dependencies;692693/// \defgroup Data Members accessed asinchronously.694///695/// @{696OffsetToUnitTy getUnitFromOffset;697698std::optional<uint64_t> LowPc;699uint64_t HighPc = 0;700701/// Flag indicating whether type de-duplication is forbidden.702bool NoODR = true;703704/// The ranges in that map are the PC ranges for functions in this unit,705/// associated with the PC offset to apply to the addresses to get706/// the linked address.707RangesTy Ranges;708std::mutex RangesMutex;709710/// The DW_AT_low_pc of each DW_TAG_label.711using LabelMapTy = SmallDenseMap<uint64_t, uint64_t, 1>;712LabelMapTy Labels;713std::mutex LabelsMutex;714715/// This field keeps current stage of overall compile unit processing.716std::atomic<Stage> Stage;717718/// DIE info indexed by DIE index.719SmallVector<DIEInfo> DieInfoArray;720SmallVector<uint64_t> OutDieOffsetArray;721SmallVector<TypeEntry *> TypeEntries;722723/// The list of accelerator records for this unit.724ArrayList<AccelInfo> AcceleratorRecords;725/// @}726};727728/// \returns list of attributes referencing type DIEs which might be729/// deduplicated.730/// Note: it does not include DW_AT_containing_type attribute to avoid731/// infinite recursion.732ArrayRef<dwarf::Attribute> getODRAttributes();733734} // end of namespace parallel735} // end of namespace dwarf_linker736} // end of namespace llvm737738#endif // LLVM_LIB_DWARFLINKER_PARALLEL_DWARFLINKERCOMPILEUNIT_H739740741