LLVM  6.0.0svn
DIBuilder.h
Go to the documentation of this file.
1 //===- DIBuilder.h - Debug Information Builder ------------------*- 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 defines a DIBuilder that is useful for creating debugging
11 // information entries in LLVM IR form.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_IR_DIBUILDER_H
16 #define LLVM_IR_DIBUILDER_H
17 
18 #include "llvm/ADT/ArrayRef.h"
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/ADT/MapVector.h"
21 #include "llvm/ADT/None.h"
22 #include "llvm/ADT/SetVector.h"
23 #include "llvm/ADT/SmallVector.h"
24 #include "llvm/ADT/StringRef.h"
25 #include "llvm/IR/DebugInfo.h"
27 #include "llvm/IR/TrackingMDRef.h"
28 #include "llvm/Support/Casting.h"
29 #include <algorithm>
30 #include <cstdint>
31 
32 namespace llvm {
33 
34  class BasicBlock;
35  class Constant;
36  class Function;
37  class Instruction;
38  class LLVMContext;
39  class Module;
40  class Value;
41 
42  class DIBuilder {
43  Module &M;
44  LLVMContext &VMContext;
45 
46  DICompileUnit *CUNode; ///< The one compile unit created by this DIBuiler.
47  Function *DeclareFn; ///< llvm.dbg.declare
48  Function *ValueFn; ///< llvm.dbg.value
49 
50  SmallVector<Metadata *, 4> AllEnumTypes;
51  /// Track the RetainTypes, since they can be updated later on.
52  SmallVector<TrackingMDNodeRef, 4> AllRetainTypes;
53  SmallVector<Metadata *, 4> AllSubprograms;
55  SmallVector<TrackingMDNodeRef, 4> AllImportedModules;
56  /// Map Macro parent (which can be DIMacroFile or nullptr) to a list of
57  /// Metadata all of type DIMacroNode.
58  /// DIMacroNode's with nullptr parent are DICompileUnit direct children.
60 
61  /// Track nodes that may be unresolved.
62  SmallVector<TrackingMDNodeRef, 4> UnresolvedNodes;
63  bool AllowUnresolvedNodes;
64 
65  /// Each subprogram's preserved local variables.
66  ///
67  /// Do not use a std::vector. Some versions of libc++ apparently copy
68  /// instead of move on grow operations, and TrackingMDRef is expensive to
69  /// copy.
71 
72  /// Create a temporary.
73  ///
74  /// Create an \a temporary node and track it in \a UnresolvedNodes.
75  void trackIfUnresolved(MDNode *N);
76 
77  /// Internal helper for insertDeclare.
78  Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
79  DIExpression *Expr, const DILocation *DL,
80  BasicBlock *InsertBB, Instruction *InsertBefore);
81 
82  /// Internal helper for insertDbgValueIntrinsic.
83  Instruction *
84  insertDbgValueIntrinsic(llvm::Value *Val, DILocalVariable *VarInfo,
85  DIExpression *Expr, const DILocation *DL,
86  BasicBlock *InsertBB, Instruction *InsertBefore);
87 
88  public:
89  /// Construct a builder for a module.
90  ///
91  /// If \c AllowUnresolved, collect unresolved nodes attached to the module
92  /// in order to resolve cycles during \a finalize().
93  explicit DIBuilder(Module &M, bool AllowUnresolved = true);
94  DIBuilder(const DIBuilder &) = delete;
95  DIBuilder &operator=(const DIBuilder &) = delete;
96 
97  /// Construct any deferred debug info descriptors.
98  void finalize();
99 
100  /// Finalize a specific subprogram - no new variables may be added to this
101  /// subprogram afterwards.
103 
104  /// A CompileUnit provides an anchor for all debugging
105  /// information generated during this instance of compilation.
106  /// \param Lang Source programming language, eg. dwarf::DW_LANG_C99
107  /// \param File File info.
108  /// \param Producer Identify the producer of debugging information
109  /// and code. Usually this is a compiler
110  /// version string.
111  /// \param isOptimized A boolean flag which indicates whether optimization
112  /// is enabled or not.
113  /// \param Flags This string lists command line options. This
114  /// string is directly embedded in debug info
115  /// output which may be used by a tool
116  /// analyzing generated debugging information.
117  /// \param RV This indicates runtime version for languages like
118  /// Objective-C.
119  /// \param SplitName The name of the file that we'll split debug info
120  /// out into.
121  /// \param Kind The kind of debug information to generate.
122  /// \param DWOId The DWOId if this is a split skeleton compile unit.
123  /// \param SplitDebugInlining Whether to emit inline debug info.
124  /// \param DebugInfoForProfiling Whether to emit extra debug info for
125  /// profile collection.
126  /// \param GnuPubnames Whether to emit .debug_gnu_pubnames section instead
127  /// of .debug_pubnames.
128  DICompileUnit *
129  createCompileUnit(unsigned Lang, DIFile *File, StringRef Producer,
130  bool isOptimized, StringRef Flags, unsigned RV,
131  StringRef SplitName = StringRef(),
133  DICompileUnit::DebugEmissionKind::FullDebug,
134  uint64_t DWOId = 0, bool SplitDebugInlining = true,
135  bool DebugInfoForProfiling = false,
136  bool GnuPubnames = false);
137 
138  /// Create a file descriptor to hold debugging information for a file.
139  /// \param Filename File name.
140  /// \param Directory Directory.
141  /// \param CSKind Checksum kind (e.g. CSK_None, CSK_MD5, CSK_SHA1, etc.).
142  /// \param Checksum Checksum data.
143  DIFile *createFile(StringRef Filename, StringRef Directory,
145  StringRef Checksum = StringRef());
146 
147  /// Create debugging information entry for a macro.
148  /// \param Parent Macro parent (could be nullptr).
149  /// \param Line Source line number where the macro is defined.
150  /// \param MacroType DW_MACINFO_define or DW_MACINFO_undef.
151  /// \param Name Macro name.
152  /// \param Value Macro value.
153  DIMacro *createMacro(DIMacroFile *Parent, unsigned Line, unsigned MacroType,
155 
156  /// Create debugging information temporary entry for a macro file.
157  /// List of macro node direct children will be calculated by DIBuilder,
158  /// using the \p Parent relationship.
159  /// \param Parent Macro file parent (could be nullptr).
160  /// \param Line Source line number where the macro file is included.
161  /// \param File File descriptor containing the name of the macro file.
162  DIMacroFile *createTempMacroFile(DIMacroFile *Parent, unsigned Line,
163  DIFile *File);
164 
165  /// Create a single enumerator value.
166  DIEnumerator *createEnumerator(StringRef Name, int64_t Val);
167 
168  /// Create a DWARF unspecified type.
170 
171  /// Create C++11 nullptr type.
173 
174  /// Create debugging information entry for a basic
175  /// type.
176  /// \param Name Type name.
177  /// \param SizeInBits Size of the type.
178  /// \param Encoding DWARF encoding code, e.g. dwarf::DW_ATE_float.
179  DIBasicType *createBasicType(StringRef Name, uint64_t SizeInBits,
180  unsigned Encoding);
181 
182  /// Create debugging information entry for a qualified
183  /// type, e.g. 'const int'.
184  /// \param Tag Tag identifing type, e.g. dwarf::TAG_volatile_type
185  /// \param FromTy Base Type.
186  DIDerivedType *createQualifiedType(unsigned Tag, DIType *FromTy);
187 
188  /// Create debugging information entry for a pointer.
189  /// \param PointeeTy Type pointed by this pointer.
190  /// \param SizeInBits Size.
191  /// \param AlignInBits Alignment. (optional)
192  /// \param DWARFAddressSpace DWARF address space. (optional)
193  /// \param Name Pointer type name. (optional)
194  DIDerivedType *createPointerType(DIType *PointeeTy, uint64_t SizeInBits,
195  uint32_t AlignInBits = 0,
196  Optional<unsigned> DWARFAddressSpace =
197  None,
198  StringRef Name = "");
199 
200  /// Create debugging information entry for a pointer to member.
201  /// \param PointeeTy Type pointed to by this pointer.
202  /// \param SizeInBits Size.
203  /// \param AlignInBits Alignment. (optional)
204  /// \param Class Type for which this pointer points to members of.
205  DIDerivedType *
206  createMemberPointerType(DIType *PointeeTy, DIType *Class,
207  uint64_t SizeInBits, uint32_t AlignInBits = 0,
208  DINode::DIFlags Flags = DINode::FlagZero);
209 
210  /// Create debugging information entry for a c++
211  /// style reference or rvalue reference type.
212  DIDerivedType *createReferenceType(unsigned Tag, DIType *RTy,
213  uint64_t SizeInBits = 0,
214  uint32_t AlignInBits = 0,
215  Optional<unsigned> DWARFAddressSpace =
216  None);
217 
218  /// Create debugging information entry for a typedef.
219  /// \param Ty Original type.
220  /// \param Name Typedef name.
221  /// \param File File where this type is defined.
222  /// \param LineNo Line number.
223  /// \param Context The surrounding context for the typedef.
225  unsigned LineNo, DIScope *Context);
226 
227  /// Create debugging information entry for a 'friend'.
228  DIDerivedType *createFriend(DIType *Ty, DIType *FriendTy);
229 
230  /// Create debugging information entry to establish
231  /// inheritance relationship between two types.
232  /// \param Ty Original type.
233  /// \param BaseTy Base type. Ty is inherits from base.
234  /// \param BaseOffset Base offset.
235  /// \param Flags Flags to describe inheritance attribute,
236  /// e.g. private
238  uint64_t BaseOffset,
239  DINode::DIFlags Flags);
240 
241  /// Create debugging information entry for a member.
242  /// \param Scope Member scope.
243  /// \param Name Member name.
244  /// \param File File where this member is defined.
245  /// \param LineNo Line number.
246  /// \param SizeInBits Member size.
247  /// \param AlignInBits Member alignment.
248  /// \param OffsetInBits Member offset.
249  /// \param Flags Flags to encode member attribute, e.g. private
250  /// \param Ty Parent type.
252  DIFile *File, unsigned LineNo,
253  uint64_t SizeInBits,
254  uint32_t AlignInBits,
255  uint64_t OffsetInBits,
256  DINode::DIFlags Flags, DIType *Ty);
257 
258  /// Create debugging information entry for a bit field member.
259  /// \param Scope Member scope.
260  /// \param Name Member name.
261  /// \param File File where this member is defined.
262  /// \param LineNo Line number.
263  /// \param SizeInBits Member size.
264  /// \param OffsetInBits Member offset.
265  /// \param StorageOffsetInBits Member storage offset.
266  /// \param Flags Flags to encode member attribute.
267  /// \param Ty Parent type.
269  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
270  uint64_t SizeInBits, uint64_t OffsetInBits,
271  uint64_t StorageOffsetInBits, DINode::DIFlags Flags, DIType *Ty);
272 
273  /// Create debugging information entry for a
274  /// C++ static data member.
275  /// \param Scope Member scope.
276  /// \param Name Member name.
277  /// \param File File where this member is declared.
278  /// \param LineNo Line number.
279  /// \param Ty Type of the static member.
280  /// \param Flags Flags to encode member attribute, e.g. private.
281  /// \param Val Const initializer of the member.
282  /// \param AlignInBits Member alignment.
284  DIFile *File, unsigned LineNo,
285  DIType *Ty, DINode::DIFlags Flags,
286  Constant *Val,
287  uint32_t AlignInBits = 0);
288 
289  /// Create debugging information entry for Objective-C
290  /// instance variable.
291  /// \param Name Member name.
292  /// \param File File where this member is defined.
293  /// \param LineNo Line number.
294  /// \param SizeInBits Member size.
295  /// \param AlignInBits Member alignment.
296  /// \param OffsetInBits Member offset.
297  /// \param Flags Flags to encode member attribute, e.g. private
298  /// \param Ty Parent type.
299  /// \param PropertyNode Property associated with this ivar.
300  DIDerivedType *createObjCIVar(StringRef Name, DIFile *File, unsigned LineNo,
301  uint64_t SizeInBits, uint32_t AlignInBits,
302  uint64_t OffsetInBits, DINode::DIFlags Flags,
303  DIType *Ty, MDNode *PropertyNode);
304 
305  /// Create debugging information entry for Objective-C
306  /// property.
307  /// \param Name Property name.
308  /// \param File File where this property is defined.
309  /// \param LineNumber Line number.
310  /// \param GetterName Name of the Objective C property getter selector.
311  /// \param SetterName Name of the Objective C property setter selector.
312  /// \param PropertyAttributes Objective C property attributes.
313  /// \param Ty Type.
315  unsigned LineNumber,
316  StringRef GetterName,
317  StringRef SetterName,
318  unsigned PropertyAttributes, DIType *Ty);
319 
320  /// Create debugging information entry for a class.
321  /// \param Scope Scope in which this class is defined.
322  /// \param Name class name.
323  /// \param File File where this member is defined.
324  /// \param LineNumber Line number.
325  /// \param SizeInBits Member size.
326  /// \param AlignInBits Member alignment.
327  /// \param OffsetInBits Member offset.
328  /// \param Flags Flags to encode member attribute, e.g. private
329  /// \param Elements class members.
330  /// \param VTableHolder Debug info of the base class that contains vtable
331  /// for this type. This is used in
332  /// DW_AT_containing_type. See DWARF documentation
333  /// for more info.
334  /// \param TemplateParms Template type parameters.
335  /// \param UniqueIdentifier A unique identifier for the class.
337  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
338  uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
339  DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements,
340  DIType *VTableHolder = nullptr, MDNode *TemplateParms = nullptr,
341  StringRef UniqueIdentifier = "");
342 
343  /// Create debugging information entry for a struct.
344  /// \param Scope Scope in which this struct is defined.
345  /// \param Name Struct name.
346  /// \param File File where this member is defined.
347  /// \param LineNumber Line number.
348  /// \param SizeInBits Member size.
349  /// \param AlignInBits Member alignment.
350  /// \param Flags Flags to encode member attribute, e.g. private
351  /// \param Elements Struct elements.
352  /// \param RunTimeLang Optional parameter, Objective-C runtime version.
353  /// \param UniqueIdentifier A unique identifier for the struct.
355  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
356  uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags,
357  DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang = 0,
358  DIType *VTableHolder = nullptr, StringRef UniqueIdentifier = "");
359 
360  /// Create debugging information entry for an union.
361  /// \param Scope Scope in which this union is defined.
362  /// \param Name Union name.
363  /// \param File File where this member is defined.
364  /// \param LineNumber Line number.
365  /// \param SizeInBits Member size.
366  /// \param AlignInBits Member alignment.
367  /// \param Flags Flags to encode member attribute, e.g. private
368  /// \param Elements Union elements.
369  /// \param RunTimeLang Optional parameter, Objective-C runtime version.
370  /// \param UniqueIdentifier A unique identifier for the union.
372  DIFile *File, unsigned LineNumber,
373  uint64_t SizeInBits, uint32_t AlignInBits,
374  DINode::DIFlags Flags,
375  DINodeArray Elements,
376  unsigned RunTimeLang = 0,
377  StringRef UniqueIdentifier = "");
378 
379  /// Create debugging information for template
380  /// type parameter.
381  /// \param Scope Scope in which this type is defined.
382  /// \param Name Type parameter name.
383  /// \param Ty Parameter type.
386 
387  /// Create debugging information for template
388  /// value parameter.
389  /// \param Scope Scope in which this type is defined.
390  /// \param Name Value parameter name.
391  /// \param Ty Parameter type.
392  /// \param Val Constant parameter value.
394  StringRef Name,
395  DIType *Ty,
396  Constant *Val);
397 
398  /// Create debugging information for a template template parameter.
399  /// \param Scope Scope in which this type is defined.
400  /// \param Name Value parameter name.
401  /// \param Ty Parameter type.
402  /// \param Val The fully qualified name of the template.
404  StringRef Name,
405  DIType *Ty,
406  StringRef Val);
407 
408  /// Create debugging information for a template parameter pack.
409  /// \param Scope Scope in which this type is defined.
410  /// \param Name Value parameter name.
411  /// \param Ty Parameter type.
412  /// \param Val An array of types in the pack.
414  StringRef Name,
415  DIType *Ty,
416  DINodeArray Val);
417 
418  /// Create debugging information entry for an array.
419  /// \param Size Array size.
420  /// \param AlignInBits Alignment.
421  /// \param Ty Element type.
422  /// \param Subscripts Subscripts.
423  DICompositeType *createArrayType(uint64_t Size, uint32_t AlignInBits,
424  DIType *Ty, DINodeArray Subscripts);
425 
426  /// Create debugging information entry for a vector type.
427  /// \param Size Array size.
428  /// \param AlignInBits Alignment.
429  /// \param Ty Element type.
430  /// \param Subscripts Subscripts.
431  DICompositeType *createVectorType(uint64_t Size, uint32_t AlignInBits,
432  DIType *Ty, DINodeArray Subscripts);
433 
434  /// Create debugging information entry for an
435  /// enumeration.
436  /// \param Scope Scope in which this enumeration is defined.
437  /// \param Name Union name.
438  /// \param File File where this member is defined.
439  /// \param LineNumber Line number.
440  /// \param SizeInBits Member size.
441  /// \param AlignInBits Member alignment.
442  /// \param Elements Enumeration elements.
443  /// \param UnderlyingType Underlying type of a C++11/ObjC fixed enum.
444  /// \param UniqueIdentifier A unique identifier for the enum.
446  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
447  uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
448  DIType *UnderlyingType, StringRef UniqueIdentifier = "");
449 
450  /// Create subroutine type.
451  /// \param ParameterTypes An array of subroutine parameter types. This
452  /// includes return type at 0th index.
453  /// \param Flags E.g.: LValueReference.
454  /// These flags are used to emit dwarf attributes.
455  /// \param CC Calling convention, e.g. dwarf::DW_CC_normal
457  createSubroutineType(DITypeRefArray ParameterTypes,
458  DINode::DIFlags Flags = DINode::FlagZero,
459  unsigned CC = 0);
460 
461  /// Create a new DIType* with "artificial" flag set.
463 
464  /// Create a new DIType* with the "object pointer"
465  /// flag set.
467 
468  /// Create a permanent forward-declared type.
469  DICompositeType *createForwardDecl(unsigned Tag, StringRef Name,
470  DIScope *Scope, DIFile *F, unsigned Line,
471  unsigned RuntimeLang = 0,
472  uint64_t SizeInBits = 0,
473  uint32_t AlignInBits = 0,
474  StringRef UniqueIdentifier = "");
475 
476  /// Create a temporary forward-declared type.
478  unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line,
479  unsigned RuntimeLang = 0, uint64_t SizeInBits = 0,
480  uint32_t AlignInBits = 0, DINode::DIFlags Flags = DINode::FlagFwdDecl,
481  StringRef UniqueIdentifier = "");
482 
483  /// Retain DIScope* in a module even if it is not referenced
484  /// through debug info anchors.
485  void retainType(DIScope *T);
486 
487  /// Create unspecified parameter type
488  /// for a subroutine type.
490 
491  /// Get a DINodeArray, create one if required.
492  DINodeArray getOrCreateArray(ArrayRef<Metadata *> Elements);
493 
494  /// Get a DIMacroNodeArray, create one if required.
495  DIMacroNodeArray getOrCreateMacroArray(ArrayRef<Metadata *> Elements);
496 
497  /// Get a DITypeRefArray, create one if required.
499 
500  /// Create a descriptor for a value range. This
501  /// implicitly uniques the values returned.
502  DISubrange *getOrCreateSubrange(int64_t Lo, int64_t Count);
503 
504  /// Create a new descriptor for the specified variable.
505  /// \param Context Variable scope.
506  /// \param Name Name of the variable.
507  /// \param LinkageName Mangled name of the variable.
508  /// \param File File where this variable is defined.
509  /// \param LineNo Line number.
510  /// \param Ty Variable Type.
511  /// \param isLocalToUnit Boolean flag indicate whether this variable is
512  /// externally visible or not.
513  /// \param Expr The location of the global relative to the attached
514  /// GlobalVariable.
515  /// \param Decl Reference to the corresponding declaration.
516  /// \param AlignInBits Variable alignment(or 0 if no alignment attr was
517  /// specified)
519  DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File,
520  unsigned LineNo, DIType *Ty, bool isLocalToUnit,
521  DIExpression *Expr = nullptr, MDNode *Decl = nullptr,
522  uint32_t AlignInBits = 0);
523 
524  /// Identical to createGlobalVariable
525  /// except that the resulting DbgNode is temporary and meant to be RAUWed.
527  DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File,
528  unsigned LineNo, DIType *Ty, bool isLocalToUnit, MDNode *Decl = nullptr,
529  uint32_t AlignInBits = 0);
530 
531  /// Create a new descriptor for an auto variable. This is a local variable
532  /// that is not a subprogram parameter.
533  ///
534  /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually
535  /// leads to a \a DISubprogram.
536  ///
537  /// If \c AlwaysPreserve, this variable will be referenced from its
538  /// containing subprogram, and will survive some optimizations.
540  createAutoVariable(DIScope *Scope, StringRef Name, DIFile *File,
541  unsigned LineNo, DIType *Ty, bool AlwaysPreserve = false,
542  DINode::DIFlags Flags = DINode::FlagZero,
543  uint32_t AlignInBits = 0);
544 
545  /// Create a new descriptor for a parameter variable.
546  ///
547  /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually
548  /// leads to a \a DISubprogram.
549  ///
550  /// \c ArgNo is the index (starting from \c 1) of this variable in the
551  /// subprogram parameters. \c ArgNo should not conflict with other
552  /// parameters of the same subprogram.
553  ///
554  /// If \c AlwaysPreserve, this variable will be referenced from its
555  /// containing subprogram, and will survive some optimizations.
557  createParameterVariable(DIScope *Scope, StringRef Name, unsigned ArgNo,
558  DIFile *File, unsigned LineNo, DIType *Ty,
559  bool AlwaysPreserve = false,
560  DINode::DIFlags Flags = DINode::FlagZero);
561 
562  /// Create a new descriptor for the specified
563  /// variable which has a complex address expression for its address.
564  /// \param Addr An array of complex address operations.
567 
568  /// Create an expression for a variable that does not have an address, but
569  /// does have a constant value.
571  return DIExpression::get(
572  VMContext, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_stack_value});
573  }
574 
575  /// Create a new descriptor for the specified subprogram.
576  /// See comments in DISubprogram* for descriptions of these fields.
577  /// \param Scope Function scope.
578  /// \param Name Function name.
579  /// \param LinkageName Mangled function name.
580  /// \param File File where this variable is defined.
581  /// \param LineNo Line number.
582  /// \param Ty Function type.
583  /// \param isLocalToUnit True if this function is not externally visible.
584  /// \param isDefinition True if this is a function definition.
585  /// \param ScopeLine Set to the beginning of the scope this starts
586  /// \param Flags e.g. is this function prototyped or not.
587  /// These flags are used to emit dwarf attributes.
588  /// \param isOptimized True if optimization is ON.
589  /// \param TParams Function template parameters.
590  /// \param ThrownTypes Exception types this function may throw.
592  DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File,
593  unsigned LineNo, DISubroutineType *Ty, bool isLocalToUnit,
594  bool isDefinition, unsigned ScopeLine,
595  DINode::DIFlags Flags = DINode::FlagZero, bool isOptimized = false,
596  DITemplateParameterArray TParams = nullptr,
597  DISubprogram *Decl = nullptr, DITypeArray ThrownTypes = nullptr);
598 
599  /// Identical to createFunction,
600  /// except that the resulting DbgNode is meant to be RAUWed.
602  DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File,
603  unsigned LineNo, DISubroutineType *Ty, bool isLocalToUnit,
604  bool isDefinition, unsigned ScopeLine,
605  DINode::DIFlags Flags = DINode::FlagZero, bool isOptimized = false,
606  DITemplateParameterArray TParams = nullptr,
607  DISubprogram *Decl = nullptr, DITypeArray ThrownTypes = nullptr);
608 
609  /// Create a new descriptor for the specified C++ method.
610  /// See comments in \a DISubprogram* for descriptions of these fields.
611  /// \param Scope Function scope.
612  /// \param Name Function name.
613  /// \param LinkageName Mangled function name.
614  /// \param File File where this variable is defined.
615  /// \param LineNo Line number.
616  /// \param Ty Function type.
617  /// \param isLocalToUnit True if this function is not externally visible..
618  /// \param isDefinition True if this is a function definition.
619  /// \param Virtuality Attributes describing virtualness. e.g. pure
620  /// virtual function.
621  /// \param VTableIndex Index no of this method in virtual table, or -1u if
622  /// unrepresentable.
623  /// \param ThisAdjustment
624  /// MS ABI-specific adjustment of 'this' that occurs
625  /// in the prologue.
626  /// \param VTableHolder Type that holds vtable.
627  /// \param Flags e.g. is this function prototyped or not.
628  /// This flags are used to emit dwarf attributes.
629  /// \param isOptimized True if optimization is ON.
630  /// \param TParams Function template parameters.
631  /// \param ThrownTypes Exception types this function may throw.
633  DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File,
634  unsigned LineNo, DISubroutineType *Ty, bool isLocalToUnit,
635  bool isDefinition, unsigned Virtuality = 0, unsigned VTableIndex = 0,
636  int ThisAdjustment = 0, DIType *VTableHolder = nullptr,
637  DINode::DIFlags Flags = DINode::FlagZero, bool isOptimized = false,
638  DITemplateParameterArray TParams = nullptr,
639  DITypeArray ThrownTypes = nullptr);
640 
641  /// This creates new descriptor for a namespace with the specified
642  /// parent scope.
643  /// \param Scope Namespace scope
644  /// \param Name Name of this namespace
645  /// \param ExportSymbols True for C++ inline namespaces.
647  bool ExportSymbols);
648 
649  /// This creates new descriptor for a module with the specified
650  /// parent scope.
651  /// \param Scope Parent scope
652  /// \param Name Name of this module
653  /// \param ConfigurationMacros
654  /// A space-separated shell-quoted list of -D macro
655  /// definitions as they would appear on a command line.
656  /// \param IncludePath The path to the module map file.
657  /// \param ISysRoot The clang system root (value of -isysroot).
658  DIModule *createModule(DIScope *Scope, StringRef Name,
659  StringRef ConfigurationMacros,
660  StringRef IncludePath,
661  StringRef ISysRoot);
662 
663  /// This creates a descriptor for a lexical block with a new file
664  /// attached. This merely extends the existing
665  /// lexical block as it crosses a file.
666  /// \param Scope Lexical block.
667  /// \param File Source file.
668  /// \param Discriminator DWARF path discriminator value.
670  unsigned Discriminator = 0);
671 
672  /// This creates a descriptor for a lexical block with the
673  /// specified parent context.
674  /// \param Scope Parent lexical scope.
675  /// \param File Source file.
676  /// \param Line Line number.
677  /// \param Col Column number.
679  unsigned Line, unsigned Col);
680 
681  /// Create a descriptor for an imported module.
682  /// \param Context The scope this module is imported into
683  /// \param NS The namespace being imported here.
684  /// \param File File where the declaration is located.
685  /// \param Line Line number of the declaration.
687  DIFile *File, unsigned Line);
688 
689  /// Create a descriptor for an imported module.
690  /// \param Context The scope this module is imported into.
691  /// \param NS An aliased namespace.
692  /// \param File File where the declaration is located.
693  /// \param Line Line number of the declaration.
695  DIImportedEntity *NS, DIFile *File,
696  unsigned Line);
697 
698  /// Create a descriptor for an imported module.
699  /// \param Context The scope this module is imported into.
700  /// \param M The module being imported here
701  /// \param File File where the declaration is located.
702  /// \param Line Line number of the declaration.
704  DIFile *File, unsigned Line);
705 
706  /// Create a descriptor for an imported function.
707  /// \param Context The scope this module is imported into.
708  /// \param Decl The declaration (or definition) of a function, type, or
709  /// variable.
710  /// \param File File where the declaration is located.
711  /// \param Line Line number of the declaration.
713  DIFile *File, unsigned Line,
714  StringRef Name = "");
715 
716  /// Insert a new llvm.dbg.declare intrinsic call.
717  /// \param Storage llvm::Value of the variable
718  /// \param VarInfo Variable's debug info descriptor.
719  /// \param Expr A complex location expression.
720  /// \param DL Debug info location.
721  /// \param InsertAtEnd Location for the new intrinsic.
722  Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
723  DIExpression *Expr, const DILocation *DL,
724  BasicBlock *InsertAtEnd);
725 
726  /// Insert a new llvm.dbg.declare intrinsic call.
727  /// \param Storage llvm::Value of the variable
728  /// \param VarInfo Variable's debug info descriptor.
729  /// \param Expr A complex location expression.
730  /// \param DL Debug info location.
731  /// \param InsertBefore Location for the new intrinsic.
732  Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
733  DIExpression *Expr, const DILocation *DL,
734  Instruction *InsertBefore);
735 
736  /// Insert a new llvm.dbg.value intrinsic call.
737  /// \param Val llvm::Value of the variable
738  /// \param VarInfo Variable's debug info descriptor.
739  /// \param Expr A complex location expression.
740  /// \param DL Debug info location.
741  /// \param InsertAtEnd Location for the new intrinsic.
742  Instruction *insertDbgValueIntrinsic(llvm::Value *Val,
743  DILocalVariable *VarInfo,
744  DIExpression *Expr,
745  const DILocation *DL,
746  BasicBlock *InsertAtEnd);
747 
748  /// Insert a new llvm.dbg.value intrinsic call.
749  /// \param Val llvm::Value of the variable
750  /// \param VarInfo Variable's debug info descriptor.
751  /// \param Expr A complex location expression.
752  /// \param DL Debug info location.
753  /// \param InsertBefore Location for the new intrinsic.
754  Instruction *insertDbgValueIntrinsic(llvm::Value *Val,
755  DILocalVariable *VarInfo,
756  DIExpression *Expr,
757  const DILocation *DL,
758  Instruction *InsertBefore);
759 
760  /// Replace the vtable holder in the given type.
761  ///
762  /// If this creates a self reference, it may orphan some unresolved cycles
763  /// in the operands of \c T, so \a DIBuilder needs to track that.
765  DIType *VTableHolder);
766 
767  /// Replace arrays on a composite type.
768  ///
769  /// If \c T is resolved, but the arrays aren't -- which can happen if \c T
770  /// has a self-reference -- \a DIBuilder needs to track the array to
771  /// resolve cycles.
772  void replaceArrays(DICompositeType *&T, DINodeArray Elements,
773  DINodeArray TParams = DINodeArray());
774 
775  /// Replace a temporary node.
776  ///
777  /// Call \a MDNode::replaceAllUsesWith() on \c N, replacing it with \c
778  /// Replacement.
779  ///
780  /// If \c Replacement is the same as \c N.get(), instead call \a
781  /// MDNode::replaceWithUniqued(). In this case, the uniqued node could
782  /// have a different address, so we return the final address.
783  template <class NodeTy>
784  NodeTy *replaceTemporary(TempMDNode &&N, NodeTy *Replacement) {
785  if (N.get() == Replacement)
786  return cast<NodeTy>(MDNode::replaceWithUniqued(std::move(N)));
787 
788  N->replaceAllUsesWith(Replacement);
789  return Replacement;
790  }
791  };
792 
793  // Create wrappers for C Binding types (see CBindingWrapping.h).
795 
796 } // end namespace llvm
797 
798 #endif // LLVM_IR_DIBUILDER_H
void finalize()
Construct any deferred debug info descriptors.
Definition: DIBuilder.cpp:63
DISubprogram * createTempFunctionFwdDecl(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DISubroutineType *Ty, bool isLocalToUnit, bool isDefinition, unsigned ScopeLine, DINode::DIFlags Flags=DINode::FlagZero, bool isOptimized=false, DITemplateParameterArray TParams=nullptr, DISubprogram *Decl=nullptr, DITypeArray ThrownTypes=nullptr)
Identical to createFunction, except that the resulting DbgNode is meant to be RAUWed.
Definition: DIBuilder.cpp:705
DISubprogram * createFunction(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DISubroutineType *Ty, bool isLocalToUnit, bool isDefinition, unsigned ScopeLine, DINode::DIFlags Flags=DINode::FlagZero, bool isOptimized=false, DITemplateParameterArray TParams=nullptr, DISubprogram *Decl=nullptr, DITypeArray ThrownTypes=nullptr)
Create a new descriptor for the specified subprogram.
Definition: DIBuilder.cpp:686
DIDerivedType * createPointerType(DIType *PointeeTy, uint64_t SizeInBits, uint32_t AlignInBits=0, Optional< unsigned > DWARFAddressSpace=None, StringRef Name="")
Create debugging information entry for a pointer.
Definition: DIBuilder.cpp:262
LLVMContext & Context
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
DIGlobalVariableExpression * createGlobalVariableExpression(DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DIType *Ty, bool isLocalToUnit, DIExpression *Expr=nullptr, MDNode *Decl=nullptr, uint32_t AlignInBits=0)
Create a new descriptor for the specified variable.
Definition: DIBuilder.cpp:594
Various leaf nodes.
Definition: ISDOpcodes.h:60
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:63
DINamespace * createNameSpace(DIScope *Scope, StringRef Name, bool ExportSymbols)
This creates new descriptor for a namespace with the specified parent scope.
Definition: DIBuilder.cpp:741
DIDerivedType * createBitFieldMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint64_t OffsetInBits, uint64_t StorageOffsetInBits, DINode::DIFlags Flags, DIType *Ty)
Create debugging information entry for a bit field member.
Definition: DIBuilder.cpp:336
DICompositeType * createUnionType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DINodeArray Elements, unsigned RunTimeLang=0, StringRef UniqueIdentifier="")
Create debugging information entry for an union.
Definition: DIBuilder.cpp:449
DICompositeType * createArrayType(uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts)
Create debugging information entry for an array.
Definition: DIBuilder.cpp:480
DICompositeType * createReplaceableCompositeType(unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line, unsigned RuntimeLang=0, uint64_t SizeInBits=0, uint32_t AlignInBits=0, DINode::DIFlags Flags=DINode::FlagFwdDecl, StringRef UniqueIdentifier="")
Create a temporary forward-declared type.
Definition: DIBuilder.cpp:547
DICompositeType * createClassType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements, DIType *VTableHolder=nullptr, MDNode *TemplateParms=nullptr, StringRef UniqueIdentifier="")
Create debugging information entry for a class.
Definition: DIBuilder.cpp:419
This class implements a map that also provides access to all stored values in a deterministic order...
Definition: MapVector.h:38
struct LLVMOpaqueDIBuilder * LLVMDIBuilderRef
Represents an LLVM debug info builder.
Definition: Types.h:104
DIGlobalVariable * createTempGlobalVariableFwdDecl(DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DIType *Ty, bool isLocalToUnit, MDNode *Decl=nullptr, uint32_t AlignInBits=0)
Identical to createGlobalVariable except that the resulting DbgNode is temporary and meant to be RAUW...
Definition: DIBuilder.cpp:611
DISubrange * getOrCreateSubrange(int64_t Lo, int64_t Count)
Create a descriptor for a value range.
Definition: DIBuilder.cpp:581
Metadata node.
Definition: Metadata.h:862
F(f)
DIMacro * createMacro(DIMacroFile *Parent, unsigned Line, unsigned MacroType, StringRef Name, StringRef Value=StringRef())
Create debugging information entry for a macro.
Definition: DIBuilder.cpp:211
void replaceArrays(DICompositeType *&T, DINodeArray Elements, DINodeArray TParams=DINodeArray())
Replace arrays on a composite type.
Definition: DIBuilder.cpp:896
DICompositeType * createForwardDecl(unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line, unsigned RuntimeLang=0, uint64_t SizeInBits=0, uint32_t AlignInBits=0, StringRef UniqueIdentifier="")
Create a permanent forward-declared type.
Definition: DIBuilder.cpp:533
DIDerivedType * createStaticMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, DIType *Ty, DINode::DIFlags Flags, Constant *Val, uint32_t AlignInBits=0)
Create debugging information entry for a C++ static data member.
Definition: DIBuilder.cpp:350
DISubprogram * createMethod(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DISubroutineType *Ty, bool isLocalToUnit, bool isDefinition, unsigned Virtuality=0, unsigned VTableIndex=0, int ThisAdjustment=0, DIType *VTableHolder=nullptr, DINode::DIFlags Flags=DINode::FlagZero, bool isOptimized=false, DITemplateParameterArray TParams=nullptr, DITypeArray ThrownTypes=nullptr)
Create a new descriptor for the specified C++ method.
Definition: DIBuilder.cpp:719
DIType * createObjectPointerType(DIType *Ty)
Create a new DIType* with the "object pointer" flag set.
Definition: DIBuilder.cpp:514
DIImportedEntity * createImportedModule(DIScope *Context, DINamespace *NS, DIFile *File, unsigned Line)
Create a descriptor for an imported module.
Definition: DIBuilder.cpp:171
DIMacroNodeArray getOrCreateMacroArray(ArrayRef< Metadata *> Elements)
Get a DIMacroNodeArray, create one if required.
Definition: DIBuilder.cpp:566
DIDerivedType * createMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, DIType *Ty)
Create debugging information entry for a member.
Definition: DIBuilder.cpp:319
Tagged DWARF-like metadata node.
DILexicalBlockFile * createLexicalBlockFile(DIScope *Scope, DIFile *File, unsigned Discriminator=0)
This creates a descriptor for a lexical block with a new file attached.
Definition: DIBuilder.cpp:761
DITemplateTypeParameter * createTemplateTypeParameter(DIScope *Scope, StringRef Name, DIType *Ty)
Create debugging information for template type parameter.
Definition: DIBuilder.cpp:381
Array subrange.
DIDerivedType * createTypedef(DIType *Ty, StringRef Name, DIFile *File, unsigned LineNo, DIScope *Context)
Create debugging information entry for a typedef.
Definition: DIBuilder.cpp:296
DIBasicType * createUnspecifiedType(StringRef Name)
Create a DWARF unspecified type.
Definition: DIBuilder.cpp:241
DIMacroFile * createTempMacroFile(DIMacroFile *Parent, unsigned Line, DIFile *File)
Create debugging information temporary entry for a macro file.
Definition: DIBuilder.cpp:223
DISubroutineType * createSubroutineType(DITypeRefArray ParameterTypes, DINode::DIFlags Flags=DINode::FlagZero, unsigned CC=0)
Create subroutine type.
Definition: DIBuilder.cpp:461
#define DEFINE_ISA_CONVERSION_FUNCTIONS(ty, ref)
DIEnumerator * createEnumerator(StringRef Name, int64_t Val)
Create a single enumerator value.
Definition: DIBuilder.cpp:236
Subprogram description.
Enumeration value.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
void replaceAllUsesWith(Metadata *MD)
RAUW a temporary.
Definition: Metadata.h:947
Debug location.
DIBasicType * createNullPtrType()
Create C++11 nullptr type.
Definition: DIBuilder.cpp:246
DICompositeType * createEnumerationType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements, DIType *UnderlyingType, StringRef UniqueIdentifier="")
Create debugging information entry for an enumeration.
Definition: DIBuilder.cpp:467
DITypeRefArray getOrCreateTypeArray(ArrayRef< Metadata *> Elements)
Get a DITypeRefArray, create one if required.
Definition: DIBuilder.cpp:570
DICompositeType * createStructType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang=0, DIType *VTableHolder=nullptr, StringRef UniqueIdentifier="")
Create debugging information entry for a struct.
Definition: DIBuilder.cpp:436
DINodeArray getOrCreateArray(ArrayRef< Metadata *> Elements)
Get a DINodeArray, create one if required.
Definition: DIBuilder.cpp:561
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata *> MDs)
Definition: Metadata.h:1164
DIType * createArtificialType(DIType *Ty)
Create a new DIType* with "artificial" flag set.
Definition: DIBuilder.cpp:507
DIFile * createFile(StringRef Filename, StringRef Directory, DIFile::ChecksumKind CSKind=DIFile::CSK_None, StringRef Checksum=StringRef())
Create a file descriptor to hold debugging information for a file.
Definition: DIBuilder.cpp:206
static std::enable_if< std::is_base_of< MDNode, T >::value, T * >::type replaceWithUniqued(std::unique_ptr< T, TempMDNodeDeleter > N)
Replace a temporary node with a uniqued one.
Definition: Metadata.h:982
DIDerivedType * createReferenceType(unsigned Tag, DIType *RTy, uint64_t SizeInBits=0, uint32_t AlignInBits=0, Optional< unsigned > DWARFAddressSpace=None)
Create debugging information entry for a c++ style reference or rvalue reference type.
Definition: DIBuilder.cpp:285
LLVM Basic Block Representation.
Definition: BasicBlock.h:59
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:69
This is an important base class in LLVM.
Definition: Constant.h:42
DICompileUnit * createCompileUnit(unsigned Lang, DIFile *File, StringRef Producer, bool isOptimized, StringRef Flags, unsigned RV, StringRef SplitName=StringRef(), DICompileUnit::DebugEmissionKind Kind=DICompileUnit::DebugEmissionKind::FullDebug, uint64_t DWOId=0, bool SplitDebugInlining=true, bool DebugInfoForProfiling=false, bool GnuPubnames=false)
A CompileUnit provides an anchor for all debugging information generated during this instance of comp...
Definition: DIBuilder.cpp:132
A pair of DIGlobalVariable and DIExpression.
DIBasicType * createUnspecifiedParameter()
Create unspecified parameter type for a subroutine type.
Definition: DIBuilder.cpp:530
DIBuilder(Module &M, bool AllowUnresolved=true)
Construct a builder for a module.
Definition: DIBuilder.cpp:33
void retainType(DIScope *T)
Retain DIScope* in a module even if it is not referenced through debug info anchors.
Definition: DIBuilder.cpp:522
An imported module (C++ using directive or similar).
Base class for scope-like contexts.
DITemplateValueParameter * createTemplateValueParameter(DIScope *Scope, StringRef Name, DIType *Ty, Constant *Val)
Create debugging information for template value parameter.
Definition: DIBuilder.cpp:396
Base class for types.
DIExpression * createConstantValueExpression(uint64_t Val)
Create an expression for a variable that does not have an address, but does have a constant value...
Definition: DIBuilder.h:570
DITemplateValueParameter * createTemplateParameterPack(DIScope *Scope, StringRef Name, DIType *Ty, DINodeArray Val)
Create debugging information for a template parameter pack.
Definition: DIBuilder.cpp:412
This is a &#39;vector&#39; (really, a variable-sized array), optimized for the case when the array is small...
Definition: SmallVector.h:864
DIExpression * createExpression(ArrayRef< uint64_t > Addr=None)
Create a new descriptor for the specified variable which has a complex address expression for its add...
Definition: DIBuilder.cpp:669
DWARF expression.
A (clang) module that has been imported by the compile unit.
DIObjCProperty * createObjCProperty(StringRef Name, DIFile *File, unsigned LineNumber, StringRef GetterName, StringRef SetterName, unsigned PropertyAttributes, DIType *Ty)
Create debugging information entry for Objective-C property.
Definition: DIBuilder.cpp:373
DIBasicType * createBasicType(StringRef Name, uint64_t SizeInBits, unsigned Encoding)
Create debugging information entry for a basic type.
Definition: DIBuilder.cpp:250
DITemplateValueParameter * createTemplateTemplateParameter(DIScope *Scope, StringRef Name, DIType *Ty, StringRef Val)
Create debugging information for a template template parameter.
Definition: DIBuilder.cpp:404
Type array for a subprogram.
NodeTy * replaceTemporary(TempMDNode &&N, NodeTy *Replacement)
Replace a temporary node.
Definition: DIBuilder.h:784
DICompositeType * createVectorType(uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts)
Create debugging information entry for a vector type.
Definition: DIBuilder.cpp:490
DIFlags
Debug info flags.
DIDerivedType * createObjCIVar(StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, DIType *Ty, MDNode *PropertyNode)
Create debugging information entry for Objective-C instance variable.
Definition: DIBuilder.cpp:362
DILexicalBlock * createLexicalBlock(DIScope *Scope, DIFile *File, unsigned Line, unsigned Col)
This creates a descriptor for a lexical block with the specified parent context.
Definition: DIBuilder.cpp:767
DILocalVariable * createAutoVariable(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, DIType *Ty, bool AlwaysPreserve=false, DINode::DIFlags Flags=DINode::FlagZero, uint32_t AlignInBits=0)
Create a new descriptor for an auto variable.
Definition: DIBuilder.cpp:650
#define N
void replaceVTableHolder(DICompositeType *&T, DIType *VTableHolder)
Replace the vtable holder in the given type.
Definition: DIBuilder.cpp:876
void finalizeSubprogram(DISubprogram *SP)
Finalize a specific subprogram - no new variables may be added to this subprogram afterwards...
Definition: DIBuilder.cpp:48
DIDerivedType * createInheritance(DIType *Ty, DIType *BaseTy, uint64_t BaseOffset, DINode::DIFlags Flags)
Create debugging information entry to establish inheritance relationship between two types...
Definition: DIBuilder.cpp:311
const unsigned Kind
DIImportedEntity * createImportedDeclaration(DIScope *Context, DINode *Decl, DIFile *File, unsigned Line, StringRef Name="")
Create a descriptor for an imported function.
Definition: DIBuilder.cpp:194
DIModule * createModule(DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef ISysRoot)
This creates new descriptor for a module with the specified parent scope.
Definition: DIBuilder.cpp:753
LLVM Value Representation.
Definition: Value.h:73
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
DIBuilder & operator=(const DIBuilder &)=delete
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
DIDerivedType * createQualifiedType(unsigned Tag, DIType *FromTy)
Create debugging information entry for a qualified type, e.g.
Definition: DIBuilder.cpp:257
DILocalVariable * createParameterVariable(DIScope *Scope, StringRef Name, unsigned ArgNo, DIFile *File, unsigned LineNo, DIType *Ty, bool AlwaysPreserve=false, DINode::DIFlags Flags=DINode::FlagZero)
Create a new descriptor for a parameter variable.
Definition: DIBuilder.cpp:660
DIDerivedType * createMemberPointerType(DIType *PointeeTy, DIType *Class, uint64_t SizeInBits, uint32_t AlignInBits=0, DINode::DIFlags Flags=DINode::FlagZero)
Create debugging information entry for a pointer to member.
Definition: DIBuilder.cpp:275
DIDerivedType * createFriend(DIType *Ty, DIType *FriendTy)
Create debugging information entry for a &#39;friend&#39;.
Definition: DIBuilder.cpp:304
Basic type, like &#39;int&#39; or &#39;float&#39;.