LLVM  4.0.0
DwarfUnit.h
Go to the documentation of this file.
1 //===-- llvm/CodeGen/DwarfUnit.h - Dwarf Compile Unit ---*- C++ -*--===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains support for writing dwarf compile unit.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DWARFUNIT_H
15 #define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFUNIT_H
16 
17 #include "DwarfDebug.h"
18 #include "llvm/ADT/DenseMap.h"
19 #include "llvm/ADT/Optional.h"
20 #include "llvm/ADT/StringMap.h"
22 #include "llvm/CodeGen/DIE.h"
23 #include "llvm/IR/DIBuilder.h"
24 #include "llvm/IR/DebugInfo.h"
25 #include "llvm/MC/MCDwarf.h"
26 #include "llvm/MC/MCExpr.h"
27 #include "llvm/MC/MCSection.h"
28 
29 namespace llvm {
30 
31 class MachineLocation;
32 class MachineOperand;
33 class ConstantInt;
34 class ConstantFP;
35 class DbgVariable;
36 class DwarfCompileUnit;
37 
38 // Data structure to hold a range for range lists.
39 class RangeSpan {
40 public:
41  RangeSpan(MCSymbol *S, MCSymbol *E) : Start(S), End(E) {}
42  const MCSymbol *getStart() const { return Start; }
43  const MCSymbol *getEnd() const { return End; }
44  void setEnd(const MCSymbol *E) { End = E; }
45 
46 private:
47  const MCSymbol *Start, *End;
48 };
49 
51 private:
52  // Index for locating within the debug_range section this particular span.
53  MCSymbol *RangeSym;
54  // List of ranges.
56 
57 public:
59  : RangeSym(Sym), Ranges(std::move(Ranges)) {}
60  MCSymbol *getSym() const { return RangeSym; }
61  const SmallVectorImpl<RangeSpan> &getRanges() const { return Ranges; }
62  void addRange(RangeSpan Range) { Ranges.push_back(Range); }
63 };
64 
65 //===----------------------------------------------------------------------===//
66 /// This dwarf writer support class manages information associated with a
67 /// source file.
68  class DwarfUnit : public DIEUnit {
69 protected:
70  /// MDNode for the compile unit.
72 
73  // All DIEValues are allocated through this allocator.
75 
76  /// Target of Dwarf emission.
78 
79  // Holders for some common dwarf information.
82 
83  /// An anonymous type for index type. Owned by DIEUnit.
85 
86  /// Tracks the mapping of unit level debug information variables to debug
87  /// information entries.
89 
90  /// A list of all the DIEBlocks in use.
91  std::vector<DIEBlock *> DIEBlocks;
92 
93  /// A list of all the DIELocs in use.
94  std::vector<DIELoc *> DIELocs;
95 
96  /// This map is used to keep track of subprogram DIEs that need
97  /// DW_AT_containing_type attribute. This attribute points to a DIE that
98  /// corresponds to the MDNode mapped with the subprogram DIE.
100 
102  DwarfFile *DWU);
103 
104  bool applySubprogramDefinitionAttributes(const DISubprogram *SP, DIE &SPDie);
105 
106 public:
107  virtual ~DwarfUnit();
108 
109  // Accessors.
110  AsmPrinter* getAsmPrinter() const { return Asm; }
111  uint16_t getLanguage() const { return CUNode->getSourceLanguage(); }
112  const DICompileUnit *getCUNode() const { return CUNode; }
113 
114  /// Return true if this compile unit has something to write out.
115  bool hasContent() const { return getUnitDie().hasChildren(); }
116 
117  /// Get string containing language specific context for a global name.
118  ///
119  /// Walks the metadata parent chain in a language specific manner (using the
120  /// compile unit language) and returns it as a string. This is done at the
121  /// metadata level because DIEs may not currently have been added to the
122  /// parent context and walking the DIEs looking for names is more expensive
123  /// than walking the metadata.
124  std::string getParentContextString(const DIScope *Context) const;
125 
126  /// Add a new global name to the compile unit.
127  virtual void addGlobalName(StringRef Name, DIE &Die, const DIScope *Context) {
128  }
129 
130  /// Add a new global type to the compile unit.
131  virtual void addGlobalType(const DIType *Ty, const DIE &Die,
132  const DIScope *Context) {}
133 
134  /// Returns the DIE map slot for the specified debug variable.
135  ///
136  /// We delegate the request to DwarfDebug when the MDNode can be part of the
137  /// type system, since DIEs for the type system can be shared across CUs and
138  /// the mappings are kept in DwarfDebug.
139  DIE *getDIE(const DINode *D) const;
140 
141  /// Returns a fresh newly allocated DIELoc.
143 
144  /// Insert DIE into the map.
145  ///
146  /// We delegate the request to DwarfDebug when the MDNode can be part of the
147  /// type system, since DIEs for the type system can be shared across CUs and
148  /// the mappings are kept in DwarfDebug.
149  void insertDIE(const DINode *Desc, DIE *D);
150 
151  /// Add a flag that is true to the DIE.
153 
154  /// Add an unsigned integer attribute data and value.
157 
158  void addUInt(DIEValueList &Block, dwarf::Form Form, uint64_t Integer);
159 
160  /// Add an signed integer attribute data and value.
163 
164  void addSInt(DIELoc &Die, Optional<dwarf::Form> Form, int64_t Integer);
165 
166  /// Add a string attribute data and value.
167  ///
168  /// We always emit a reference to the string pool instead of immediate
169  /// strings so that DIEs have more predictable sizes. In the case of split
170  /// dwarf we emit an index into another table which gets us the static offset
171  /// into the string table.
173 
174  /// Add a Dwarf label attribute data and value.
178  const MCSymbol *Label);
179 
180  void addLabel(DIELoc &Die, dwarf::Form Form, const MCSymbol *Label);
181 
182  /// Add an offset into a section attribute data and value.
183  void addSectionOffset(DIE &Die, dwarf::Attribute Attribute, uint64_t Integer);
184 
185  /// Add a dwarf op address data and value using the form given and an
186  /// op of either DW_FORM_addr or DW_FORM_GNU_addr_index.
187  void addOpAddress(DIELoc &Die, const MCSymbol *Label);
188 
189  /// Add a label delta attribute data and value.
191  const MCSymbol *Lo);
192 
193  /// Add a DIE attribute data and value.
194  void addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIE &Entry);
195 
196  /// Add a DIE attribute data and value.
198 
199  /// Add a type's DW_AT_signature and set the declaration flag.
200  void addDIETypeSignature(DIE &Die, uint64_t Signature);
201  /// Add an attribute containing the type signature for a unique identifier.
203  StringRef Identifier);
204 
205  /// Add block data.
206  void addBlock(DIE &Die, dwarf::Attribute Attribute, DIELoc *Block);
207 
208  /// Add block data.
209  void addBlock(DIE &Die, dwarf::Attribute Attribute, DIEBlock *Block);
210 
211  /// Add location information to specified debug information entry.
212  void addSourceLine(DIE &Die, unsigned Line, StringRef File,
213  StringRef Directory);
214  void addSourceLine(DIE &Die, const DILocalVariable *V);
215  void addSourceLine(DIE &Die, const DIGlobalVariable *G);
216  void addSourceLine(DIE &Die, const DISubprogram *SP);
217  void addSourceLine(DIE &Die, const DIType *Ty);
218  void addSourceLine(DIE &Die, const DINamespace *NS);
219  void addSourceLine(DIE &Die, const DIObjCProperty *Ty);
220 
221  /// Add constant value entry in variable DIE.
222  void addConstantValue(DIE &Die, const MachineOperand &MO, const DIType *Ty);
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, bool Unsigned, uint64_t Val);
227 
228  /// Add constant value entry in variable DIE.
229  void addConstantFPValue(DIE &Die, const MachineOperand &MO);
230  void addConstantFPValue(DIE &Die, const ConstantFP *CFP);
231 
232  /// Add a linkage name, if it isn't empty.
234 
235  /// Add template parameters in buffer.
236  void addTemplateParams(DIE &Buffer, DINodeArray TParams);
237 
238  // FIXME: Should be reformulated in terms of addComplexAddress.
239  /// Start with the address based on the location provided, and generate the
240  /// DWARF information necessary to find the actual Block variable (navigating
241  /// the Block struct) based on the starting location. Add the DWARF
242  /// information to the die. Obsolete, please use addComplexAddress instead.
243  void addBlockByrefAddress(const DbgVariable &DV, DIE &Die,
245  const MachineLocation &Location);
246 
247  /// Add a new type attribute to the specified entity.
248  ///
249  /// This takes and attribute parameter because DW_AT_friend attributes are
250  /// also type references.
251  void addType(DIE &Entity, const DIType *Ty,
252  dwarf::Attribute Attribute = dwarf::DW_AT_type);
253 
255  DIE *getOrCreateModule(const DIModule *M);
256  DIE *getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal = false);
257 
258  void applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie,
259  bool Minimal = false);
260 
261  /// Find existing DIE or create new DIE for the given type.
262  DIE *getOrCreateTypeDIE(const MDNode *N);
263 
264  /// Get context owner's DIE.
265  DIE *createTypeDIE(const DICompositeType *Ty);
266 
267  /// Get context owner's DIE.
269 
270  /// Construct DIEs for types that contain vtables.
272 
273  /// Construct function argument DIEs.
275 
276  /// Create a DIE with the given Tag, add the DIE to its parent, and
277  /// call insertDIE if MD is not null.
278  DIE &createAndAddDIE(unsigned Tag, DIE &Parent, const DINode *N = nullptr);
279 
280  /// Compute the size of a header for this unit, not including the initial
281  /// length field.
282  virtual unsigned getHeaderSize() const {
283  return sizeof(int16_t) + // DWARF version number
284  sizeof(int32_t) + // Offset Into Abbrev. Section
285  sizeof(int8_t); // Pointer Size (in bytes)
286  }
287 
288  /// Emit the header for this unit, not including the initial length field.
289  virtual void emitHeader(bool UseOffsets);
290 
291  virtual DwarfCompileUnit &getCU() = 0;
292 
293  void constructTypeDIE(DIE &Buffer, const DICompositeType *CTy);
294 
295 protected:
296  /// Create new static data member DIE.
298 
299  /// Look up the source ID with the given directory and source file names. If
300  /// none currently exists, create a new ID and insert it in the line table.
301  virtual unsigned getOrCreateSourceID(StringRef File, StringRef Directory) = 0;
302 
303  /// Look in the DwarfDebug map for the MDNode that corresponds to the
304  /// reference.
305  template <typename T> T *resolve(TypedDINodeRef<T> Ref) const {
306  return Ref.resolve();
307  }
308 
309 private:
310  void constructTypeDIE(DIE &Buffer, const DIBasicType *BTy);
311  void constructTypeDIE(DIE &Buffer, const DIDerivedType *DTy);
312  void constructTypeDIE(DIE &Buffer, const DISubroutineType *DTy);
313  void constructSubrangeDIE(DIE &Buffer, const DISubrange *SR, DIE *IndexTy);
314  void constructArrayTypeDIE(DIE &Buffer, const DICompositeType *CTy);
315  void constructEnumTypeDIE(DIE &Buffer, const DICompositeType *CTy);
316  void constructMemberDIE(DIE &Buffer, const DIDerivedType *DT);
317  void constructTemplateTypeParameterDIE(DIE &Buffer,
318  const DITemplateTypeParameter *TP);
319  void constructTemplateValueParameterDIE(DIE &Buffer,
320  const DITemplateValueParameter *TVP);
321 
322  /// Return the default lower bound for an array.
323  ///
324  /// If the DWARF version doesn't handle the language, return -1.
325  int64_t getDefaultLowerBound() const;
326 
327  /// Get an anonymous type for index type.
328  DIE *getIndexTyDie();
329 
330  /// Set D as anonymous type for index which can be reused later.
331  void setIndexTyDie(DIE *D) { IndexTyDie = D; }
332 
333  /// If this is a named finished type then include it in the list of types for
334  /// the accelerator tables.
335  void updateAcceleratorTables(const DIScope *Context, const DIType *Ty,
336  const DIE &TyDIE);
337 
338  virtual bool isDwoUnit() const = 0;
339 };
340 
341 class DwarfTypeUnit : public DwarfUnit {
342  uint64_t TypeSignature;
343  const DIE *Ty;
344  DwarfCompileUnit &CU;
345  MCDwarfDwoLineTable *SplitLineTable;
346 
347  unsigned getOrCreateSourceID(StringRef File, StringRef Directory) override;
348  bool isDwoUnit() const override;
349 
350 public:
352  DwarfFile *DWU, MCDwarfDwoLineTable *SplitLineTable = nullptr);
353 
354  void setTypeSignature(uint64_t Signature) { TypeSignature = Signature; }
355  void setType(const DIE *Ty) { this->Ty = Ty; }
356 
357  /// Emit the header for this unit, not including the initial length field.
358  void emitHeader(bool UseOffsets) override;
359  unsigned getHeaderSize() const override {
360  return DwarfUnit::getHeaderSize() + sizeof(uint64_t) + // Type Signature
361  sizeof(uint32_t); // Type DIE Offset
362  }
363  DwarfCompileUnit &getCU() override { return CU; }
364 };
365 } // end llvm namespace
366 #endif
const MCSymbol * getStart() const
Definition: DwarfUnit.h:42
void addFlag(DIE &Die, dwarf::Attribute Attribute)
Add a flag that is true to the DIE.
Definition: DwarfUnit.cpp:190
LLVMContext & Context
void addLabelDelta(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Hi, const MCSymbol *Lo)
Add a label delta attribute data and value.
Definition: DwarfUnit.cpp:267
const DICompileUnit * getCUNode() const
Definition: DwarfUnit.h:112
std::vector< DIELoc * > DIELocs
A list of all the DIELocs in use.
Definition: DwarfUnit.h:94
DIELoc - Represents an expression location.
Definition: DIE.h:829
DIE * getOrCreateStaticMemberDIE(const DIDerivedType *DT)
Create new static data member DIE.
Definition: DwarfUnit.cpp:1482
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:39
Attribute
Attributes.
Definition: Dwarf.h:94
virtual void addGlobalType(const DIType *Ty, const DIE &Die, const DIScope *Context)
Add a new global type to the compile unit.
Definition: DwarfUnit.h:131
void insertDIE(const DINode *Desc, DIE *D)
Insert DIE into the map.
Definition: DwarfUnit.cpp:182
MachineInstrBuilder MachineInstrBuilder &DefMI const MCInstrDesc & Desc
Collects and handles dwarf debug information.
Definition: DwarfDebug.h:196
DwarfTypeUnit(DwarfCompileUnit &CU, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU, MCDwarfDwoLineTable *SplitLineTable=nullptr)
Definition: DwarfUnit.cpp:80
virtual ~DwarfUnit()
Definition: DwarfUnit.cpp:89
Metadata node.
Definition: Metadata.h:830
DwarfUnit(dwarf::Tag, const DICompileUnit *CU, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU)
Definition: DwarfUnit.cpp:74
void addType(DIE &Entity, const DIType *Ty, dwarf::Attribute Attribute=dwarf::DW_AT_type)
Add a new type attribute to the specified entity.
Definition: DwarfUnit.cpp:757
virtual DwarfCompileUnit & getCU()=0
AsmPrinter * Asm
Target of Dwarf emission.
Definition: DwarfUnit.h:77
Tagged DWARF-like metadata node.
DIE * getOrCreateTypeDIE(const MDNode *N)
Find existing DIE or create new DIE for the given type.
Definition: DwarfUnit.cpp:692
void constructTypeDIE(DIE &Buffer, const DICompositeType *CTy)
Definition: DwarfUnit.cpp:894
virtual void addGlobalName(StringRef Name, DIE &Die, const DIScope *Context)
Add a new global name to the compile unit.
Definition: DwarfUnit.h:127
void addBlock(DIE &Die, dwarf::Attribute Attribute, DIELoc *Block)
Add block data.
Definition: DwarfUnit.cpp:316
virtual void emitHeader(bool UseOffsets)
Emit the header for this unit, not including the initial length field.
Definition: DwarfUnit.cpp:1529
Array subrange.
virtual unsigned getOrCreateSourceID(StringRef File, StringRef Directory)=0
Look up the source ID with the given directory and source file names.
T * resolve(TypedDINodeRef< T > Ref) const
Look in the DwarfDebug map for the MDNode that corresponds to the reference.
Definition: DwarfUnit.h:305
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:32
static GCRegistry::Add< StatepointGC > D("statepoint-example","an example strategy for statepoint")
void addConstantFPValue(DIE &Die, const MachineOperand &MO)
Add constant value entry in variable DIE.
Definition: DwarfUnit.cpp:564
void constructContainingTypeDIEs()
Construct DIEs for types that contain vtables.
Definition: DwarfUnit.cpp:1362
Holds a subclass of DINode.
DenseMap< DIE *, const DINode * > ContainingTypeMap
This map is used to keep track of subprogram DIEs that need DW_AT_containing_type attribute...
Definition: DwarfUnit.h:99
void addString(DIE &Die, dwarf::Attribute Attribute, StringRef Str)
Add a string attribute data and value.
Definition: DwarfUnit.cpp:225
Subprogram description.
This class is used to track local variable information.
Definition: DwarfDebug.h:64
A list of DIE values.
Definition: DIE.h:585
DwarfCompileUnit & getCU() override
Definition: DwarfUnit.h:363
virtual unsigned getHeaderSize() const
Compute the size of a header for this unit, not including the initial length field.
Definition: DwarfUnit.h:282
DIE * getOrCreateNameSpace(const DINamespace *NS)
Definition: DwarfUnit.cpp:1061
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
void addConstantValue(DIE &Die, const MachineOperand &MO, const DIType *Ty)
Add constant value entry in variable DIE.
Definition: DwarfUnit.cpp:596
This dwarf writer support class manages information associated with a source file.
Definition: DwarfUnit.h:68
DIEValueList::value_iterator addLabel(DIEValueList &Die, dwarf::Attribute Attribute, dwarf::Form Form, const MCSymbol *Label)
Add a Dwarf label attribute data and value.
Definition: DwarfUnit.cpp:232
bool hasChildren() const
Definition: DIE.h:696
bool applySubprogramDefinitionAttributes(const DISubprogram *SP, DIE &SPDie)
Definition: DwarfUnit.cpp:1138
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:138
void addSourceLine(DIE &Die, unsigned Line, StringRef File, StringRef Directory)
Add location information to specified debug information entry.
Definition: DwarfUnit.cpp:330
A structured debug information entry.
Definition: DIE.h:655
DIELoc * getDIELoc()
Returns a fresh newly allocated DIELoc.
Definition: DwarfUnit.h:142
ConstantFP - Floating Point Values [float, double].
Definition: Constants.h:269
DIE & getUnitDie()
Definition: DIE.h:821
unsigned getSourceLanguage() const
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:67
void setEnd(const MCSymbol *E)
Definition: DwarfUnit.h:44
DenseMap< const MDNode *, DIE * > MDNodeToDieMap
Tracks the mapping of unit level debug information variables to debug information entries...
Definition: DwarfUnit.h:88
DIE * getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal=false)
Definition: DwarfUnit.cpp:1107
void addSInt(DIEValueList &Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, int64_t Integer)
Add an signed integer attribute data and value.
Definition: DwarfUnit.cpp:213
DIE * IndexTyDie
An anonymous type for index type. Owned by DIEUnit.
Definition: DwarfUnit.h:84
DIE * getDIE(const DINode *D) const
Returns the DIE map slot for the specified debug variable.
Definition: DwarfUnit.cpp:176
Base class for scope-like contexts.
unsigned getHeaderSize() const override
Compute the size of a header for this unit, not including the initial length field.
Definition: DwarfUnit.h:359
Base class for types.
This is the shared class of boolean and integer constants.
Definition: Constants.h:88
uint16_t getLanguage() const
Definition: DwarfUnit.h:111
MachineOperand class - Representation of each machine instruction operand.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Definition: SmallVector.h:843
const DataFlowGraph & G
Definition: RDFGraph.cpp:206
void addLinkageName(DIE &Die, StringRef LinkageName)
Add a linkage name, if it isn't empty.
Definition: DwarfUnit.cpp:643
Represents a compile or type unit.
Definition: DIE.h:782
void setTypeSignature(uint64_t Signature)
Definition: DwarfUnit.h:354
void addTemplateParams(DIE &Buffer, DINodeArray TParams)
Add template parameters in buffer.
Definition: DwarfUnit.cpp:651
DwarfDebug * DD
Definition: DwarfUnit.h:80
Class for arbitrary precision integers.
Definition: APInt.h:77
A (clang) module that has been imported by the compile unit.
void setType(const DIE *Ty)
Definition: DwarfUnit.h:355
const SmallVectorImpl< RangeSpan > & getRanges() const
Definition: DwarfUnit.h:61
std::string getParentContextString(const DIScope *Context) const
Get string containing language specific context for a global name.
Definition: DwarfUnit.cpp:763
void addDIEEntry(DIE &Die, dwarf::Attribute Attribute, DIE &Entry)
Add a DIE attribute data and value.
Definition: DwarfUnit.cpp:273
DIE * getOrCreateContextDIE(const DIScope *Context)
Get context owner's DIE.
Definition: DwarfUnit.cpp:661
Type array for a subprogram.
DIE & createAndAddDIE(unsigned Tag, DIE &Parent, const DINode *N=nullptr)
Create a DIE with the given Tag, add the DIE to its parent, and call insertDIE if MD is not null...
Definition: DwarfUnit.cpp:309
RangeSpan(MCSymbol *S, MCSymbol *E)
Definition: DwarfUnit.h:41
#define N
void emitHeader(bool UseOffsets) override
Emit the header for this unit, not including the initial length field.
Definition: DwarfUnit.cpp:1552
DIE * getOrCreateModule(const DIModule *M)
Definition: DwarfUnit.cpp:1083
void addBlockByrefAddress(const DbgVariable &DV, DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location)
Start with the address based on the location provided, and generate the DWARF information necessary t...
Definition: DwarfUnit.cpp:430
void addRange(RangeSpan Range)
Definition: DwarfUnit.h:62
DIE * createTypeDIE(const DICompositeType *Ty)
Get context owner's DIE.
Definition: DwarfUnit.cpp:675
const DICompileUnit * CUNode
MDNode for the compile unit.
Definition: DwarfUnit.h:71
AsmPrinter * getAsmPrinter() const
Definition: DwarfUnit.h:110
void addSectionOffset(DIE &Die, dwarf::Attribute Attribute, uint64_t Integer)
Add an offset into a section attribute data and value.
Definition: DwarfUnit.cpp:243
bool hasContent() const
Return true if this compile unit has something to write out.
Definition: DwarfUnit.h:115
void addDIETypeSignature(DIE &Die, uint64_t Signature)
Add a type's DW_AT_signature and set the declaration flag.
Definition: DwarfUnit.cpp:277
BumpPtrAllocator DIEValueAllocator
Definition: DwarfUnit.h:74
RangeSpanList(MCSymbol *Sym, SmallVector< RangeSpan, 2 > Ranges)
Definition: DwarfUnit.h:58
std::vector< DIEBlock * > DIEBlocks
A list of all the DIEBlocks in use.
Definition: DwarfUnit.h:91
void addUInt(DIEValueList &Die, dwarf::Attribute Attribute, Optional< dwarf::Form > Form, uint64_t Integer)
Add an unsigned integer attribute data and value.
Definition: DwarfUnit.cpp:199
void addOpAddress(DIELoc &Die, const MCSymbol *Label)
Add a dwarf op address data and value using the form given and an op of either DW_FORM_addr or DW_FOR...
Definition: DwarfUnit.cpp:256
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47
DIEBlock - Represents a block of values.
Definition: DIE.h:863
DwarfFile * DU
Definition: DwarfUnit.h:81
void applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie, bool Minimal=false)
Definition: DwarfUnit.cpp:1182
void constructSubprogramArguments(DIE &Buffer, DITypeRefArray Args)
Construct function argument DIEs.
Definition: DwarfUnit.cpp:846
static GCRegistry::Add< ErlangGC > A("erlang","erlang-compatible garbage collector")
MCSymbol * getSym() const
Definition: DwarfUnit.h:60
const MCSymbol * getEnd() const
Definition: DwarfUnit.h:43
Basic type, like 'int' or 'float'.