Lines Matching full:die
19 #include "llvm/CodeGen/DIE.h"
59 DIE *IndexTyDie = nullptr;
63 DenseMap<const MDNode *, DIE *> MDNodeToDieMap;
72 /// DW_AT_containing_type attribute. This attribute points to a DIE that
73 /// corresponds to the MDNode mapped with the subprogram DIE.
74 DenseMap<DIE *, const DINode *> ContainingTypeMap;
79 bool applySubprogramDefinitionAttributes(const DISubprogram *SP, DIE &SPDie, bool Minimal);
84 void addAttribute(DIEValueList &Die, dwarf::Attribute Attribute, in addAttribute() argument
95 Die.addValue(DIEValueAllocator, in addAttribute()
127 virtual void addGlobalName(StringRef Name, const DIE &Die,
131 virtual void addGlobalTypeImpl(const DIType *Ty, const DIE &Die,
134 void addGlobalType(const DIType *Ty, const DIE &Die, const DIScope *Context);
136 /// Returns the DIE map slot for the specified debug variable.
141 DIE *getDIE(const DINode *D) const;
146 /// Insert DIE into the map.
151 void insertDIE(const DINode *Desc, DIE *D);
153 void insertDIE(DIE *D);
155 /// Add a flag that is true to the DIE.
156 void addFlag(DIE &Die, dwarf::Attribute Attribute);
159 void addUInt(DIEValueList &Die, dwarf::Attribute Attribute,
165 void addSInt(DIEValueList &Die, dwarf::Attribute Attribute,
168 void addSInt(DIELoc &Die, std::optional<dwarf::Form> Form, int64_t Integer);
176 void addString(DIE &Die, dwarf::Attribute Attribute, StringRef Str);
179 void addLabel(DIEValueList &Die, dwarf::Attribute Attribute, dwarf::Form Form,
182 void addLabel(DIELoc &Die, dwarf::Form Form, const MCSymbol *Label);
185 void addSectionOffset(DIE &Die, dwarf::Attribute Attribute, uint64_t Integer);
189 void addOpAddress(DIELoc &Die, const MCSymbol *Sym);
190 void addPoolOpAddress(DIEValueList &Die, const MCSymbol *Label);
193 void addLabelDelta(DIEValueList &Die, dwarf::Attribute Attribute,
196 /// Add a DIE attribute data and value.
197 void addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIE &Entry);
199 /// Add a DIE attribute data and value.
200 void addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIEEntry Entry);
203 void addDIETypeSignature(DIE &Die, uint64_t Signature);
206 void addBlock(DIE &Die, dwarf::Attribute Attribute, DIELoc *Loc);
209 void addBlock(DIE &Die, dwarf::Attribute Attribute, DIEBlock *Block);
210 void addBlock(DIE &Die, dwarf::Attribute Attribute, dwarf::Form Form,
214 void addSourceLine(DIE &Die, unsigned Line, const DIFile *File);
215 void addSourceLine(DIE &Die, const DILocalVariable *V);
216 void addSourceLine(DIE &Die, const DIGlobalVariable *G);
217 void addSourceLine(DIE &Die, const DISubprogram *SP);
218 void addSourceLine(DIE &Die, const DILabel *L);
219 void addSourceLine(DIE &Die, const DIType *Ty);
220 void addSourceLine(DIE &Die, const DIObjCProperty *Ty);
222 /// Add constant value entry in variable DIE.
223 void addConstantValue(DIE &Die, const ConstantInt *CI, const DIType *Ty);
224 void addConstantValue(DIE &Die, const APInt &Val, const DIType *Ty);
225 void addConstantValue(DIE &Die, const APInt &Val, bool Unsigned);
226 void addConstantValue(DIE &Die, uint64_t Val, const DIType *Ty);
227 void addConstantValue(DIE &Die, bool Unsigned, uint64_t Val);
229 /// Add constant value entry in variable DIE.
230 void addConstantFPValue(DIE &Die, const ConstantFP *CFP);
233 void addLinkageName(DIE &Die, StringRef LinkageName);
236 void addTemplateParams(DIE &Buffer, DINodeArray TParams);
239 void addThrownTypes(DIE &Die, DINodeArray ThrownTypes);
242 void addAccess(DIE &Die, DINode::DIFlags Flags);
248 void addType(DIE &Entity, const DIType *Ty,
251 DIE *getOrCreateNameSpace(const DINamespace *NS);
252 DIE *getOrCreateModule(const DIModule *M);
253 DIE *getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal = false);
255 void applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie,
258 /// Creates type DIE with specific context.
259 DIE *createTypeDIE(const DIScope *Context, DIE &ContextDIE, const DIType *Ty);
261 /// Find existing DIE or create new DIE for the given type.
262 virtual DIE *getOrCreateTypeDIE(const MDNode *TyNode);
264 /// Get context owner's DIE.
265 virtual DIE *getOrCreateContextDIE(const DIScope *Context);
271 void constructSubprogramArguments(DIE &Buffer, DITypeRefArray Args);
273 /// Create a DIE with the given Tag, add the DIE to its parent, and
275 DIE &createAndAddDIE(dwarf::Tag Tag, DIE &Parent, const DINode *N = nullptr);
294 /// Add the DW_AT_str_offsets_base attribute to the unit DIE.
297 /// Add the DW_AT_rnglists_base attribute to the unit DIE.
302 void constructTypeDIE(DIE &Buffer, const DICompositeType *CTy);
305 void addSectionDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
309 void addSectionLabel(DIE &Die, dwarf::Attribute Attribute,
313 void addAnnotation(DIE &Buffer, DINodeArray Annotations);
315 /// Get context owner's DIE.
316 DIE *createTypeDIE(const DICompositeType *Ty);
321 /// Create new static data member DIE.
322 DIE *getOrCreateStaticMemberDIE(const DIDerivedType *DT);
332 void constructTypeDIE(DIE &Buffer, const DIBasicType *BTy);
333 void constructTypeDIE(DIE &Buffer, const DIStringType *BTy);
334 void constructTypeDIE(DIE &Buffer, const DIDerivedType *DTy);
335 void constructTypeDIE(DIE &Buffer, const DISubroutineType *CTy);
336 void constructSubrangeDIE(DIE &Buffer, const DISubrange *SR, DIE *IndexTy);
337 void constructGenericSubrangeDIE(DIE &Buffer, const DIGenericSubrange *SR,
338 DIE *IndexTy);
339 void constructArrayTypeDIE(DIE &Buffer, const DICompositeType *CTy);
340 void constructEnumTypeDIE(DIE &Buffer, const DICompositeType *CTy);
341 DIE &constructMemberDIE(DIE &Buffer, const DIDerivedType *DT);
342 void constructTemplateTypeParameterDIE(DIE &Buffer,
344 void constructTemplateValueParameterDIE(DIE &Buffer,
353 DIE *getIndexTyDie();
356 void setIndexTyDie(DIE *D) { IndexTyDie = D; } in setIndexTyDie()
358 virtual void finishNonUnitTypeDIE(DIE& D, const DICompositeType *CTy) = 0;
363 const DIE &TyDIE);
375 const DIE *Ty;
381 void finishNonUnitTypeDIE(DIE& D, const DICompositeType *CTy) override;
392 void setType(const DIE *Ty) { this->Ty = Ty; } in setType()
398 Asm->getDwarfOffsetByteSize(); // Type DIE Offset in getHeaderSize()
400 void addGlobalName(StringRef Name, const DIE &Die,
402 void addGlobalTypeImpl(const DIType *Ty, const DIE &Die,