1 //===-- llvm/CodeGen/DwarfUnit.h - Dwarf Compile Unit ---*- C++ -*--===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains support for writing dwarf compile unit.
12 //===----------------------------------------------------------------------===//
14 #ifndef CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
15 #define CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
18 #include "DwarfDebug.h"
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/Optional.h"
21 #include "llvm/ADT/StringMap.h"
22 #include "llvm/IR/DIBuilder.h"
23 #include "llvm/IR/DebugInfo.h"
24 #include "llvm/MC/MCExpr.h"
25 #include "llvm/MC/MCSection.h"
26 #include "llvm/MC/MCDwarf.h"
30 class MachineLocation;
35 class DwarfCompileUnit;
37 // Data structure to hold a range for range lists.
40 RangeSpan(MCSymbol *S, MCSymbol *E) : Start(S), End(E) {}
41 const MCSymbol *getStart() const { return Start; }
42 const MCSymbol *getEnd() const { return End; }
45 const MCSymbol *Start, *End;
50 // Index for locating within the debug_range section this particular span.
53 SmallVector<RangeSpan, 2> Ranges;
56 RangeSpanList(MCSymbol *Sym) : RangeSym(Sym) {}
57 MCSymbol *getSym() const { return RangeSym; }
58 const SmallVectorImpl<RangeSpan> &getRanges() const { return Ranges; }
59 void addRange(RangeSpan Range) { Ranges.push_back(Range); }
62 //===----------------------------------------------------------------------===//
63 /// Unit - This dwarf writer support class manages information associated
64 /// with a source file.
67 /// UniqueID - a numeric ID unique among all CUs in the module
70 /// Node - MDNode for the compile unit.
73 /// Unit debug information entry.
74 const std::unique_ptr<DIE> UnitDie;
76 /// Offset of the UnitDie from beginning of debug info section.
77 unsigned DebugInfoOffset;
79 /// Asm - Target of Dwarf emission.
82 // Holders for some common dwarf information.
86 /// IndexTyDie - An anonymous type for index type. Owned by UnitDie.
89 /// MDNodeToDieMap - Tracks the mapping of unit level debug information
90 /// variables to debug information entries.
91 DenseMap<const MDNode *, DIE *> MDNodeToDieMap;
93 /// MDNodeToDIEEntryMap - Tracks the mapping of unit level debug information
94 /// descriptors to debug information entries using a DIEEntry proxy.
95 DenseMap<const MDNode *, DIEEntry *> MDNodeToDIEEntryMap;
97 /// GlobalNames - A map of globally visible named entities for this unit.
98 StringMap<const DIE *> GlobalNames;
100 /// GlobalTypes - A map of globally visible types for this unit.
101 StringMap<const DIE *> GlobalTypes;
103 /// AccelNames - A map of names for the name accelerator table.
104 StringMap<std::vector<const DIE *> > AccelNames;
106 /// AccelObjC - A map of objc spec for the objc accelerator table.
107 StringMap<std::vector<const DIE *> > AccelObjC;
109 /// AccelNamespace - A map of names for the namespace accelerator table.
110 StringMap<std::vector<const DIE *> > AccelNamespace;
112 /// AccelTypes - A map of names for the type accelerator table.
113 StringMap<std::vector<std::pair<const DIE *, unsigned> > > AccelTypes;
115 /// DIEBlocks - A list of all the DIEBlocks in use.
116 std::vector<DIEBlock *> DIEBlocks;
118 /// DIELocs - A list of all the DIELocs in use.
119 std::vector<DIELoc *> DIELocs;
121 /// ContainingTypeMap - This map is used to keep track of subprogram DIEs that
122 /// need DW_AT_containing_type attribute. This attribute points to a DIE that
123 /// corresponds to the MDNode mapped with the subprogram DIE.
124 DenseMap<DIE *, const MDNode *> ContainingTypeMap;
126 // List of ranges for a given compile unit.
127 SmallVector<RangeSpan, 1> CURanges;
129 // List of range lists for a given compile unit, separate from the ranges for
131 SmallVector<RangeSpanList, 1> CURangeLists;
133 // DIEValueAllocator - All DIEValues are allocated through this allocator.
134 BumpPtrAllocator DIEValueAllocator;
136 // DIEIntegerOne - A preallocated DIEValue because 1 is used frequently.
137 DIEInteger *DIEIntegerOne;
139 /// The section this unit will be emitted in.
140 const MCSection *Section;
142 /// A label at the start of the non-dwo section related to this unit.
143 MCSymbol *SectionSym;
145 /// The start of the unit within its section.
146 MCSymbol *LabelBegin;
148 /// The end of the unit within its section.
151 /// The label for the start of the range sets for the elements of this unit.
152 MCSymbol *LabelRange;
154 /// Skeleton unit associated with this unit.
157 DwarfUnit(unsigned UID, DIE *D, DICompileUnit CU, AsmPrinter *A,
158 DwarfDebug *DW, DwarfFile *DWU);
161 virtual ~DwarfUnit();
163 /// Set the skeleton unit associated with this unit.
164 void setSkeleton(DwarfUnit *Skel) { Skeleton = Skel; }
166 /// Get the skeleton unit associated with this unit.
167 DwarfUnit *getSkeleton() const { return Skeleton; }
169 /// Pass in the SectionSym even though we could recreate it in every compile
170 /// unit (type units will have actually distinct symbols once they're in
171 /// comdat sections).
172 void initSection(const MCSection *Section, MCSymbol *SectionSym) {
173 assert(!this->Section);
174 this->Section = Section;
175 this->SectionSym = SectionSym;
177 Asm->GetTempSymbol(Section->getLabelBeginName(), getUniqueID());
179 Asm->GetTempSymbol(Section->getLabelEndName(), getUniqueID());
180 this->LabelRange = Asm->GetTempSymbol("gnu_ranges", getUniqueID());
183 const MCSection *getSection() const {
188 /// If there's a skeleton then return the section symbol for the skeleton
189 /// unit, otherwise return the section symbol for this unit.
190 MCSymbol *getLocalSectionSym() const {
192 return Skeleton->getSectionSym();
193 return getSectionSym();
196 MCSymbol *getSectionSym() const {
201 /// If there's a skeleton then return the begin label for the skeleton unit,
202 /// otherwise return the local label for this unit.
203 MCSymbol *getLocalLabelBegin() const {
205 return Skeleton->getLabelBegin();
206 return getLabelBegin();
209 MCSymbol *getLabelBegin() const {
214 MCSymbol *getLabelEnd() const {
219 MCSymbol *getLabelRange() const {
225 unsigned getUniqueID() const { return UniqueID; }
226 uint16_t getLanguage() const { return CUNode.getLanguage(); }
227 DICompileUnit getCUNode() const { return CUNode; }
228 DIE *getUnitDie() const { return UnitDie.get(); }
229 const StringMap<const DIE *> &getGlobalNames() const { return GlobalNames; }
230 const StringMap<const DIE *> &getGlobalTypes() const { return GlobalTypes; }
232 const StringMap<std::vector<const DIE *> > &getAccelNames() const {
235 const StringMap<std::vector<const DIE *> > &getAccelObjC() const {
238 const StringMap<std::vector<const DIE *> > &getAccelNamespace() const {
239 return AccelNamespace;
241 const StringMap<std::vector<std::pair<const DIE *, unsigned> > > &
242 getAccelTypes() const {
246 unsigned getDebugInfoOffset() const { return DebugInfoOffset; }
247 void setDebugInfoOffset(unsigned DbgInfoOff) { DebugInfoOffset = DbgInfoOff; }
249 /// hasContent - Return true if this compile unit has something to write out.
250 bool hasContent() const { return !UnitDie->getChildren().empty(); }
252 /// addRange - Add an address range to the list of ranges for this unit.
253 void addRange(RangeSpan Range) {
254 // Only add a range for this unit if we're emitting full debug.
255 if (getCUNode().getEmissionKind() == DIBuilder::FullDebug)
256 CURanges.push_back(Range);
259 /// getRanges - Get the list of ranges for this unit.
260 const SmallVectorImpl<RangeSpan> &getRanges() const { return CURanges; }
261 SmallVectorImpl<RangeSpan> &getRanges() { return CURanges; }
263 /// addRangeList - Add an address range list to the list of range lists.
264 void addRangeList(RangeSpanList Ranges) { CURangeLists.push_back(Ranges); }
266 /// getRangeLists - Get the vector of range lists.
267 const SmallVectorImpl<RangeSpanList> &getRangeLists() const {
270 SmallVectorImpl<RangeSpanList> &getRangeLists() { return CURangeLists; }
272 /// getParentContextString - Get a string containing the language specific
273 /// context for a global name.
274 std::string getParentContextString(DIScope Context) const;
276 /// addGlobalName - Add a new global entity to the compile unit.
278 void addGlobalName(StringRef Name, DIE *Die, DIScope Context);
280 /// addAccelName - Add a new name to the name accelerator table.
281 void addAccelName(StringRef Name, const DIE *Die);
283 /// addAccelObjC - Add a new name to the ObjC accelerator table.
284 void addAccelObjC(StringRef Name, const DIE *Die);
286 /// addAccelNamespace - Add a new name to the namespace accelerator table.
287 void addAccelNamespace(StringRef Name, const DIE *Die);
289 /// addAccelType - Add a new type to the type accelerator table.
290 void addAccelType(StringRef Name, std::pair<const DIE *, unsigned> Die);
292 /// getDIE - Returns the debug information entry map slot for the
293 /// specified debug variable. We delegate the request to DwarfDebug
294 /// when the MDNode can be part of the type system, since DIEs for
295 /// the type system can be shared across CUs and the mappings are
296 /// kept in DwarfDebug.
297 DIE *getDIE(DIDescriptor D) const;
299 /// getDIELoc - Returns a fresh newly allocated DIELoc.
300 DIELoc *getDIELoc() { return new (DIEValueAllocator) DIELoc(); }
302 /// insertDIE - Insert DIE into the map. We delegate the request to DwarfDebug
303 /// when the MDNode can be part of the type system, since DIEs for
304 /// the type system can be shared across CUs and the mappings are
305 /// kept in DwarfDebug.
306 void insertDIE(DIDescriptor Desc, DIE *D);
308 /// addDie - Adds or interns the DIE to the compile unit.
310 void addDie(DIE *Buffer) { UnitDie->addChild(Buffer); }
312 /// addFlag - Add a flag that is true to the DIE.
313 void addFlag(DIE *Die, dwarf::Attribute Attribute);
315 /// addUInt - Add an unsigned integer attribute data and value.
316 void addUInt(DIE *Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form,
319 void addUInt(DIE *Block, dwarf::Form Form, uint64_t Integer);
321 /// addSInt - Add an signed integer attribute data and value.
322 void addSInt(DIE *Die, dwarf::Attribute Attribute, Optional<dwarf::Form> Form,
325 void addSInt(DIELoc *Die, Optional<dwarf::Form> Form, int64_t Integer);
327 /// addString - Add a string attribute data and value.
328 void addString(DIE *Die, dwarf::Attribute Attribute, const StringRef Str);
330 /// addLocalString - Add a string attribute data and value.
331 void addLocalString(DIE *Die, dwarf::Attribute Attribute,
332 const StringRef Str);
334 /// addExpr - Add a Dwarf expression attribute data and value.
335 void addExpr(DIELoc *Die, dwarf::Form Form, const MCExpr *Expr);
337 /// addLabel - Add a Dwarf label attribute data and value.
338 void addLabel(DIE *Die, dwarf::Attribute Attribute, dwarf::Form Form,
339 const MCSymbol *Label);
341 void addLabel(DIELoc *Die, dwarf::Form Form, const MCSymbol *Label);
343 /// addLocationList - Add a Dwarf loclistptr attribute data and value.
344 void addLocationList(DIE *Die, dwarf::Attribute Attribute, unsigned Index);
346 /// addSectionLabel - Add a Dwarf section label attribute data and value.
348 void addSectionLabel(DIE *Die, dwarf::Attribute Attribute,
349 const MCSymbol *Label);
351 /// addSectionOffset - Add an offset into a section attribute data and value.
353 void addSectionOffset(DIE *Die, dwarf::Attribute Attribute, uint64_t Integer);
355 /// addOpAddress - Add a dwarf op address data and value using the
356 /// form given and an op of either DW_FORM_addr or DW_FORM_GNU_addr_index.
357 void addOpAddress(DIELoc *Die, const MCSymbol *Label);
359 /// addSectionDelta - Add a label delta attribute data and value.
360 void addSectionDelta(DIE *Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
363 /// addLabelDelta - Add a label delta attribute data and value.
364 void addLabelDelta(DIE *Die, dwarf::Attribute Attribute, const MCSymbol *Hi,
367 /// addDIEEntry - Add a DIE attribute data and value.
368 void addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIE *Entry);
370 /// addDIEEntry - Add a DIE attribute data and value.
371 void addDIEEntry(DIE *Die, dwarf::Attribute Attribute, DIEEntry *Entry);
373 void addDIETypeSignature(DIE *Die, const DwarfTypeUnit &Type);
375 /// addBlock - Add block data.
376 void addBlock(DIE *Die, dwarf::Attribute Attribute, DIELoc *Block);
378 /// addBlock - Add block data.
379 void addBlock(DIE *Die, dwarf::Attribute Attribute, DIEBlock *Block);
381 /// addSourceLine - Add location information to specified debug information
383 void addSourceLine(DIE *Die, unsigned Line, StringRef File,
384 StringRef Directory);
385 void addSourceLine(DIE *Die, DIVariable V);
386 void addSourceLine(DIE *Die, DIGlobalVariable G);
387 void addSourceLine(DIE *Die, DISubprogram SP);
388 void addSourceLine(DIE *Die, DIType Ty);
389 void addSourceLine(DIE *Die, DINameSpace NS);
390 void addSourceLine(DIE *Die, DIObjCProperty Ty);
392 /// addAddress - Add an address attribute to a die based on the location
394 void addAddress(DIE *Die, dwarf::Attribute Attribute,
395 const MachineLocation &Location, bool Indirect = false);
397 /// addConstantValue - Add constant value entry in variable DIE.
398 void addConstantValue(DIE *Die, const MachineOperand &MO, DIType Ty);
399 void addConstantValue(DIE *Die, const ConstantInt *CI, bool Unsigned);
400 void addConstantValue(DIE *Die, const APInt &Val, bool Unsigned);
402 /// addConstantFPValue - Add constant value entry in variable DIE.
403 void addConstantFPValue(DIE *Die, const MachineOperand &MO);
404 void addConstantFPValue(DIE *Die, const ConstantFP *CFP);
406 /// addTemplateParams - Add template parameters in buffer.
407 void addTemplateParams(DIE &Buffer, DIArray TParams);
409 /// addRegisterOp - Add register operand.
410 void addRegisterOp(DIELoc *TheDie, unsigned Reg);
412 /// addRegisterOffset - Add register offset.
413 void addRegisterOffset(DIELoc *TheDie, unsigned Reg, int64_t Offset);
415 /// addComplexAddress - Start with the address based on the location provided,
416 /// and generate the DWARF information necessary to find the actual variable
417 /// (navigating the extra location information encoded in the type) based on
418 /// the starting location. Add the DWARF information to the die.
419 void addComplexAddress(const DbgVariable &DV, DIE *Die,
420 dwarf::Attribute Attribute,
421 const MachineLocation &Location);
423 // FIXME: Should be reformulated in terms of addComplexAddress.
424 /// addBlockByrefAddress - Start with the address based on the location
425 /// provided, and generate the DWARF information necessary to find the
426 /// actual Block variable (navigating the Block struct) based on the
427 /// starting location. Add the DWARF information to the die. Obsolete,
428 /// please use addComplexAddress instead.
429 void addBlockByrefAddress(const DbgVariable &DV, DIE *Die,
430 dwarf::Attribute Attribute,
431 const MachineLocation &Location);
433 /// addVariableAddress - Add DW_AT_location attribute for a
434 /// DbgVariable based on provided MachineLocation.
435 void addVariableAddress(const DbgVariable &DV, DIE *Die,
436 MachineLocation Location);
438 /// addType - Add a new type attribute to the specified entity. This takes
439 /// and attribute parameter because DW_AT_friend attributes are also
441 void addType(DIE *Entity, DIType Ty,
442 dwarf::Attribute Attribute = dwarf::DW_AT_type);
444 /// getOrCreateNameSpace - Create a DIE for DINameSpace.
445 DIE *getOrCreateNameSpace(DINameSpace NS);
447 /// getOrCreateSubprogramDIE - Create new DIE using SP.
448 DIE *getOrCreateSubprogramDIE(DISubprogram SP);
450 /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
452 DIE *getOrCreateTypeDIE(const MDNode *N);
454 /// getOrCreateContextDIE - Get context owner's DIE.
455 DIE *createTypeDIE(DICompositeType Ty);
457 /// getOrCreateContextDIE - Get context owner's DIE.
458 DIE *getOrCreateContextDIE(DIScope Context);
460 /// constructContainingTypeDIEs - Construct DIEs for types that contain
462 void constructContainingTypeDIEs();
464 /// constructVariableDIE - Construct a DIE for the given DbgVariable.
465 DIE *constructVariableDIE(DbgVariable &DV, bool isScopeAbstract);
467 /// constructSubprogramArguments - Construct function argument DIEs.
468 void constructSubprogramArguments(DIE &Buffer, DIArray Args);
470 /// Create a DIE with the given Tag, add the DIE to its parent, and
471 /// call insertDIE if MD is not null.
472 DIE *createAndAddDIE(unsigned Tag, DIE &Parent,
473 DIDescriptor N = DIDescriptor());
475 /// Compute the size of a header for this unit, not including the initial
477 virtual unsigned getHeaderSize() const {
478 return sizeof(int16_t) + // DWARF version number
479 sizeof(int32_t) + // Offset Into Abbrev. Section
480 sizeof(int8_t); // Pointer Size (in bytes)
483 /// Emit the header for this unit, not including the initial length field.
484 virtual void emitHeader(const MCSection *ASection,
485 const MCSymbol *ASectionSym) const;
487 virtual DwarfCompileUnit &getCU() = 0;
489 /// \brief Return whether this compilation unit has the
490 /// one-definition-rule (ODR). In C++ this allows the compiler to
491 /// perform type unique during LTO.
492 bool hasODR() const {
493 switch (getLanguage()) {
494 case dwarf::DW_LANG_C_plus_plus:
495 case dwarf::DW_LANG_C_plus_plus_03:
496 case dwarf::DW_LANG_C_plus_plus_11:
497 // For all we care, the C++ part of the language has the ODR and
498 // ObjC methods are not represented in a way that they could be
499 // confused with C++ member functions.
500 case dwarf::DW_LANG_ObjC_plus_plus:
507 /// \brief Unique C++ member function declarations based on their
508 /// context+mangled name.
509 DISubprogram getOdrUniqueSubprogram(DIScope Context, DISubprogram SP) const;
512 /// getOrCreateStaticMemberDIE - Create new static data member DIE.
513 DIE *getOrCreateStaticMemberDIE(DIDerivedType DT);
515 /// Look up the source ID with the given directory and source file names. If
516 /// none currently exists, create a new ID and insert it in the line table.
517 virtual unsigned getOrCreateSourceID(StringRef File, StringRef Directory) = 0;
520 /// constructTypeDIE - Construct basic type die from DIBasicType.
521 void constructTypeDIE(DIE &Buffer, DIBasicType BTy);
523 /// constructTypeDIE - Construct derived type die from DIDerivedType.
524 void constructTypeDIE(DIE &Buffer, DIDerivedType DTy);
526 /// constructTypeDIE - Construct type DIE from DICompositeType.
527 void constructTypeDIE(DIE &Buffer, DICompositeType CTy);
529 /// constructSubrangeDIE - Construct subrange DIE from DISubrange.
530 void constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy);
532 /// constructArrayTypeDIE - Construct array type DIE from DICompositeType.
533 void constructArrayTypeDIE(DIE &Buffer, DICompositeType CTy);
535 /// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator.
536 void constructEnumTypeDIE(DIE &Buffer, DICompositeType CTy);
538 /// constructMemberDIE - Construct member DIE from DIDerivedType.
539 void constructMemberDIE(DIE &Buffer, DIDerivedType DT);
541 /// constructTemplateTypeParameterDIE - Construct new DIE for the given
542 /// DITemplateTypeParameter.
543 void constructTemplateTypeParameterDIE(DIE &Buffer,
544 DITemplateTypeParameter TP);
546 /// constructTemplateValueParameterDIE - Construct new DIE for the given
547 /// DITemplateValueParameter.
548 void constructTemplateValueParameterDIE(DIE &Buffer,
549 DITemplateValueParameter TVP);
551 /// getLowerBoundDefault - Return the default lower bound for an array. If the
552 /// DWARF version doesn't handle the language, return -1.
553 int64_t getDefaultLowerBound() const;
555 /// getDIEEntry - Returns the debug information entry for the specified
557 DIEEntry *getDIEEntry(const MDNode *N) const {
558 return MDNodeToDIEEntryMap.lookup(N);
561 /// insertDIEEntry - Insert debug information entry into the map.
562 void insertDIEEntry(const MDNode *N, DIEEntry *E) {
563 MDNodeToDIEEntryMap.insert(std::make_pair(N, E));
566 // getIndexTyDie - Get an anonymous type for index type.
567 DIE *getIndexTyDie() { return IndexTyDie; }
569 // setIndexTyDie - Set D as anonymous type for index which can be reused
571 void setIndexTyDie(DIE *D) { IndexTyDie = D; }
573 /// createDIEEntry - Creates a new DIEEntry to be a proxy for a debug
574 /// information entry.
575 DIEEntry *createDIEEntry(DIE *Entry);
577 /// resolve - Look in the DwarfDebug map for the MDNode that
578 /// corresponds to the reference.
579 template <typename T> T resolve(DIRef<T> Ref) const {
580 return DD->resolve(Ref);
583 /// If this is a named finished type then include it in the list of types for
584 /// the accelerator tables.
585 void updateAcceleratorTables(DIScope Context, DIType Ty, const DIE *TyDIE);
588 class DwarfCompileUnit : public DwarfUnit {
589 /// The attribute index of DW_AT_stmt_list in the compile unit DIE, avoiding
590 /// the need to search for it in applyStmtList.
591 unsigned stmtListIndex;
594 DwarfCompileUnit(unsigned UID, DIE *D, DICompileUnit Node, AsmPrinter *A,
595 DwarfDebug *DW, DwarfFile *DWU);
597 void initStmtList(MCSymbol *DwarfLineSectionSym);
599 /// Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
600 void applyStmtList(DIE &D);
602 /// createGlobalVariableDIE - create global variable DIE.
603 void createGlobalVariableDIE(DIGlobalVariable GV);
605 /// addLabelAddress - Add a dwarf label attribute data and value using
606 /// either DW_FORM_addr or DW_FORM_GNU_addr_index.
607 void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label);
609 DwarfCompileUnit &getCU() override { return *this; }
611 unsigned getOrCreateSourceID(StringRef FileName, StringRef DirName) override;
614 class DwarfTypeUnit : public DwarfUnit {
616 uint64_t TypeSignature;
618 DwarfCompileUnit &CU;
619 MCDwarfLineTableHeader *SplitLineTable;
622 DwarfTypeUnit(unsigned UID, DIE *D, DwarfCompileUnit &CU, AsmPrinter *A,
623 DwarfDebug *DW, DwarfFile *DWU,
624 MCDwarfLineTableHeader *SplitLineTable = nullptr);
626 void setTypeSignature(uint64_t Signature) { TypeSignature = Signature; }
627 uint64_t getTypeSignature() const { return TypeSignature; }
628 void setType(const DIE *Ty) { this->Ty = Ty; }
630 /// Emit the header for this unit, not including the initial length field.
631 void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym) const
633 unsigned getHeaderSize() const override {
634 return DwarfUnit::getHeaderSize() + sizeof(uint64_t) + // Type Signature
635 sizeof(uint32_t); // Type DIE Offset
637 void initSection(const MCSection *Section);
638 DwarfCompileUnit &getCU() override { return CU; }
641 unsigned getOrCreateSourceID(StringRef File, StringRef Directory) override;
643 } // end llvm namespace