Home | History | Annotate | Download | only in AsmPrinter

Lines Matching refs:DIE

16 #include "DIE.h"
275 void DwarfDebug::addSubprogramNames(DISubprogram SP, DIE &Die) {
278 addAccelName(SP.getName(), Die);
283 addAccelName(SP.getLinkageName(), Die);
290 addAccelObjC(Class, Die);
292 addAccelObjC(Category, Die);
294 addAccelName(getObjCMethodName(SP.getName()), Die);
311 // Find DIE for the given subprogram and attach appropriate DW_AT_low_pc
314 DIE &DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit &SPCU,
316 DIE *SPDie = SPCU.getOrCreateSubprogramDIE(SP);
331 /// Check whether we should create a DIE for the given Scope, return true
332 /// if we don't create a DIE (the corresponding DIE is null).
337 // We don't create a DIE if there is no Range.
345 // We don't create a DIE if we have a single Range and the end label
352 static void addSectionLabel(AsmPrinter &Asm, DwarfUnit &U, DIE &D,
361 void DwarfDebug::addScopeRangeList(DwarfCompileUnit &TheCU, DIE &ScopeDIE,
386 void DwarfDebug::attachRangesOrLowHighPC(DwarfCompileUnit &TheCU, DIE &Die,
390 attachLowHighPC(TheCU, Die, getLabelBeforeInsn(Ranges.front().first),
393 addScopeRangeList(TheCU, Die, Ranges);
398 std::unique_ptr<DIE>
404 auto ScopeDIE = make_unique<DIE>(dwarf::DW_TAG_lexical_block);
413 // This scope represents inlined body of a function. Construct DIE to
415 std::unique_ptr<DIE>
423 DIE *OriginDIE = AbstractSPDies[InlinedSP];
424 assert(OriginDIE && "Unable to find original DIE for an inlined subprogram.");
426 auto ScopeDIE = make_unique<DIE>(dwarf::DW_TAG_inlined_subroutine);
433 DIE.
446 static std::unique_ptr<DIE> constructVariableDIE(DwarfCompileUnit &TheCU,
449 DIE *&ObjectPointer) {
456 DIE *DwarfDebug::createScopeChildrenDIE(
458 SmallVectorImpl<std::unique_ptr<DIE>> &Children) {
459 DIE *ObjectPointer = nullptr;
474 make_unique<DIE>(dwarf::DW_TAG_unspecified_parameters));
483 if (std::unique_ptr<DIE> Nested = constructScopeDIE(TheCU, LS))
489 LexicalScope *Scope, DIE &ScopeDIE) {
490 // We create children when the scope DIE is not null.
491 SmallVector<std::unique_ptr<DIE>, 8> Children;
492 if (DIE *ObjectPointer = createScopeChildrenDIE(TheCU, Scope, Children))
510 DIE *&AbsDef = AbstractSPDies[SP];
517 DIE *ContextDIE;
521 // DIE (since the DIDescriptor will be associated with the concrete DIE, if
539 DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
550 DIE &ScopeDIE = updateSubprogramScopeDIE(TheCU, Sub);
557 // Construct a DIE for this scope.
558 std::unique_ptr<DIE> DwarfDebug::constructScopeDIE(DwarfCompileUnit &TheCU,
570 SmallVector<std::unique_ptr<DIE>, 8> Children;
572 // We try to create the scope DIE first, then the children DIEs. This will
574 // the scope DIE is null.
575 std::unique_ptr<DIE> ScopeDIE;
580 // We create children when the scope DIE is not null.
583 // Early exit when we know the scope DIE is going to be null.
587 // We create children here when we know the scope DIE is not going to be
588 // null and the children will be added to the scope DIE.
591 // There is no need to emit empty lexical block DIE.
601 assert(ScopeDIE && "Scope DIE should not be null.");
614 void DwarfDebug::addGnuPubAttributes(DwarfUnit &U, DIE &D) const {
630 DIE &Die = NewCU.getUnitDie();
641 NewCU.addString(Die, dwarf::DW_AT_producer, DIUnit.getProducer());
642 NewCU.addUInt(Die, dwarf::DW_AT_language, dwarf::DW_FORM_data2,
644 NewCU.addString(Die, dwarf::DW_AT_name, FN);
652 NewCU.addString(Die, dwarf::DW_AT_comp_dir, CompilationDir);
654 addGnuPubAttributes(NewCU, Die);
658 NewCU.addFlag(Die, dwarf::DW_AT_APPLE_optimized);
662 NewCU.addString(Die, dwarf::DW_AT_APPLE_flags, Flags);
665 NewCU.addUInt(Die, dwarf::DW_AT_APPLE_major_runtime_vers,
680 CUDieMap.insert(std::make_pair(&Die, &NewCU));
688 if (DIE *D = TheCU.getOrCreateContextDIE(Module.getContext()))
693 const MDNode *N, DIE &Context) {
701 DIE &Context) {
704 DIE &IMDie = TheCU.createAndAddDIE(Module.getTag(), Context, Module);
705 DIE *EntityDie;
789 DIE *VariableDie = Var->getDIE();
795 // DIE::getUnit isn't simple - it walks parent pointers, etc.
813 // Construct subprogram DIE and add variables DIEs.
823 DIE *D = SPCU->getDIE(SP);
824 if (DIE *AbsSPDIE = AbstractSPDies.lookup(SP)) {
848 // Construct subprogram DIE and add variables DIEs.
865 DIE *SPDIE = AbstractSPDies.lookup(SP);
955 // Compute DIE offsets and sizes.
1586 DIE &CurFnDIE = constructSubprogramScopeDIE(TheCU, FnScope);
1683 void DwarfDebug::emitDIE(DIE &Die) {
1684 // Get the abbreviation for this DIE.
1685 const DIEAbbrev &Abbrev = Die.getAbbrev();
1690 "] 0x" + Twine::utohexstr(Die.getOffset()) +
1691 ":0x" + Twine::utohexstr(Die.getSize()) + " " +
1695 const SmallVectorImpl<DIEValue *> &Values = Die.getValues();
1698 // Emit the DIE attribute values.
1702 assert(Form && "Too many attributes for DIE (check abbreviation)");
1715 // Emit the DIE children if any.
1717 for (auto &Child : Die.getChildren())
1817 // for the DIE that is named.
1821 // for the DIE that is named.
1823 // For type units the offset is the offset of the skeleton DIE. For split dwarf
1827 /// computeIndexValue - Compute the gdb index value for the DIE and CU.
1829 const DIE *Die) {
1832 // We could have a specification DIE that has our most of our knowledge,
1834 DIEValue *SpecVal = Die->findAttribute(dwarf::DW_AT_specification);
1836 DIE &SpecDIE = cast<DIEEntry>(SpecVal)->getEntry();
1839 } else if (Die->findAttribute(dwarf::DW_AT_external))
1842 switch (Die->getTag()) {
1882 const StringMap<const DIE *> &(DwarfUnit::*Accessor)() const) {
1918 const DIE *Entity = GI.second;
1920 Asm->OutStreamer.AddComment("DIE offset");
2288 void DwarfDebug::initSkeletonUnit(const DwarfUnit &U, DIE &Die,
2290 NewU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name,
2294 NewU->addLocalString(Die, dwarf::DW_AT_comp_dir, CompilationDir);
2296 addGnuPubAttributes(*NewU, Die);
2301 // This DIE has the following attributes: DW_AT_comp_dir, DW_AT_stmt_list,
2319 // This DIE has the following attributes: DW_AT_comp_dir, DW_AT_dwo_name,
2392 StringRef Identifier, DIE &RefDie,
2413 DIE &UnitDie = NewTU.getUnitDie();
2469 void DwarfDebug::attachLowHighPC(DwarfCompileUnit &Unit, DIE &D,
2484 // DIE to the proper table while ensuring that the name that we're going
2486 // add may not only be identical to the names in the DIE.
2487 void DwarfDebug::addAccelName(StringRef Name, const DIE &Die) {
2491 &Die);
2494 void DwarfDebug::addAccelObjC(StringRef Name, const DIE &Die) {
2498 &Die);
2501 void DwarfDebug::addAccelNamespace(StringRef Name, const DIE &Die) {
2505 &Die);
2508 void DwarfDebug::addAccelType(StringRef Name, const DIE &Die, char Flags) {
2512 &Die);