Lines Matching defs:Die
153 bool DWARFLinker::DIECloner::getDIENames(const DWARFDie &Die,
160 if (Die.getTag() == dwarf::DW_TAG_lexical_block)
164 if (const char *MangledName = Die.getLinkageName())
168 if (const char *Name = Die.getShortName())
245 /// but the Type and Die fields are optional based on the type.
247 DWARFDie Die;
256 ContextWorklistItem(DWARFDie Die, ContextWorklistItemType T,
258 : Die(Die), ParentIdx(0), OtherInfo(OtherInfo), Type(T),
261 ContextWorklistItem(DWARFDie Die, DeclContext *Context, unsigned ParentIdx,
263 : Die(Die), ParentIdx(ParentIdx), Context(Context),
268 static bool updatePruning(const DWARFDie &Die, CompileUnit &CU,
270 CompileUnit::DIEInfo &Info = CU.getInfo(Die);
275 Info.Prune &= (Die.getTag() == dwarf::DW_TAG_module) ||
276 (isTypeTag(Die.getTag()) &&
277 dwarf::toUnsigned(Die.find(dwarf::DW_AT_declaration), 0));
290 static void updateChildPruning(const DWARFDie &Die, CompileUnit &CU,
292 CompileUnit::DIEInfo &Info = CU.getInfo(Die);
320 updatePruning(Current.Die, CU, ModulesEndOffset);
323 updateChildPruning(Current.Die, CU, *Current.OtherInfo);
329 unsigned Idx = CU.getOrigUnit().getDIEIndex(Current.Die);
344 if (Current.Die.getTag() == dwarf::DW_TAG_module &&
346 dwarf::toString(Current.Die.find(dwarf::DW_AT_name), "") !=
349 analyzeImportedModule(Current.Die, CU, ParseableSwiftInterfaces,
358 *Current.Context, Current.Die, CU, Info.InModuleScope);
371 Worklist.emplace_back(Current.Die, ContextWorklistItemType::UpdatePruning);
372 for (auto Child : reverse(Current.Die.children())) {
375 Current.Die, ContextWorklistItemType::UpdateChildPruning, &ChildInfo);
648 static void updateChildIncompleteness(const DWARFDie &Die, CompileUnit &CU,
650 switch (Die.getTag()) {
659 CompileUnit::DIEInfo &MyInfo = CU.getInfo(Die);
668 static void updateRefIncompleteness(const DWARFDie &Die, CompileUnit &CU,
670 switch (Die.getTag()) {
681 CompileUnit::DIEInfo &MyInfo = CU.getInfo(Die);
693 const DWARFDie &Die, CompileUnit &CU, unsigned Flags,
700 if (dieNeedsChildrenToBeMeaningful(Die.getTag()))
705 if (!Die.hasChildren() || (Flags & DWARFLinker::TF_ParentWalk))
710 for (auto Child : reverse(Die.children())) {
714 Worklist.emplace_back(Die, CU, WorklistItemType::UpdateChildIncompleteness,
720 static bool isODRCanonicalCandidate(const DWARFDie &Die, CompileUnit &CU) {
721 CompileUnit::DIEInfo &Info = CU.getInfo(Die);
723 if (!Info.Ctxt || (Die.getTag() == dwarf::DW_TAG_namespace))
732 void DWARFLinker::markODRCanonicalDie(const DWARFDie &Die, CompileUnit &CU) {
733 CompileUnit::DIEInfo &Info = CU.getInfo(Die);
736 if (Info.Keep && isODRCanonicalCandidate(Die, CU) &&
744 const DWARFDie &Die, CompileUnit &CU, unsigned Flags,
752 const auto *Abbrev = Die.getAbbreviationDeclarationPtr();
753 uint64_t Offset = Die.getOffset() + getULEB128Size(Abbrev->getCode());
768 resolveDIEReference(File, Units, Val, Die, ReferencedCU)) {
801 Worklist.emplace_back(Die, CU, WorklistItemType::UpdateRefIncompleteness,
850 const DWARFDie &Die, const DWARFFile &File,
854 Worklist.emplace_back(Die, Cu, Flags);
862 updateChildIncompleteness(Current.Die, Current.CU, *Current.OtherInfo);
865 updateRefIncompleteness(Current.Die, Current.CU, *Current.OtherInfo);
868 lookForChildDIEsToKeep(Current.Die, Current.CU, Current.Flags, Worklist);
871 lookForRefDIEsToKeep(Current.Die, Current.CU, Current.Flags, Units, File,
879 markODRCanonicalDie(Current.Die, Current.CU);
885 unsigned Idx = Current.CU.getOrigUnit().getDIEIndex(Current.Die);
904 Current.Flags = shouldKeepDIE(AddressesMap, Current.Die, File, Current.CU,
913 Worklist.emplace_back(Current.Die, Current.CU,
920 Worklist.emplace_back(Current.Die, Current.CU, Current.Flags,
932 Current.Die.getTag() != dwarf::DW_TAG_subprogram &&
933 Current.Die.getTag() != dwarf::DW_TAG_member &&
934 dwarf::toUnsigned(Current.Die.find(dwarf::DW_AT_declaration), 0);
939 Worklist.emplace_back(Current.Die, Current.CU, Current.Flags,
1034 unsigned DWARFLinker::DIECloner::cloneStringAttribute(DIE &Die,
1066 return Die
1074 Die.addValue(DIEAlloc, dwarf::Attribute(AttrSpec.Attr), AttrSpec.Form,
1080 DIE &Die, const DWARFDie &InputDIE, AttributeSpec AttrSpec,
1111 Die.addValue(DIEAlloc, dwarf::Attribute(AttrSpec.Attr),
1137 Die.addValue(DIEAlloc, dwarf::Attribute(AttrSpec.Attr),
1144 Die.addValue(DIEAlloc, dwarf::Attribute(AttrSpec.Attr),
1150 Die.addValue(DIEAlloc, dwarf::Attribute(AttrSpec.Attr),
1279 DIE &Die, const DWARFDie &InputDIE, const DWARFFile &File,
1341 return Die.addValue(DIEAlloc, Value)->sizeOf(OrigUnit.getFormParams());
1345 DIE &Die, const DWARFDie &InputDIE, AttributeSpec AttrSpec,
1352 Die.addValue(DIEAlloc, dwarf::Attribute(AttrSpec.Attr),
1357 // Cloned Die may have address attributes relocated to a
1396 Die.addValue(DIEAlloc, static_cast<dwarf::Attribute>(AttrSpec.Attr),
1403 return Die
1410 DIE &Die, const DWARFDie &InputDIE, const DWARFFile &File,
1438 return Die
1461 Die.addValue(DIEAlloc, dwarf::Attribute(AttrSpec.Attr),
1464 Die.addValue(DIEAlloc, dwarf::Attribute(AttrSpec.Attr),
1513 Die.getTag() == dwarf::DW_TAG_compile_unit) {
1533 Die.addValue(DIEAlloc, dwarf::Attribute(AttrSpec.Attr),
1537 Unit.noteRangeAttribute(Die, Patch);
1559 /// value \p Val, and add it to \p Die.
1562 DIE &Die, const DWARFDie &InputDIE, const DWARFFile &File,
1576 return cloneStringAttribute(Die, AttrSpec, Val, U, Info);
1582 return cloneDieReferenceAttribute(Die, InputDIE, AttrSpec, AttrSize, Val,
1589 return cloneBlockAttribute(Die, InputDIE, File, Unit, AttrSpec, Val,
1597 return cloneAddressAttribute(Die, InputDIE, AttrSpec, AttrSize, Val, Unit,
1611 return cloneScalarAttribute(Die, InputDIE, File, Unit, AttrSpec, Val,
1624 const DIE *Die,
1632 Unit.addNameAccelerator(Die, StringPool.getEntry(Names->Selector),
1634 Unit.addObjCAccelerator(Die, StringPool.getEntry(Names->ClassName),
1638 Die, StringPool.getEntry(*Names->ClassNameNoCategory), SkipPubSection);
1641 Die, StringPool.getEntry(*Names->MethodNameNoCategory), SkipPubSection);
1683 DIE *Die) {
1693 assert(!(Die && Info.Clone) && "Can't supply a DIE and a cloned DIE");
1694 if (!Die) {
1699 Die = Info.Clone;
1702 assert(Die->getTag() == InputDIE.getTag());
1703 Die->setOffset(OutOffset);
1742 if (Die->getTag() == dwarf::DW_TAG_subprogram)
1784 cloneAttribute(*Die, InputDIE, File, Unit, Val, AttrSpec, AttrSize,
1800 Die->addValue(DIEAlloc, dwarf::Attribute(dwarf::DW_AT_APPLE_origin),
1815 Unit.addNameAccelerator(Die, AttrInfo.MangledName,
1819 Unit.addNameAccelerator(Die, AttrInfo.NameWithoutTemplate,
1821 Unit.addNameAccelerator(Die, AttrInfo.Name,
1825 addObjCAccelerator(Unit, Die, AttrInfo.Name, DebugStrPool,
1831 Unit.addNamespaceAccelerator(Die, AttrInfo.Name);
1833 Unit.addNamespaceAccelerator(Die, AttrInfo.Name);
1846 Unit.addTypeAccelerator(Die, AttrInfo.Name, ObjCClassIsImplementation,
1861 Die->getTag() == dwarf::DW_TAG_compile_unit) {
1863 Die->addValue(DIEAlloc, dwarf::DW_AT_str_offsets_base,
1868 DIEAbbrev NewAbbrev = Die->generateAbbrev();
1873 Die->setAbbrevNumber(NewAbbrev.getNumber());
1875 uint64_t AbbrevNumberSize = getULEB128Size(Die->getAbbrevNumber());
1891 Die->setSize(OutOffset - Die->getOffset());
1892 return Die;
1899 Die->addChild(Clone);
1907 Die->setSize(OutOffset - Die->getOffset());
1908 return Die;
2037 static void patchAddrBase(DIE &Die, DIEInteger Offset) {
2038 for (auto &V : Die.values())
2099 static void patchStmtList(DIE &Die, DIEInteger Offset) {
2100 for (auto &V : Die.values())
2236 AppleNamespaces.addName(Namespace.Name, Namespace.Die->getOffset() +
2241 Pubname.Die->getOffset() + Unit.getStartOffset());
2245 Pubtype.Name, Pubtype.Die->getOffset() + Unit.getStartOffset(),
2246 Pubtype.Die->getTag(),
2253 ObjC.Die->getOffset() + Unit.getStartOffset());
2262 Namespace.Name, Namespace.Die->getOffset(),
2263 DWARF5AccelTableData::getDefiningParentDieOffset(*Namespace.Die),
2264 Namespace.Die->getTag(), Unit.getUniqueID(),
2268 Pubname.Name, Pubname.Die->getOffset(),
2269 DWARF5AccelTableData::getDefiningParentDieOffset(*Pubname.Die),
2270 Pubname.Die->getTag(), Unit.getUniqueID(),
2274 Pubtype.Name, Pubtype.Die->getOffset(),
2275 DWARF5AccelTableData::getDefiningParentDieOffset(*Pubtype.Die),
2276 Pubtype.Die->getTag(), Unit.getUniqueID(),
2408 DWARFDie Die = OrigUnit->getDIEAtIndex(CU->getInfo(Idx).ParentIdx);
2412 hashFullyQualifiedName(Die, *CU, File, ++ChildRecurseDepth)));