Lines Matching full:die

42                                        DwarfCompileUnit &CU, DIELoc &DIE)  in DIEDwarfExpression()  argument
43 : DwarfExpression(AP.getDwarfVersion(), CU), AP(AP), OutDIE(DIE) {} in DIEDwarfExpression()
180 /// Check whether the DIE for this MDNode can be shared across CUs.
182 // When the MDNode can be part of the type system, the DIE can be shared in isShareableAcrossCUs()
184 // Combining type units and cross-CU DIE sharing is lower value (since in isShareableAcrossCUs()
185 // cross-CU DIE sharing is used in LTO and removes type redundancy at that in isShareableAcrossCUs()
196 DIE *DwarfUnit::getDIE(const DINode *D) const { in getDIE()
202 void DwarfUnit::insertDIE(const DINode *Desc, DIE *D) { in insertDIE()
210 void DwarfUnit::insertDIE(DIE *D) { in insertDIE()
214 void DwarfUnit::addFlag(DIE &Die, dwarf::Attribute Attribute) { in addFlag() argument
216 addAttribute(Die, Attribute, dwarf::DW_FORM_flag_present, DIEInteger(1)); in addFlag()
218 addAttribute(Die, Attribute, dwarf::DW_FORM_flag, DIEInteger(1)); in addFlag()
221 void DwarfUnit::addUInt(DIEValueList &Die, dwarf::Attribute Attribute, in addUInt() argument
227 addAttribute(Die, Attribute, *Form, DIEInteger(Integer)); in addUInt()
235 void DwarfUnit::addSInt(DIEValueList &Die, dwarf::Attribute Attribute, in addSInt() argument
239 addAttribute(Die, Attribute, *Form, DIEInteger(Integer)); in addSInt()
242 void DwarfUnit::addSInt(DIELoc &Die, std::optional<dwarf::Form> Form, in addSInt() argument
244 addSInt(Die, (dwarf::Attribute)0, Form, Integer); in addSInt()
247 void DwarfUnit::addString(DIE &Die, dwarf::Attribute Attribute, in addString() argument
253 addAttribute(Die, Attribute, dwarf::DW_FORM_string, in addString()
277 addAttribute(Die, Attribute, IxForm, DIEString(StringPoolEntry)); in addString()
280 void DwarfUnit::addLabel(DIEValueList &Die, dwarf::Attribute Attribute, in addLabel() argument
282 addAttribute(Die, Attribute, Form, DIELabel(Label)); in addLabel()
285 void DwarfUnit::addLabel(DIELoc &Die, dwarf::Form Form, const MCSymbol *Label) { in addLabel() argument
286 addLabel(Die, (dwarf::Attribute)0, Form, Label); in addLabel()
289 void DwarfUnit::addSectionOffset(DIE &Die, dwarf::Attribute Attribute, in addSectionOffset() argument
291 addUInt(Die, Attribute, DD->getDwarfSectionOffsetForm(), Integer); in addSectionOffset()
307 void DwarfUnit::addPoolOpAddress(DIEValueList &Die, const MCSymbol *Label) { in addPoolOpAddress() argument
318 addUInt(Die, dwarf::DW_FORM_data1, dwarf::DW_OP_addrx); in addPoolOpAddress()
319 addUInt(Die, dwarf::DW_FORM_addrx, Index); in addPoolOpAddress()
321 addUInt(Die, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_addr_index); in addPoolOpAddress()
322 addUInt(Die, dwarf::DW_FORM_GNU_addr_index, Index); in addPoolOpAddress()
326 addUInt(Die, dwarf::DW_FORM_data1, dwarf::DW_OP_const4u); in addPoolOpAddress()
327 addLabelDelta(Die, (dwarf::Attribute)0, Label, Base); in addPoolOpAddress()
328 addUInt(Die, dwarf::DW_FORM_data1, dwarf::DW_OP_plus); in addPoolOpAddress()
332 void DwarfUnit::addOpAddress(DIELoc &Die, const MCSymbol *Sym) { in addOpAddress() argument
334 addPoolOpAddress(Die, Sym); in addOpAddress()
339 addPoolOpAddress(Die, Sym); in addOpAddress()
343 addUInt(Die, dwarf::DW_FORM_data1, dwarf::DW_OP_addr); in addOpAddress()
344 addLabel(Die, dwarf::DW_FORM_addr, Sym); in addOpAddress()
347 void DwarfUnit::addLabelDelta(DIEValueList &Die, dwarf::Attribute Attribute, in addLabelDelta() argument
349 addAttribute(Die, Attribute, dwarf::DW_FORM_data4, in addLabelDelta()
353 void DwarfUnit::addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIE &Entry) { in addDIEEntry() argument
354 addDIEEntry(Die, Attribute, DIEEntry(Entry)); in addDIEEntry()
357 void DwarfUnit::addDIETypeSignature(DIE &Die, uint64_t Signature) { in addDIETypeSignature() argument
362 addFlag(Die, dwarf::DW_AT_declaration); in addDIETypeSignature()
364 addAttribute(Die, dwarf::DW_AT_signature, dwarf::DW_FORM_ref_sig8, in addDIETypeSignature()
368 void DwarfUnit::addDIEEntry(DIE &Die, dwarf::Attribute Attribute, in addDIEEntry() argument
370 const DIEUnit *CU = Die.getUnit(); in addDIEEntry()
373 // We assume that Die belongs to this CU, if it is not linked to any CU yet. in addDIEEntry()
379 addAttribute(Die, Attribute, in addDIEEntry()
384 DIE &DwarfUnit::createAndAddDIE(dwarf::Tag Tag, DIE &Parent, const DINode *N) { in createAndAddDIE()
385 DIE &Die = Parent.addChild(DIE::get(DIEValueAllocator, Tag)); in createAndAddDIE() local
387 insertDIE(N, &Die); in createAndAddDIE()
388 return Die; in createAndAddDIE()
391 void DwarfUnit::addBlock(DIE &Die, dwarf::Attribute Attribute, DIELoc *Loc) { in addBlock() argument
394 addAttribute(Die, Attribute, Loc->BestForm(DD->getDwarfVersion()), Loc); in addBlock()
397 void DwarfUnit::addBlock(DIE &Die, dwarf::Attribute Attribute, dwarf::Form Form, in addBlock() argument
401 addAttribute(Die, Attribute, Form, Block); in addBlock()
404 void DwarfUnit::addBlock(DIE &Die, dwarf::Attribute Attribute, in addBlock() argument
406 addBlock(Die, Attribute, Block->BestForm(), Block); in addBlock()
409 void DwarfUnit::addSourceLine(DIE &Die, unsigned Line, const DIFile *File) { in addSourceLine() argument
414 addUInt(Die, dwarf::DW_AT_decl_file, std::nullopt, FileID); in addSourceLine()
415 addUInt(Die, dwarf::DW_AT_decl_line, std::nullopt, Line); in addSourceLine()
418 void DwarfUnit::addSourceLine(DIE &Die, const DILocalVariable *V) { in addSourceLine() argument
421 addSourceLine(Die, V->getLine(), V->getFile()); in addSourceLine()
424 void DwarfUnit::addSourceLine(DIE &Die, const DIGlobalVariable *G) { in addSourceLine() argument
427 addSourceLine(Die, G->getLine(), G->getFile()); in addSourceLine()
430 void DwarfUnit::addSourceLine(DIE &Die, const DISubprogram *SP) { in addSourceLine() argument
433 addSourceLine(Die, SP->getLine(), SP->getFile()); in addSourceLine()
436 void DwarfUnit::addSourceLine(DIE &Die, const DILabel *L) { in addSourceLine() argument
439 addSourceLine(Die, L->getLine(), L->getFile()); in addSourceLine()
442 void DwarfUnit::addSourceLine(DIE &Die, const DIType *Ty) { in addSourceLine() argument
445 addSourceLine(Die, Ty->getLine(), Ty->getFile()); in addSourceLine()
448 void DwarfUnit::addSourceLine(DIE &Die, const DIObjCProperty *Ty) { in addSourceLine() argument
451 addSourceLine(Die, Ty->getLine(), Ty->getFile()); in addSourceLine()
454 void DwarfUnit::addConstantFPValue(DIE &Die, const ConstantFP *CFP) { in addConstantFPValue() argument
456 addConstantValue(Die, CFP->getValueAPF().bitcastToAPInt(), true); in addConstantFPValue()
459 void DwarfUnit::addConstantValue(DIE &Die, const ConstantInt *CI, in addConstantValue() argument
461 addConstantValue(Die, CI->getValue(), Ty); in addConstantValue()
464 void DwarfUnit::addConstantValue(DIE &Die, uint64_t Val, const DIType *Ty) { in addConstantValue() argument
465 addConstantValue(Die, DD->isUnsignedDIType(Ty), Val); in addConstantValue()
468 void DwarfUnit::addConstantValue(DIE &Die, bool Unsigned, uint64_t Val) { in addConstantValue() argument
471 addUInt(Die, dwarf::DW_AT_const_value, in addConstantValue()
475 void DwarfUnit::addConstantValue(DIE &Die, const APInt &Val, const DIType *Ty) { in addConstantValue() argument
476 addConstantValue(Die, Val, DD->isUnsignedDIType(Ty)); in addConstantValue()
479 void DwarfUnit::addConstantValue(DIE &Die, const APInt &Val, bool Unsigned) { in addConstantValue() argument
482 addConstantValue(Die, Unsigned, in addConstantValue()
505 addBlock(Die, dwarf::DW_AT_const_value, Block); in addConstantValue()
508 void DwarfUnit::addLinkageName(DIE &Die, StringRef LinkageName) { in addLinkageName() argument
510 addString(Die, in addLinkageName()
516 void DwarfUnit::addTemplateParams(DIE &Buffer, DINodeArray TParams) { in addTemplateParams()
527 void DwarfUnit::addThrownTypes(DIE &Die, DINodeArray ThrownTypes) { in addThrownTypes() argument
529 DIE &TT = createAndAddDIE(dwarf::DW_TAG_thrown_type, Die); in addThrownTypes()
534 void DwarfUnit::addAccess(DIE &Die, DINode::DIFlags Flags) { in addAccess() argument
536 addUInt(Die, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1, in addAccess()
539 addUInt(Die, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1, in addAccess()
542 addUInt(Die, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1, in addAccess()
546 DIE *DwarfUnit::getOrCreateContextDIE(const DIScope *Context) { in getOrCreateContextDIE()
560 DIE *DwarfUnit::createTypeDIE(const DICompositeType *Ty) { in createTypeDIE()
562 DIE *ContextDIE = getOrCreateContextDIE(Context); in createTypeDIE()
564 if (DIE *TyDIE = getDIE(Ty)) in createTypeDIE()
568 DIE &TyDIE = createAndAddDIE(Ty->getTag(), *ContextDIE, Ty); in createTypeDIE()
576 DIE *DwarfUnit::createTypeDIE(const DIScope *Context, DIE &ContextDIE, in createTypeDIE()
579 DIE &TyDIE = createAndAddDIE(Ty->getTag(), ContextDIE, Ty); in createTypeDIE()
612 DIE *DwarfUnit::getOrCreateTypeDIE(const MDNode *TyNode) { in getOrCreateTypeDIE()
626 // Construct the context before querying for the existence of the DIE in case in getOrCreateTypeDIE()
627 // such construction creates the DIE. in getOrCreateTypeDIE()
629 DIE *ContextDIE = getOrCreateContextDIE(Context); in getOrCreateTypeDIE()
632 if (DIE *TyDIE = getDIE(Ty)) in getOrCreateTypeDIE()
640 const DIType *Ty, const DIE &TyDIE) { in updateAcceleratorTables()
661 void DwarfUnit::addGlobalType(const DIType *Ty, const DIE &TyDIE, in addGlobalType()
668 void DwarfUnit::addType(DIE &Entity, const DIType *Ty, in addType()
708 void DwarfUnit::constructTypeDIE(DIE &Buffer, const DIBasicType *BTy) { in constructTypeDIE()
732 void DwarfUnit::constructTypeDIE(DIE &Buffer, const DIStringType *STy) { in constructTypeDIE()
773 void DwarfUnit::constructTypeDIE(DIE &Buffer, const DIDerivedType *DTy) { in constructTypeDIE()
791 // attribute in DW_TAG_typedef DIE. in constructTypeDIE()
841 void DwarfUnit::constructSubprogramArguments(DIE &Buffer, DITypeRefArray Args) { in constructSubprogramArguments()
848 DIE &Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, Buffer); in constructSubprogramArguments()
856 void DwarfUnit::constructTypeDIE(DIE &Buffer, const DISubroutineType *CTy) { in constructTypeDIE()
886 void DwarfUnit::addAnnotation(DIE &Buffer, DINodeArray Annotations) { in addAnnotation()
895 DIE &AnnotationDie = createAndAddDIE(dwarf::DW_TAG_LLVM_annotation, Buffer); in addAnnotation()
907 void DwarfUnit::constructTypeDIE(DIE &Buffer, const DICompositeType *CTy) { in constructTypeDIE()
935 DIE &DiscMember = constructMemberDIE(Buffer, Discriminator); in constructTypeDIE()
954 DIE &ElemDie = createAndAddDIE(dwarf::DW_TAG_friend, Buffer); in constructTypeDIE()
961 DIE &Variant = createAndAddDIE(dwarf::DW_TAG_variant, Buffer); in constructTypeDIE()
976 DIE &ElemDie = createAndAddDIE(Property->getTag(), Buffer); in constructTypeDIE()
993 DIE &VariantPart = createAndAddDIE(Composite->getTag(), Buffer); in constructTypeDIE()
1000 DIE &ItemDie = createAndAddDIE(dwarf::DW_TAG_namelist_item, Buffer); in constructTypeDIE()
1085 DIE &Buffer, const DITemplateTypeParameter *TP) { in constructTemplateTypeParameterDIE()
1086 DIE &ParamDIE = in constructTemplateTypeParameterDIE()
1098 DIE &Buffer, const DITemplateValueParameter *VP) { in constructTemplateValueParameterDIE()
1099 DIE &ParamDIE = createAndAddDIE(VP->getTag(), Buffer); in constructTemplateValueParameterDIE()
1135 DIE *DwarfUnit::getOrCreateNameSpace(const DINamespace *NS) { in getOrCreateNameSpace()
1136 // Construct the context before querying for the existence of the DIE in case in getOrCreateNameSpace()
1137 // such construction creates the DIE. in getOrCreateNameSpace()
1138 DIE *ContextDIE = getOrCreateContextDIE(NS->getScope()); in getOrCreateNameSpace()
1140 if (DIE *NDie = getDIE(NS)) in getOrCreateNameSpace()
1142 DIE &NDie = createAndAddDIE(dwarf::DW_TAG_namespace, *ContextDIE, NS); in getOrCreateNameSpace()
1156 DIE *DwarfUnit::getOrCreateModule(const DIModule *M) { in getOrCreateModule()
1157 // Construct the context before querying for the existence of the DIE in case in getOrCreateModule()
1158 // such construction creates the DIE. in getOrCreateModule()
1159 DIE *ContextDIE = getOrCreateContextDIE(M->getScope()); in getOrCreateModule()
1161 if (DIE *MDie = getDIE(M)) in getOrCreateModule()
1163 DIE &MDie = createAndAddDIE(dwarf::DW_TAG_module, *ContextDIE, M); in getOrCreateModule()
1187 DIE *DwarfUnit::getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal) { in getOrCreateSubprogramDIE()
1188 // Construct the context before querying for the existence of the DIE in case in getOrCreateSubprogramDIE()
1189 // such construction creates the DIE (as is the case for member function in getOrCreateSubprogramDIE()
1191 DIE *ContextDIE = in getOrCreateSubprogramDIE()
1194 if (DIE *SPDie = getDIE(SP)) in getOrCreateSubprogramDIE()
1199 // Add subprogram definitions to the CU die directly. in getOrCreateSubprogramDIE()
1206 // DW_TAG_inlined_subroutine may refer to this DIE. in getOrCreateSubprogramDIE()
1207 DIE &SPDie = createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, SP); in getOrCreateSubprogramDIE()
1220 DIE &SPDie, bool Minimal) { in applySubprogramDefinitionAttributes()
1221 DIE *DeclDie = nullptr; in applySubprogramDefinitionAttributes()
1234 assert(DeclDie && "This DIE should've already been constructed when the " in applySubprogramDefinitionAttributes()
1235 "definition DIE was created in " in applySubprogramDefinitionAttributes()
1272 void DwarfUnit::applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie, in applySubprogramAttributes()
1386 void DwarfUnit::constructSubrangeDIE(DIE &Buffer, const DISubrange *SR, in constructSubrangeDIE()
1387 DIE *IndexTy) { in constructSubrangeDIE()
1388 DIE &DW_Subrange = createAndAddDIE(dwarf::DW_TAG_subrange_type, Buffer); in constructSubrangeDIE()
1427 void DwarfUnit::constructGenericSubrangeDIE(DIE &Buffer, in constructGenericSubrangeDIE()
1429 DIE *IndexTy) { in constructGenericSubrangeDIE()
1430 DIE &DwGenericSubrange = in constructGenericSubrangeDIE()
1465 DIE *DwarfUnit::getIndexTyDie() { in getIndexTyDie()
1510 void DwarfUnit::constructArrayTypeDIE(DIE &Buffer, const DICompositeType *CTy) { in constructArrayTypeDIE()
1568 DIE *IdxTy = getIndexTyDie(); in constructArrayTypeDIE()
1584 void DwarfUnit::constructEnumTypeDIE(DIE &Buffer, const DICompositeType *CTy) { in constructEnumTypeDIE()
1603 DIE &Enumerator = createAndAddDIE(dwarf::DW_TAG_enumerator, Buffer); in constructEnumTypeDIE()
1615 DIE &SPDie = *P.first; in constructContainingTypeDIEs()
1619 DIE *NDie = getDIE(D); in constructContainingTypeDIEs()
1626 DIE &DwarfUnit::constructMemberDIE(DIE &Buffer, const DIDerivedType *DT) { in constructMemberDIE()
1627 DIE &MemberDie = createAndAddDIE(DT->getTag(), Buffer); in constructMemberDIE()
1735 if (DIE *PDie = getDIE(PNode)) in constructMemberDIE()
1745 DIE *DwarfUnit::getOrCreateStaticMemberDIE(const DIDerivedType *DT) { in getOrCreateStaticMemberDIE()
1749 // Construct the context before querying for the existence of the DIE in case in getOrCreateStaticMemberDIE()
1750 // such construction creates the DIE. in getOrCreateStaticMemberDIE()
1751 DIE *ContextDIE = getOrCreateContextDIE(DT->getScope()); in getOrCreateStaticMemberDIE()
1755 if (DIE *StaticMemberDIE = getDIE(DT)) in getOrCreateStaticMemberDIE()
1758 DIE &StaticMemberDIE = createAndAddDIE(DT->getTag(), *ContextDIE, DT); in getOrCreateStaticMemberDIE()
1832 Asm->OutStreamer->AddComment("Type DIE Offset"); in emitHeader()
1833 // In a skeleton type unit there is no type DIE so emit a zero offset. in emitHeader()
1837 void DwarfUnit::addSectionDelta(DIE &Die, dwarf::Attribute Attribute, in addSectionDelta() argument
1839 addAttribute(Die, Attribute, DD->getDwarfSectionOffsetForm(), in addSectionDelta()
1843 void DwarfUnit::addSectionLabel(DIE &Die, dwarf::Attribute Attribute, in addSectionLabel() argument
1846 addLabel(Die, Attribute, DD->getDwarfSectionOffsetForm(), Label); in addSectionLabel()
1848 addSectionDelta(Die, Attribute, Label, Sec); in addSectionLabel()
1857 void DwarfTypeUnit::addGlobalName(StringRef Name, const DIE &Die, in addGlobalName() argument
1862 void DwarfTypeUnit::addGlobalTypeImpl(const DIType *Ty, const DIE &Die, in addGlobalTypeImpl() argument
1891 void DwarfTypeUnit::finishNonUnitTypeDIE(DIE& D, const DICompositeType *CTy) { in finishNonUnitTypeDIE()