Lines Matching refs:DIE
31 void DwarfCompileUnit::addLabelAddress(DIE &Die, dwarf::Attribute Attribute,
40 return addLocalLabelAddress(Die, Attribute, Label);
46 Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_GNU_addr_index,
50 void DwarfCompileUnit::addLocalLabelAddress(DIE &Die,
57 Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_addr,
60 Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_addr,
103 /// getOrCreateGlobalVariableDIE - get or create global variable DIE.
104 DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(
107 if (DIE *Die = getDIE(GV))
108 return Die;
115 // Construct the context before querying for the existence of the DIE in
116 // case such construction creates the DIE.
117 DIE *ContextDIE = getOrCreateContextDIE(GVContext);
120 DIE *VariableDIE = &createAndAddDIE(GV->getTag(), *ContextDIE, GV);
126 // We need the declaration DIE that is in the static member's class.
127 DIE *VariableSpecDIE = getOrCreateStaticMemberDIE(SDMDecl);
248 DIE::value_iterator
249 DwarfCompileUnit::addSectionLabel(DIE &Die, dwarf::Attribute Attribute,
252 return addLabel(Die, Attribute,
256 return addSectionDelta(Die, Attribute, Label, Sec);
275 void DwarfCompileUnit::applyStmtList(DIE &D) {
279 void DwarfCompileUnit::attachLowHighPC(DIE &D, const MCSymbol *Begin,
293 // Find DIE for the given subprogram and attach appropriate DW_AT_low_pc
296 DIE &DwarfCompileUnit::updateSubprogramScopeDIE(const DISubprogram *SP) {
297 DIE *SPDie = getOrCreateSubprogramDIE(SP, includeMinimalInlineScopes());
320 // Construct a DIE for this scope.
322 LexicalScope *Scope, SmallVectorImpl<DIE *> &FinalChildren) {
333 SmallVector<DIE *, 8> Children;
335 // We try to create the scope DIE first, then the children DIEs. This will
337 // the scope DIE is null.
338 DIE *ScopeDIE;
343 // We create children when the scope DIE is not null.
346 // Early exit when we know the scope DIE is going to be null.
352 // We create children here when we know the scope DIE is not going to be
353 // null and the children will be added to the scope DIE.
358 // There is no need to emit empty lexical block DIE.
373 assert(ScopeDIE && "Scope DIE should not be null.");
383 DIE::value_iterator
384 DwarfCompileUnit::addSectionDelta(DIE &Die, dwarf::Attribute Attribute,
386 return Die.addValue(DIEValueAllocator, Attribute,
392 void DwarfCompileUnit::addScopeRangeList(DIE &ScopeDIE,
417 DIE &Die, SmallVector<RangeSpan, 2> Ranges) {
420 attachLowHighPC(Die, single.getStart(), single.getEnd());
422 addScopeRangeList(Die, std::move(Ranges));
426 DIE &Die, const SmallVectorImpl<InsnRange> &Ranges) {
432 attachRangesOrLowHighPC(Die, std::move(List));
435 // This scope represents inlined body of a function. Construct DIE to
437 DIE *DwarfCompileUnit::constructInlinedScopeDIE(LexicalScope *Scope) {
443 DIE *OriginDIE = DU->getAbstractSPDies()[InlinedSP];
444 assert(OriginDIE && "Unable to find original DIE for an inlined subprogram.");
446 auto ScopeDIE = DIE::get(DIEValueAllocator, dwarf::DW_TAG_inlined_subroutine);
451 // Add the call site information to the DIE.
469 DIE *DwarfCompileUnit::constructLexicalScopeDIE(LexicalScope *Scope) {
473 auto ScopeDIE = DIE::get(DIEValueAllocator, dwarf::DW_TAG_lexical_block);
482 /// constructVariableDIE - Construct a DIE for the given DbgVariable.
483 DIE *DwarfCompileUnit::constructVariableDIE(DbgVariable &DV, bool Abstract) {
489 DIE *DwarfCompileUnit::constructVariableDIEImpl(const DbgVariable &DV,
492 auto VariableDie = DIE::get(DIEValueAllocator, DV.getTag());
563 DIE *DwarfCompileUnit::constructVariableDIE(DbgVariable &DV,
565 DIE *&ObjectPointer) {
572 DIE *DwarfCompileUnit::createScopeChildrenDIE(LexicalScope *Scope,
573 SmallVectorImpl<DIE *> &Children,
575 DIE *ObjectPointer = nullptr;
599 DIE &ScopeDIE = updateSubprogramScopeDIE(Sub);
607 if (DIE *ObjectPointer = createAndAddScopeChildren(Scope, ScopeDIE))
616 DIE::get(DIEValueAllocator, dwarf::DW_TAG_unspecified_parameters));
619 DIE *DwarfCompileUnit::createAndAddScopeChildren(LexicalScope *Scope,
620 DIE &ScopeDIE) {
621 // We create children when the scope DIE is not null.
622 SmallVector<DIE *, 8> Children;
623 DIE *ObjectPointer = createScopeChildrenDIE(Scope, Children);
634 DIE *&AbsDef = DU->getAbstractSPDies()[Scope->getScopeNode()];
640 DIE *ContextDIE;
646 // DIE (since the debug node will be associated with the concrete DIE, if
661 if (DIE *ObjectPointer = createAndAddScopeChildren(Scope, *AbsDef))
665 DIE *DwarfCompileUnit::constructImportedEntityDIE(
667 DIE *IMDie = DIE::get(DIEValueAllocator, (dwarf::Tag)Module->getTag());
669 DIE *EntityDie;
695 DIE *D = getDIE(SP);
696 if (DIE *AbsSPDIE = DU->getAbstractSPDies().lookup(SP)) {
723 void DwarfCompileUnit::addGlobalName(StringRef Name, DIE &Die,
728 GlobalNames[FullName] = &Die;
732 void DwarfCompileUnit::addGlobalType(const DIType *Ty, const DIE &Die,
737 GlobalTypes[FullName] = &Die;
742 void DwarfCompileUnit::addVariableAddress(const DbgVariable &DV, DIE &Die,
745 addComplexAddress(DV, Die, dwarf::DW_AT_location, Location);
747 addBlockByrefAddress(DV, Die, dwarf::DW_AT_location, Location);
749 addAddress(Die, dwarf::DW_AT_location, Location);
752 /// Add an address attribute to a die based on the location provided.
753 void DwarfCompileUnit::addAddress(DIE &Die, dwarf::Attribute Attribute,
766 // Now attach the location information to the DIE.
767 addBlock(Die, Attribute, Loc);
773 /// location. Add the DWARF information to the die.
774 void DwarfCompileUnit::addComplexAddress(const DbgVariable &DV, DIE &Die,
790 // Now attach the location information to the DIE.
792 addBlock(Die, Attribute, Loc);
796 void DwarfCompileUnit::addLocationList(DIE &Die, dwarf::Attribute Attribute,
800 Die.addValue(DIEValueAllocator, Attribute, Form, DIELocList(Index));
804 DIE &VariableDie) {
815 void DwarfCompileUnit::addExpr(DIELoc &Die, dwarf::Form Form,
817 Die.addValue(DIEValueAllocator, (dwarf::Attribute)0, Form, DIEExpr(Expr));
821 const DISubprogram *SP, DIE &SPDie) {