1 //===--- llvm/Analysis/DebugInfo.h - Debug Information Helpers --*- 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 defines a bunch of datatypes that are useful for creating and
11 // walking debug info in LLVM IR form. They essentially provide wrappers around
12 // the information in the global variables that's needed when constructing the
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_ANALYSIS_DEBUGINFO_H
18 #define LLVM_ANALYSIS_DEBUGINFO_H
20 #include "llvm/ADT/SmallVector.h"
21 #include "llvm/ADT/SmallPtrSet.h"
22 #include "llvm/ADT/StringRef.h"
23 #include "llvm/Support/Dwarf.h"
35 struct DebugLocTracker;
40 /// DIDescriptor - A thin wraper around MDNode to access encoded debug info.
41 /// This should not be stored in a container, because underly MDNode may
42 /// change in certain situations.
47 StringRef getStringField(unsigned Elt) const;
48 unsigned getUnsignedField(unsigned Elt) const {
49 return (unsigned)getUInt64Field(Elt);
51 uint64_t getUInt64Field(unsigned Elt) const;
52 DIDescriptor getDescriptorField(unsigned Elt) const;
54 template <typename DescTy>
55 DescTy getFieldAs(unsigned Elt) const {
56 return DescTy(getDescriptorField(Elt).getNode());
59 GlobalVariable *getGlobalVariableField(unsigned Elt) const;
62 explicit DIDescriptor() : DbgNode(0) {}
63 explicit DIDescriptor(MDNode *N) : DbgNode(N) {}
65 bool Verify() const { return DbgNode != 0; }
67 MDNode *getNode() const { return DbgNode; }
69 unsigned getVersion() const {
70 return getUnsignedField(0) & LLVMDebugVersionMask;
73 unsigned getTag() const {
74 return getUnsignedField(0) & ~LLVMDebugVersionMask;
77 /// ValidDebugInfo - Return true if N represents valid debug info value.
78 static bool ValidDebugInfo(MDNode *N, unsigned OptLevel);
80 /// dump - print descriptor.
83 bool isDerivedType() const;
84 bool isCompositeType() const;
85 bool isBasicType() const;
86 bool isVariable() const;
87 bool isSubprogram() const;
88 bool isGlobalVariable() const;
90 bool isCompileUnit() const;
91 bool isNameSpace() const;
92 bool isLexicalBlock() const;
93 bool isSubrange() const;
94 bool isEnumerator() const;
96 bool isGlobal() const;
99 /// DISubrange - This is used to represent ranges, for array bounds.
100 class DISubrange : public DIDescriptor {
102 explicit DISubrange(MDNode *N = 0) : DIDescriptor(N) {}
104 int64_t getLo() const { return (int64_t)getUInt64Field(1); }
105 int64_t getHi() const { return (int64_t)getUInt64Field(2); }
108 /// DIArray - This descriptor holds an array of descriptors.
109 class DIArray : public DIDescriptor {
111 explicit DIArray(MDNode *N = 0)
114 unsigned getNumElements() const;
115 DIDescriptor getElement(unsigned Idx) const {
116 return getDescriptorField(Idx);
120 /// DIScope - A base class for various scopes.
121 class DIScope : public DIDescriptor {
123 explicit DIScope(MDNode *N = 0) : DIDescriptor (N) {}
124 virtual ~DIScope() {}
126 StringRef getFilename() const;
127 StringRef getDirectory() const;
130 /// DICompileUnit - A wrapper for a compile unit.
131 class DICompileUnit : public DIScope {
133 explicit DICompileUnit(MDNode *N = 0) : DIScope(N) {}
135 unsigned getLanguage() const { return getUnsignedField(2); }
136 StringRef getFilename() const { return getStringField(3); }
137 StringRef getDirectory() const { return getStringField(4); }
138 StringRef getProducer() const { return getStringField(5); }
140 /// isMain - Each input file is encoded as a separate compile unit in LLVM
141 /// debugging information output. However, many target specific tool chains
142 /// prefer to encode only one compile unit in an object file. In this
143 /// situation, the LLVM code generator will include debugging information
144 /// entities in the compile unit that is marked as main compile unit. The
145 /// code generator accepts maximum one main compile unit per module. If a
146 /// module does not contain any main compile unit then the code generator
147 /// will emit multiple compile units in the output object file.
149 bool isMain() const { return getUnsignedField(6); }
150 bool isOptimized() const { return getUnsignedField(7); }
151 StringRef getFlags() const { return getStringField(8); }
152 unsigned getRunTimeVersion() const { return getUnsignedField(9); }
154 /// Verify - Verify that a compile unit is well formed.
157 /// dump - print compile unit.
161 /// DIEnumerator - A wrapper for an enumerator (e.g. X and Y in 'enum {X,Y}').
162 /// FIXME: it seems strange that this doesn't have either a reference to the
163 /// type/precision or a file/line pair for location info.
164 class DIEnumerator : public DIDescriptor {
166 explicit DIEnumerator(MDNode *N = 0) : DIDescriptor(N) {}
168 StringRef getName() const { return getStringField(1); }
169 uint64_t getEnumValue() const { return getUInt64Field(2); }
172 /// DIType - This is a wrapper for a type.
173 /// FIXME: Types should be factored much better so that CV qualifiers and
174 /// others do not require a huge and empty descriptor full of zeros.
175 class DIType : public DIDescriptor {
178 FlagPrivate = 1 << 0,
179 FlagProtected = 1 << 1,
180 FlagFwdDecl = 1 << 2,
181 FlagAppleBlock = 1 << 3,
182 FlagBlockByrefStruct = 1 << 4,
183 FlagVirtual = 1 << 5,
184 FlagArtificial = 1 << 6 // To identify artificial arguments in
185 // a subroutine type. e.g. "this" in c++.
189 // This ctor is used when the Tag has already been validated by a derived
191 DIType(MDNode *N, bool, bool) : DIDescriptor(N) {}
195 /// Verify - Verify that a type descriptor is well formed.
198 explicit DIType(MDNode *N);
202 DIDescriptor getContext() const { return getDescriptorField(1); }
203 StringRef getName() const { return getStringField(2); }
204 DICompileUnit getCompileUnit() const{ return getFieldAs<DICompileUnit>(3); }
205 unsigned getLineNumber() const { return getUnsignedField(4); }
206 uint64_t getSizeInBits() const { return getUInt64Field(5); }
207 uint64_t getAlignInBits() const { return getUInt64Field(6); }
208 // FIXME: Offset is only used for DW_TAG_member nodes. Making every type
209 // carry this is just plain insane.
210 uint64_t getOffsetInBits() const { return getUInt64Field(7); }
211 unsigned getFlags() const { return getUnsignedField(8); }
212 bool isPrivate() const {
213 return (getFlags() & FlagPrivate) != 0;
215 bool isProtected() const {
216 return (getFlags() & FlagProtected) != 0;
218 bool isForwardDecl() const {
219 return (getFlags() & FlagFwdDecl) != 0;
221 // isAppleBlock - Return true if this is the Apple Blocks extension.
222 bool isAppleBlockExtension() const {
223 return (getFlags() & FlagAppleBlock) != 0;
225 bool isBlockByrefStruct() const {
226 return (getFlags() & FlagBlockByrefStruct) != 0;
228 bool isVirtual() const {
229 return (getFlags() & FlagVirtual) != 0;
231 bool isArtificial() const {
232 return (getFlags() & FlagArtificial) != 0;
234 bool isValid() const {
235 return DbgNode && (isBasicType() || isDerivedType() || isCompositeType());
237 /// dump - print type.
241 /// DIBasicType - A basic type, like 'int' or 'float'.
242 class DIBasicType : public DIType {
244 explicit DIBasicType(MDNode *N = 0) : DIType(N) {}
246 unsigned getEncoding() const { return getUnsignedField(9); }
248 /// dump - print basic type.
252 /// DIDerivedType - A simple derived type, like a const qualified type,
253 /// a typedef, a pointer or reference, etc.
254 class DIDerivedType : public DIType {
256 explicit DIDerivedType(MDNode *N, bool, bool)
257 : DIType(N, true, true) {}
259 explicit DIDerivedType(MDNode *N = 0)
260 : DIType(N, true, true) {}
262 DIType getTypeDerivedFrom() const { return getFieldAs<DIType>(9); }
264 /// getOriginalTypeSize - If this type is derived from a base type then
265 /// return base type size.
266 uint64_t getOriginalTypeSize() const;
267 /// dump - print derived type.
270 /// replaceAllUsesWith - Replace all uses of debug info referenced by
271 /// this descriptor. After this completes, the current debug info value
273 void replaceAllUsesWith(DIDescriptor &D);
276 /// DICompositeType - This descriptor holds a type that can refer to multiple
277 /// other types, like a function or struct.
278 /// FIXME: Why is this a DIDerivedType??
279 class DICompositeType : public DIDerivedType {
281 explicit DICompositeType(MDNode *N = 0)
282 : DIDerivedType(N, true, true) {
283 if (N && !isCompositeType())
287 DIArray getTypeArray() const { return getFieldAs<DIArray>(10); }
288 unsigned getRunTimeLang() const { return getUnsignedField(11); }
289 DICompositeType getContainingType() const {
290 return getFieldAs<DICompositeType>(12);
293 /// Verify - Verify that a composite type descriptor is well formed.
296 /// dump - print composite type.
300 /// DIGlobal - This is a common class for global variables and subprograms.
301 class DIGlobal : public DIDescriptor {
303 explicit DIGlobal(MDNode *N) : DIDescriptor(N) {}
306 virtual ~DIGlobal() {}
308 DIDescriptor getContext() const { return getDescriptorField(2); }
309 StringRef getName() const { return getStringField(3); }
310 StringRef getDisplayName() const { return getStringField(4); }
311 StringRef getLinkageName() const { return getStringField(5); }
312 DICompileUnit getCompileUnit() const{ return getFieldAs<DICompileUnit>(6); }
313 unsigned getLineNumber() const { return getUnsignedField(7); }
314 DIType getType() const { return getFieldAs<DIType>(8); }
316 /// isLocalToUnit - Return true if this subprogram is local to the current
317 /// compile unit, like 'static' in C.
318 unsigned isLocalToUnit() const { return getUnsignedField(9); }
319 unsigned isDefinition() const { return getUnsignedField(10); }
321 /// dump - print global.
325 /// DISubprogram - This is a wrapper for a subprogram (e.g. a function).
326 class DISubprogram : public DIScope {
328 explicit DISubprogram(MDNode *N = 0) : DIScope(N) {}
330 DIDescriptor getContext() const { return getDescriptorField(2); }
331 StringRef getName() const { return getStringField(3); }
332 StringRef getDisplayName() const { return getStringField(4); }
333 StringRef getLinkageName() const { return getStringField(5); }
334 DICompileUnit getCompileUnit() const{ return getFieldAs<DICompileUnit>(6); }
335 unsigned getLineNumber() const { return getUnsignedField(7); }
336 DICompositeType getType() const { return getFieldAs<DICompositeType>(8); }
338 /// getReturnTypeName - Subprogram return types are encoded either as
339 /// DIType or as DICompositeType.
340 StringRef getReturnTypeName() const {
341 DICompositeType DCT(getFieldAs<DICompositeType>(8));
343 DIArray A = DCT.getTypeArray();
344 DIType T(A.getElement(0).getNode());
347 DIType T(getFieldAs<DIType>(8));
351 /// isLocalToUnit - Return true if this subprogram is local to the current
352 /// compile unit, like 'static' in C.
353 unsigned isLocalToUnit() const { return getUnsignedField(9); }
354 unsigned isDefinition() const { return getUnsignedField(10); }
356 unsigned getVirtuality() const { return getUnsignedField(11); }
357 unsigned getVirtualIndex() const { return getUnsignedField(12); }
359 DICompositeType getContainingType() const {
360 return getFieldAs<DICompositeType>(13);
362 unsigned isArtificial() const { return getUnsignedField(14); }
364 StringRef getFilename() const { return getCompileUnit().getFilename();}
365 StringRef getDirectory() const { return getCompileUnit().getDirectory();}
367 /// Verify - Verify that a subprogram descriptor is well formed.
370 /// dump - print subprogram.
373 /// describes - Return true if this subprogram provides debugging
374 /// information for the function F.
375 bool describes(const Function *F);
378 /// DIGlobalVariable - This is a wrapper for a global variable.
379 class DIGlobalVariable : public DIGlobal {
381 explicit DIGlobalVariable(MDNode *N = 0) : DIGlobal(N) {}
383 GlobalVariable *getGlobal() const { return getGlobalVariableField(11); }
385 /// Verify - Verify that a global variable descriptor is well formed.
388 /// dump - print global variable.
392 /// DIVariable - This is a wrapper for a variable (e.g. parameter, local,
394 class DIVariable : public DIDescriptor {
396 explicit DIVariable(MDNode *N = 0)
399 DIDescriptor getContext() const { return getDescriptorField(1); }
400 StringRef getName() const { return getStringField(2); }
401 DICompileUnit getCompileUnit() const{ return getFieldAs<DICompileUnit>(3); }
402 unsigned getLineNumber() const { return getUnsignedField(4); }
403 DIType getType() const { return getFieldAs<DIType>(5); }
406 /// Verify - Verify that a variable descriptor is well formed.
409 /// HasComplexAddr - Return true if the variable has a complex address.
410 bool hasComplexAddress() const {
411 return getNumAddrElements() > 0;
414 unsigned getNumAddrElements() const;
416 uint64_t getAddrElement(unsigned Idx) const {
417 return getUInt64Field(Idx+6);
420 /// isBlockByrefVariable - Return true if the variable was declared as
421 /// a "__block" variable (Apple Blocks).
422 bool isBlockByrefVariable() const {
423 return getType().isBlockByrefStruct();
426 /// dump - print variable.
430 /// DILexicalBlock - This is a wrapper for a lexical block.
431 class DILexicalBlock : public DIScope {
433 explicit DILexicalBlock(MDNode *N = 0) : DIScope(N) {}
434 DIScope getContext() const { return getFieldAs<DIScope>(1); }
435 StringRef getDirectory() const { return getContext().getDirectory(); }
436 StringRef getFilename() const { return getContext().getFilename(); }
437 unsigned getLineNumber() const { return getUnsignedField(2); }
438 unsigned getColumnNumber() const { return getUnsignedField(3); }
441 /// DINameSpace - A wrapper for a C++ style name space.
442 class DINameSpace : public DIScope {
444 explicit DINameSpace(MDNode *N = 0) : DIScope(N) {}
445 DIScope getContext() const { return getFieldAs<DIScope>(1); }
446 StringRef getName() const { return getStringField(2); }
447 StringRef getDirectory() const { return getContext().getDirectory(); }
448 StringRef getFilename() const { return getContext().getFilename(); }
449 DICompileUnit getCompileUnit() const { return getFieldAs<DICompileUnit>(3);}
450 unsigned getLineNumber() const { return getUnsignedField(4); }
453 /// DILocation - This object holds location information. This object
454 /// is not associated with any DWARF tag.
455 class DILocation : public DIDescriptor {
457 explicit DILocation(MDNode *N) : DIDescriptor(N) { }
459 unsigned getLineNumber() const { return getUnsignedField(0); }
460 unsigned getColumnNumber() const { return getUnsignedField(1); }
461 DIScope getScope() const { return getFieldAs<DIScope>(2); }
462 DILocation getOrigLocation() const { return getFieldAs<DILocation>(3); }
463 StringRef getFilename() const { return getScope().getFilename(); }
464 StringRef getDirectory() const { return getScope().getDirectory(); }
468 /// DIFactory - This object assists with the construction of the various
472 LLVMContext& VMContext;
474 Function *DeclareFn; // llvm.dbg.declare
475 Function *ValueFn; // llvm.dbg.value
477 DIFactory(const DIFactory &); // DO NOT IMPLEMENT
478 void operator=(const DIFactory&); // DO NOT IMPLEMENT
480 enum ComplexAddrKind { OpPlus=1, OpDeref };
482 explicit DIFactory(Module &m);
484 /// GetOrCreateArray - Create an descriptor for an array of descriptors.
485 /// This implicitly uniques the arrays created.
486 DIArray GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys);
488 /// GetOrCreateSubrange - Create a descriptor for a value range. This
489 /// implicitly uniques the values returned.
490 DISubrange GetOrCreateSubrange(int64_t Lo, int64_t Hi);
492 /// CreateCompileUnit - Create a new descriptor for the specified compile
494 DICompileUnit CreateCompileUnit(unsigned LangID,
499 bool isOptimized = false,
500 StringRef Flags = "",
501 unsigned RunTimeVer = 0);
503 /// CreateEnumerator - Create a single enumerator value.
504 DIEnumerator CreateEnumerator(StringRef Name, uint64_t Val);
506 /// CreateBasicType - Create a basic type like int, float, etc.
507 DIBasicType CreateBasicType(DIDescriptor Context, StringRef Name,
508 DICompileUnit CompileUnit, unsigned LineNumber,
509 uint64_t SizeInBits, uint64_t AlignInBits,
510 uint64_t OffsetInBits, unsigned Flags,
513 /// CreateBasicType - Create a basic type like int, float, etc.
514 DIBasicType CreateBasicTypeEx(DIDescriptor Context, StringRef Name,
515 DICompileUnit CompileUnit, unsigned LineNumber,
516 Constant *SizeInBits, Constant *AlignInBits,
517 Constant *OffsetInBits, unsigned Flags,
520 /// CreateDerivedType - Create a derived type like const qualified type,
521 /// pointer, typedef, etc.
522 DIDerivedType CreateDerivedType(unsigned Tag, DIDescriptor Context,
524 DICompileUnit CompileUnit,
526 uint64_t SizeInBits, uint64_t AlignInBits,
527 uint64_t OffsetInBits, unsigned Flags,
530 /// CreateDerivedType - Create a derived type like const qualified type,
531 /// pointer, typedef, etc.
532 DIDerivedType CreateDerivedTypeEx(unsigned Tag, DIDescriptor Context,
534 DICompileUnit CompileUnit,
536 Constant *SizeInBits, Constant *AlignInBits,
537 Constant *OffsetInBits, unsigned Flags,
540 /// CreateCompositeType - Create a composite type like array, struct, etc.
541 DICompositeType CreateCompositeType(unsigned Tag, DIDescriptor Context,
543 DICompileUnit CompileUnit,
546 uint64_t AlignInBits,
547 uint64_t OffsetInBits, unsigned Flags,
550 unsigned RunTimeLang = 0,
551 MDNode *ContainingType = 0);
553 /// CreateArtificialType - Create a new DIType with "artificial" flag set.
554 DIType CreateArtificialType(DIType Ty);
556 /// CreateCompositeType - Create a composite type like array, struct, etc.
557 DICompositeType CreateCompositeTypeEx(unsigned Tag, DIDescriptor Context,
559 DICompileUnit CompileUnit,
561 Constant *SizeInBits,
562 Constant *AlignInBits,
563 Constant *OffsetInBits, unsigned Flags,
566 unsigned RunTimeLang = 0);
568 /// CreateSubprogram - Create a new descriptor for the specified subprogram.
569 /// See comments in DISubprogram for descriptions of these fields.
570 DISubprogram CreateSubprogram(DIDescriptor Context, StringRef Name,
571 StringRef DisplayName,
572 StringRef LinkageName,
573 DICompileUnit CompileUnit, unsigned LineNo,
574 DIType Ty, bool isLocalToUnit,
579 bool isArtificial = 0);
581 /// CreateSubprogramDefinition - Create new subprogram descriptor for the
582 /// given declaration.
583 DISubprogram CreateSubprogramDefinition(DISubprogram &SPDeclaration);
585 /// CreateGlobalVariable - Create a new descriptor for the specified global.
587 CreateGlobalVariable(DIDescriptor Context, StringRef Name,
588 StringRef DisplayName,
589 StringRef LinkageName,
590 DICompileUnit CompileUnit,
591 unsigned LineNo, DIType Ty, bool isLocalToUnit,
592 bool isDefinition, llvm::GlobalVariable *GV);
594 /// CreateVariable - Create a new descriptor for the specified variable.
595 DIVariable CreateVariable(unsigned Tag, DIDescriptor Context,
597 DICompileUnit CompileUnit, unsigned LineNo,
600 /// CreateComplexVariable - Create a new descriptor for the specified
601 /// variable which has a complex address expression for its address.
602 DIVariable CreateComplexVariable(unsigned Tag, DIDescriptor Context,
603 const std::string &Name,
604 DICompileUnit CompileUnit, unsigned LineNo,
606 SmallVector<Value *, 9> &addr);
608 /// CreateLexicalBlock - This creates a descriptor for a lexical block
609 /// with the specified parent context.
610 DILexicalBlock CreateLexicalBlock(DIDescriptor Context, unsigned Line = 0,
613 /// CreateNameSpace - This creates new descriptor for a namespace
614 /// with the specified parent context.
615 DINameSpace CreateNameSpace(DIDescriptor Context, StringRef Name,
616 DICompileUnit CU, unsigned LineNo);
618 /// CreateLocation - Creates a debug info location.
619 DILocation CreateLocation(unsigned LineNo, unsigned ColumnNo,
620 DIScope S, DILocation OrigLoc);
622 /// CreateLocation - Creates a debug info location.
623 DILocation CreateLocation(unsigned LineNo, unsigned ColumnNo,
624 DIScope S, MDNode *OrigLoc = 0);
626 /// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
627 Instruction *InsertDeclare(llvm::Value *Storage, DIVariable D,
628 BasicBlock *InsertAtEnd);
630 /// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
631 Instruction *InsertDeclare(llvm::Value *Storage, DIVariable D,
632 Instruction *InsertBefore);
634 /// InsertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.
635 Instruction *InsertDbgValueIntrinsic(llvm::Value *V, uint64_t Offset,
636 DIVariable D, BasicBlock *InsertAtEnd);
638 /// InsertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.
639 Instruction *InsertDbgValueIntrinsic(llvm::Value *V, uint64_t Offset,
640 DIVariable D, Instruction *InsertBefore);
642 Constant *GetTagConstant(unsigned TAG);
645 bool getLocationInfo(const Value *V, std::string &DisplayName,
646 std::string &Type, unsigned &LineNo, std::string &File,
649 /// ExtractDebugLocation - Extract debug location information
651 DebugLoc ExtractDebugLocation(DILocation &Loc,
652 DebugLocTracker &DebugLocInfo);
654 /// getDISubprogram - Find subprogram that is enclosing this scope.
655 DISubprogram getDISubprogram(MDNode *Scope);
657 /// getDICompositeType - Find underlying composite type.
658 DICompositeType getDICompositeType(DIType T);
660 class DebugInfoFinder {
662 /// processModule - Process entire module and collect debug info
664 void processModule(Module &M);
667 /// processType - Process DIType.
668 void processType(DIType DT);
670 /// processLexicalBlock - Process DILexicalBlock.
671 void processLexicalBlock(DILexicalBlock LB);
673 /// processSubprogram - Process DISubprogram.
674 void processSubprogram(DISubprogram SP);
676 /// processDeclare - Process DbgDeclareInst.
677 void processDeclare(DbgDeclareInst *DDI);
679 /// processLocation - Process DILocation.
680 void processLocation(DILocation Loc);
682 /// addCompileUnit - Add compile unit into CUs.
683 bool addCompileUnit(DICompileUnit CU);
685 /// addGlobalVariable - Add global variable into GVs.
686 bool addGlobalVariable(DIGlobalVariable DIG);
688 // addSubprogram - Add subprgoram into SPs.
689 bool addSubprogram(DISubprogram SP);
691 /// addType - Add type into Tys.
692 bool addType(DIType DT);
695 typedef SmallVector<MDNode *, 8>::iterator iterator;
696 iterator compile_unit_begin() { return CUs.begin(); }
697 iterator compile_unit_end() { return CUs.end(); }
698 iterator subprogram_begin() { return SPs.begin(); }
699 iterator subprogram_end() { return SPs.end(); }
700 iterator global_variable_begin() { return GVs.begin(); }
701 iterator global_variable_end() { return GVs.end(); }
702 iterator type_begin() { return TYs.begin(); }
703 iterator type_end() { return TYs.end(); }
705 unsigned compile_unit_count() { return CUs.size(); }
706 unsigned global_variable_count() { return GVs.size(); }
707 unsigned subprogram_count() { return SPs.size(); }
708 unsigned type_count() { return TYs.size(); }
711 SmallVector<MDNode *, 8> CUs; // Compile Units
712 SmallVector<MDNode *, 8> SPs; // Subprograms
713 SmallVector<MDNode *, 8> GVs; // Global Variables;
714 SmallVector<MDNode *, 8> TYs; // Types
715 SmallPtrSet<MDNode *, 64> NodesSeen;
717 } // end namespace llvm