Home | History | Annotate | Download | only in AsmPrinter

Lines Matching refs:DIE

48                                        DIELoc &DIE)
50 DIE(DIE) {}
53 DU.addUInt(DIE, dwarf::DW_FORM_data1, Op);
56 DU.addSInt(DIE, dwarf::DW_FORM_sdata, Value);
59 DU.addUInt(DIE, dwarf::DW_FORM_udata, Value);
68 : CUNode(Node), UnitDie(*DIE::get(DIEValueAllocator, UnitTag)), Asm(A),
156 /// Check whether the DIE for this MDNode can be shared across CUs.
158 // When the MDNode can be part of the type system, the DIE can be shared
160 // Combining type units and cross-CU DIE sharing is lower value (since
161 // cross-CU DIE sharing is used in LTO and removes type redundancy at that
170 DIE *DwarfUnit::getDIE(const DINode *D) const {
176 void DwarfUnit::insertDIE(const DINode *Desc, DIE *D) {
184 void DwarfUnit::addFlag(DIE &Die, dwarf::Attribute Attribute) {
186 Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_flag_present,
189 Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_flag,
193 void DwarfUnit::addUInt(DIEValueList &Die, dwarf::Attribute Attribute,
197 Die.addValue(DIEValueAllocator, Attribute, *Form, DIEInteger(Integer));
205 void DwarfUnit::addSInt(DIEValueList &Die, dwarf::Attribute Attribute,
209 Die.addValue(DIEValueAllocator, Attribute, *Form, DIEInteger(Integer));
212 void DwarfUnit::addSInt(DIELoc &Die, Optional<dwarf::Form> Form,
214 addSInt(Die, (dwarf::Attribute)0, Form, Integer);
217 void DwarfUnit::addString(DIE &Die, dwarf::Attribute Attribute,
219 Die.addValue(DIEValueAllocator, Attribute,
224 DIEValueList::value_iterator DwarfUnit::addLabel(DIEValueList &Die,
228 return Die.addValue(DIEValueAllocator, Attribute, Form, DIELabel(Label));
231 void DwarfUnit::addLabel(DIELoc &Die, dwarf::Form Form, const MCSymbol *Label) {
232 addLabel(Die, (dwarf::Attribute)0, Form, Label);
235 void DwarfUnit::addSectionOffset(DIE &Die, dwarf::Attribute Attribute,
238 addUInt(Die, Attribute, dwarf::DW_FORM_sec_offset, Integer);
240 addUInt(Die, Attribute, dwarf::DW_FORM_data4, Integer);
248 void DwarfUnit::addOpAddress(DIELoc &Die, const MCSymbol *Sym) {
250 addUInt(Die, dwarf::DW_FORM_data1, dwarf::DW_OP_addr);
251 addLabel(Die, dwarf::DW_FORM_udata, Sym);
253 addUInt(Die, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_addr_index);
254 addUInt(Die, dwarf::DW_FORM_GNU_addr_index,
259 void DwarfUnit::addLabelDelta(DIE &Die, dwarf::Attribute Attribute,
261 Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_data4,
265 void DwarfUnit::addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIE &Entry) {
266 addDIEEntry(Die, Attribute, DIEEntry(Entry));
269 void DwarfUnit::addDIETypeSignature(DIE &Die, uint64_t Signature) {
274 addFlag(Die, dwarf::DW_AT_declaration);
276 Die.addValue(DIEValueAllocator, dwarf::DW_AT_signature,
280 void DwarfUnit::addDIETypeSignature(DIE &Die, dwarf::Attribute Attribute,
283 Die.addValue(DIEValueAllocator, Attribute, dwarf::DW_FORM_ref_sig8,
287 void DwarfUnit::addDIEEntry(DIE &Die, dwarf::Attribute Attribute,
289 const DIE *DieCU = Die.getUnitOrNull();
290 const DIE *EntryCU = Entry.getEntry().getUnitOrNull();
292 // We assume that Die belongs to this CU, if it is not linked to any CU yet.
296 Die.addValue(DIEValueAllocator, Attribute,
301 DIE &DwarfUnit::createAndAddDIE(unsigned Tag, DIE &Parent, const DINode *N) {
302 DIE &Die = Parent.addChild(DIE::get(DIEValueAllocator, (dwarf::Tag)Tag));
304 insertDIE(N, &Die);
305 return Die;
308 void DwarfUnit::addBlock(DIE &Die, dwarf::Attribute Attribute, DIELoc *Loc) {
311 Die.addValue(DIEValueAllocator, Attribute,
315 void DwarfUnit::addBlock(DIE &Die, dwarf::Attribute Attribute,
319 Die.addValue(DIEValueAllocator, Attribute, Block->BestForm(), Block);
322 void DwarfUnit::addSourceLine(DIE &Die, unsigned Line, StringRef File,
329 addUInt(Die, dwarf::DW_AT_decl_file, None, FileID);
330 addUInt(Die, dwarf::DW_AT_decl_line, None, Line);
333 void DwarfUnit::addSourceLine(DIE &Die, const DILocalVariable *V) {
336 addSourceLine(Die, V->getLine(), V->getScope()->getFilename(),
340 void DwarfUnit::addSourceLine(DIE &Die, const DIGlobalVariable *G) {
343 addSourceLine(Die, G->getLine(), G->getFilename(), G->getDirectory());
346 void DwarfUnit::addSourceLine(DIE &Die, const DISubprogram *SP) {
349 addSourceLine(Die, SP->getLine(), SP->getFilename(), SP->getDirectory());
352 void DwarfUnit::addSourceLine(DIE &Die, const DIType *Ty) {
355 addSourceLine(Die, Ty->getLine(), Ty->getFilename(), Ty->getDirectory());
358 void DwarfUnit::addSourceLine(DIE &Die, const DIObjCProperty *Ty) {
361 addSourceLine(Die, Ty->getLine(), Ty->getFilename(), Ty->getDirectory());
364 void DwarfUnit::addSourceLine(DIE &Die, const DINamespace *NS) {
365 addSourceLine(Die, NS->getLine(), NS->getFilename(), NS->getDirectory());
437 void DwarfUnit::addBlockByrefAddress(const DbgVariable &DV, DIE &Die,
510 // Now attach the location information to the DIE.
511 addBlock(Die, Attribute, Loc);
564 void DwarfUnit::addConstantFPValue(DIE &Die, const MachineOperand &MO) {
583 addBlock(Die, dwarf::DW_AT_const_value, Block);
586 void DwarfUnit::addConstantFPValue(DIE &Die, const ConstantFP *CFP) {
588 addConstantValue(Die, CFP->getValueAPF().bitcastToAPInt(), true);
591 void DwarfUnit::addConstantValue(DIE &Die, const ConstantInt *CI,
593 addConstantValue(Die, CI->getValue(), Ty);
596 void DwarfUnit::addConstantValue(DIE &Die, const MachineOperand &MO,
600 addConstantValue(Die, isUnsignedDIType(DD, Ty), MO.getImm());
603 void DwarfUnit::addConstantValue(DIE &Die, bool Unsigned, uint64_t Val) {
606 addUInt(Die, dwarf::DW_AT_const_value,
610 void DwarfUnit::addConstantValue(DIE &Die, const APInt &Val, const DIType *Ty) {
611 addConstantValue(Die, Val, isUnsignedDIType(DD, Ty));
614 void DwarfUnit::addConstantValue(DIE &Die, const APInt &Val, bool Unsigned) {
617 addConstantValue(Die, Unsigned,
640 addBlock(Die, dwarf::DW_AT_const_value, Block);
643 void DwarfUnit::addLinkageName(DIE &Die, StringRef LinkageName) {
645 addString(Die,
651 void DwarfUnit::addTemplateParams(DIE &Buffer, DINodeArray TParams) {
661 DIE *DwarfUnit::getOrCreateContextDIE(const DIScope *Context) {
675 DIE *DwarfUnit::createTypeDIE(const DICompositeType *Ty) {
677 DIE *ContextDIE = getOrCreateContextDIE(Context);
679 if (DIE *TyDIE = getDIE(Ty))
683 DIE &TyDIE = createAndAddDIE(Ty->getTag(), *ContextDIE, Ty);
692 DIE *DwarfUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
702 // Construct the context before querying for the existence of the DIE in case
703 // such construction creates the DIE.
705 DIE *ContextDIE = getOrCreateContextDIE(Context);
708 if (DIE *TyDIE = getDIE(Ty))
712 DIE &TyDIE = createAndAddDIE(Ty->getTag(), *ContextDIE, Ty);
736 const DIType *Ty, const DIE &TyDIE) {
753 void DwarfUnit::addType(DIE &Entity, const DIType *Ty,
793 void DwarfUnit::constructTypeDIE(DIE &Buffer, const DIBasicType *BTy) {
811 void DwarfUnit::constructTypeDIE(DIE &Buffer, const DIDerivedType *DTy) {
842 void DwarfUnit::constructSubprogramArguments(DIE &Buffer, DITypeRefArray Args) {
849 DIE &Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, Buffer);
857 void DwarfUnit::constructTypeDIE(DIE &Buffer, const DISubroutineType *CTy) {
890 void DwarfUnit::constructTypeDIE(DIE &Buffer, const DICompositeType *CTy) {
923 DIE &ElemDie = createAndAddDIE(dwarf::DW_TAG_friend, Buffer);
931 DIE &ElemDie = createAndAddDIE(Property->getTag(), Buffer);
1006 DIE &Buffer, const DITemplateTypeParameter *TP) {
1007 DIE &ParamDIE =
1017 DIE &Buffer, const DITemplateValueParameter *VP) {
1018 DIE &ParamDIE = createAndAddDIE(VP->getTag(), Buffer);
1052 DIE *DwarfUnit::getOrCreateNameSpace(const DINamespace *NS) {
1053 // Construct the context before querying for the existence of the DIE in case
1054 // such construction creates the DIE.
1055 DIE *ContextDIE = getOrCreateContextDIE(NS->getScope());
1057 if (DIE *NDie = getDIE(NS))
1059 DIE &NDie = createAndAddDIE(dwarf::DW_TAG_namespace, *ContextDIE, NS);
1072 DIE *DwarfUnit::getOrCreateModule(const DIModule *M) {
1073 // Construct the context before querying for the existence of the DIE in case
1074 // such construction creates the DIE.
1075 DIE *ContextDIE = getOrCreateContextDIE(M->getScope());
1077 if (DIE *MDie = getDIE(M))
1079 DIE &MDie = createAndAddDIE(dwarf::DW_TAG_module, *ContextDIE, M);
1096 DIE *DwarfUnit::getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal) {
1097 // Construct the context before querying for the existence of the DIE in case
1098 // such construction creates the DIE (as is the case for member function
1100 DIE *ContextDIE =
1103 if (DIE *SPDie = getDIE(SP))
1108 // Add subprogram definitions to the CU die directly.
1115 // DW_TAG_inlined_subroutine may refer to this DIE.
1116 DIE &SPDie = createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, SP);
1128 DIE &SPDie) {
1129 DIE *DeclDie = nullptr;
1133 assert(DeclDie && "This DIE should've already been constructed when the "
1134 "definition DIE was created in "
1169 void DwarfUnit::applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie,
1265 void DwarfUnit::constructSubrangeDIE(DIE &Buffer, const DISubrange *SR,
1266 DIE *IndexTy) {
1267 DIE &DW_Subrange = createAndAddDIE(dwarf::DW_TAG_subrange_type, Buffer);
1287 DIE *DwarfUnit::getIndexTyDie() {
1299 void DwarfUnit::constructArrayTypeDIE(DIE &Buffer, const DICompositeType *CTy) {
1309 DIE *IdxTy = getIndexTyDie();
1321 void DwarfUnit::constructEnumTypeDIE(DIE &Buffer, const DICompositeType *CTy) {
1328 DIE &Enumerator = createAndAddDIE(dwarf::DW_TAG_enumerator, Buffer);
1346 DIE
1350 DIE *NDie = getDIE(D);
1357 void DwarfUnit::constructMemberDIE(DIE &Buffer, const DIDerivedType *DT) {
1358 DIE &MemberDie = createAndAddDIE(DT->getTag(), Buffer);
1448 if (DIE *PDie = getDIE(PNode))
1456 DIE *DwarfUnit::getOrCreateStaticMemberDIE(const DIDerivedType *DT) {
1460 // Construct the context before querying for the existence of the DIE in case
1461 // such construction creates the DIE.
1462 DIE *ContextDIE = getOrCreateContextDIE(resolve(DT->getScope()));
1466 if (DIE *StaticMemberDIE = getDIE(DT))
1469 DIE &StaticMemberDIE = createAndAddDIE(DT->getTag(), *ContextDIE, DT);
1531 Asm->OutStreamer->AddComment("Type DIE Offset");
1532 // In a skeleton type unit there is no type DIE so emit a zero offset.