LLVM  16.0.0git
DIBuilder.h
Go to the documentation of this file.
1 //===- DIBuilder.h - Debug Information Builder ------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines a DIBuilder that is useful for creating debugging
10 // information entries in LLVM IR form.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_IR_DIBUILDER_H
15 #define LLVM_IR_DIBUILDER_H
16 
17 #include "llvm/ADT/ArrayRef.h"
18 #include "llvm/ADT/DenseMap.h"
19 #include "llvm/ADT/MapVector.h"
20 #include "llvm/ADT/Optional.h"
21 #include "llvm/ADT/SetVector.h"
22 #include "llvm/ADT/SmallVector.h"
23 #include "llvm/ADT/StringRef.h"
26 #include "llvm/IR/TrackingMDRef.h"
27 #include "llvm/Support/Casting.h"
28 #include <algorithm>
29 #include <cstdint>
30 
31 namespace llvm {
32 
33  class BasicBlock;
34  class Constant;
35  class Function;
36  class Instruction;
37  class LLVMContext;
38  class Module;
39  class Value;
40  class DbgAssignIntrinsic;
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  Function *LabelFn; ///< llvm.dbg.label
50  Function *AddrFn; ///< llvm.dbg.addr
51  Function *AssignFn; ///< llvm.dbg.assign
52 
54  /// Track the RetainTypes, since they can be updated later on.
55  SmallVector<TrackingMDNodeRef, 4> AllRetainTypes;
56  SmallVector<Metadata *, 4> AllSubprograms;
58  SmallVector<TrackingMDNodeRef, 4> AllImportedModules;
59  /// Map Macro parent (which can be DIMacroFile or nullptr) to a list of
60  /// Metadata all of type DIMacroNode.
61  /// DIMacroNode's with nullptr parent are DICompileUnit direct children.
63 
64  /// Track nodes that may be unresolved.
65  SmallVector<TrackingMDNodeRef, 4> UnresolvedNodes;
66  bool AllowUnresolvedNodes;
67 
68  /// Each subprogram's preserved local variables.
69  ///
70  /// Do not use a std::vector. Some versions of libc++ apparently copy
71  /// instead of move on grow operations, and TrackingMDRef is expensive to
72  /// copy.
74 
75  /// Each subprogram's preserved labels.
77 
78  /// Create a temporary.
79  ///
80  /// Create an \a temporary node and track it in \a UnresolvedNodes.
81  void trackIfUnresolved(MDNode *N);
82 
83  /// Internal helper for insertDeclare.
84  Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
85  DIExpression *Expr, const DILocation *DL,
86  BasicBlock *InsertBB, Instruction *InsertBefore);
87 
88  /// Internal helper for insertLabel.
89  Instruction *insertLabel(DILabel *LabelInfo, const DILocation *DL,
90  BasicBlock *InsertBB, Instruction *InsertBefore);
91 
92  /// Internal helper with common code used by insertDbg{Value,Addr}Intrinsic.
93  Instruction *insertDbgIntrinsic(llvm::Function *Intrinsic, llvm::Value *Val,
94  DILocalVariable *VarInfo,
95  DIExpression *Expr, const DILocation *DL,
96  BasicBlock *InsertBB,
97  Instruction *InsertBefore);
98 
99  /// Internal helper for insertDbgValueIntrinsic.
100  Instruction *
101  insertDbgValueIntrinsic(llvm::Value *Val, DILocalVariable *VarInfo,
102  DIExpression *Expr, const DILocation *DL,
103  BasicBlock *InsertBB, Instruction *InsertBefore);
104 
105  /// Internal helper for insertDbgAddrIntrinsic.
106  Instruction *
107  insertDbgAddrIntrinsic(llvm::Value *Val, DILocalVariable *VarInfo,
108  DIExpression *Expr, const DILocation *DL,
109  BasicBlock *InsertBB, Instruction *InsertBefore);
110 
111  public:
112  /// Construct a builder for a module.
113  ///
114  /// If \c AllowUnresolved, collect unresolved nodes attached to the module
115  /// in order to resolve cycles during \a finalize().
116  ///
117  /// If \p CU is given a value other than nullptr, then set \p CUNode to CU.
118  explicit DIBuilder(Module &M, bool AllowUnresolved = true,
119  DICompileUnit *CU = nullptr);
120  DIBuilder(const DIBuilder &) = delete;
121  DIBuilder &operator=(const DIBuilder &) = delete;
122 
123  /// Construct any deferred debug info descriptors.
124  void finalize();
125 
126  /// Finalize a specific subprogram - no new variables may be added to this
127  /// subprogram afterwards.
129 
130  /// A CompileUnit provides an anchor for all debugging
131  /// information generated during this instance of compilation.
132  /// \param Lang Source programming language, eg. dwarf::DW_LANG_C99
133  /// \param File File info.
134  /// \param Producer Identify the producer of debugging information
135  /// and code. Usually this is a compiler
136  /// version string.
137  /// \param isOptimized A boolean flag which indicates whether optimization
138  /// is enabled or not.
139  /// \param Flags This string lists command line options. This
140  /// string is directly embedded in debug info
141  /// output which may be used by a tool
142  /// analyzing generated debugging information.
143  /// \param RV This indicates runtime version for languages like
144  /// Objective-C.
145  /// \param SplitName The name of the file that we'll split debug info
146  /// out into.
147  /// \param Kind The kind of debug information to generate.
148  /// \param DWOId The DWOId if this is a split skeleton compile unit.
149  /// \param SplitDebugInlining Whether to emit inline debug info.
150  /// \param DebugInfoForProfiling Whether to emit extra debug info for
151  /// profile collection.
152  /// \param NameTableKind Whether to emit .debug_gnu_pubnames,
153  /// .debug_pubnames, or no pubnames at all.
154  /// \param SysRoot The clang system root (value of -isysroot).
155  /// \param SDK The SDK name. On Darwin, this is the last component
156  /// of the sysroot.
157  DICompileUnit *
158  createCompileUnit(unsigned Lang, DIFile *File, StringRef Producer,
159  bool isOptimized, StringRef Flags, unsigned RV,
160  StringRef SplitName = StringRef(),
162  DICompileUnit::DebugEmissionKind::FullDebug,
163  uint64_t DWOId = 0, bool SplitDebugInlining = true,
164  bool DebugInfoForProfiling = false,
167  bool RangesBaseAddress = false, StringRef SysRoot = {},
168  StringRef SDK = {});
169 
170  /// Create a file descriptor to hold debugging information for a file.
171  /// \param Filename File name.
172  /// \param Directory Directory.
173  /// \param Checksum Optional checksum kind (e.g. CSK_MD5, CSK_SHA1, etc.)
174  /// and value.
175  /// \param Source Optional source text.
176  DIFile *
177  createFile(StringRef Filename, StringRef Directory,
180 
181  /// Create debugging information entry for a macro.
182  /// \param Parent Macro parent (could be nullptr).
183  /// \param Line Source line number where the macro is defined.
184  /// \param MacroType DW_MACINFO_define or DW_MACINFO_undef.
185  /// \param Name Macro name.
186  /// \param Value Macro value.
187  DIMacro *createMacro(DIMacroFile *Parent, unsigned Line, unsigned MacroType,
188  StringRef Name, StringRef Value = StringRef());
189 
190  /// Create debugging information temporary entry for a macro file.
191  /// List of macro node direct children will be calculated by DIBuilder,
192  /// using the \p Parent relationship.
193  /// \param Parent Macro file parent (could be nullptr).
194  /// \param Line Source line number where the macro file is included.
195  /// \param File File descriptor containing the name of the macro file.
196  DIMacroFile *createTempMacroFile(DIMacroFile *Parent, unsigned Line,
197  DIFile *File);
198 
199  /// Create a single enumerator value.
202  bool IsUnsigned = false);
203 
204  /// Create a DWARF unspecified type.
206 
207  /// Create C++11 nullptr type.
209 
210  /// Create debugging information entry for a basic
211  /// type.
212  /// \param Name Type name.
213  /// \param SizeInBits Size of the type.
214  /// \param Encoding DWARF encoding code, e.g., dwarf::DW_ATE_float.
215  /// \param Flags Optional DWARF attributes, e.g., DW_AT_endianity.
216  DIBasicType *createBasicType(StringRef Name, uint64_t SizeInBits,
217  unsigned Encoding,
218  DINode::DIFlags Flags = DINode::FlagZero);
219 
220  /// Create debugging information entry for a string
221  /// type.
222  /// \param Name Type name.
223  /// \param SizeInBits Size of the type.
224  DIStringType *createStringType(StringRef Name, uint64_t SizeInBits);
225 
226  /// Create debugging information entry for Fortran
227  /// assumed length string type.
228  /// \param Name Type name.
229  /// \param StringLength String length expressed as DIVariable *.
230  /// \param StrLocationExp Optional memory location of the string.
231  DIStringType *createStringType(StringRef Name, DIVariable *StringLength,
232  DIExpression *StrLocationExp = nullptr);
233 
234  /// Create debugging information entry for Fortran
235  /// assumed length string type.
236  /// \param Name Type name.
237  /// \param StringLengthExp String length expressed in DIExpression form.
238  /// \param StrLocationExp Optional memory location of the string.
240  DIExpression *StringLengthExp,
241  DIExpression *StrLocationExp = nullptr);
242 
243  /// Create debugging information entry for a qualified
244  /// type, e.g. 'const int'.
245  /// \param Tag Tag identifing type, e.g. dwarf::TAG_volatile_type
246  /// \param FromTy Base Type.
247  DIDerivedType *createQualifiedType(unsigned Tag, DIType *FromTy);
248 
249  /// Create debugging information entry for a pointer.
250  /// \param PointeeTy Type pointed by this pointer.
251  /// \param SizeInBits Size.
252  /// \param AlignInBits Alignment. (optional)
253  /// \param DWARFAddressSpace DWARF address space. (optional)
254  /// \param Name Pointer type name. (optional)
255  /// \param Annotations Member annotations.
256  DIDerivedType *
257  createPointerType(DIType *PointeeTy, uint64_t SizeInBits,
258  uint32_t AlignInBits = 0,
259  Optional<unsigned> DWARFAddressSpace = None,
260  StringRef Name = "", DINodeArray Annotations = nullptr);
261 
262  /// Create debugging information entry for a pointer to member.
263  /// \param PointeeTy Type pointed to by this pointer.
264  /// \param SizeInBits Size.
265  /// \param AlignInBits Alignment. (optional)
266  /// \param Class Type for which this pointer points to members of.
267  DIDerivedType *
268  createMemberPointerType(DIType *PointeeTy, DIType *Class,
269  uint64_t SizeInBits, uint32_t AlignInBits = 0,
270  DINode::DIFlags Flags = DINode::FlagZero);
271 
272  /// Create debugging information entry for a c++
273  /// style reference or rvalue reference type.
275  uint64_t SizeInBits = 0,
276  uint32_t AlignInBits = 0,
277  Optional<unsigned> DWARFAddressSpace =
278  None);
279 
280  /// Create debugging information entry for a typedef.
281  /// \param Ty Original type.
282  /// \param Name Typedef name.
283  /// \param File File where this type is defined.
284  /// \param LineNo Line number.
285  /// \param Context The surrounding context for the typedef.
286  /// \param AlignInBits Alignment. (optional)
287  /// \param Flags Flags to describe inheritance attribute, e.g. private
288  /// \param Annotations Annotations. (optional)
290  unsigned LineNo, DIScope *Context,
291  uint32_t AlignInBits = 0,
292  DINode::DIFlags Flags = DINode::FlagZero,
293  DINodeArray Annotations = nullptr);
294 
295  /// Create debugging information entry for a 'friend'.
296  DIDerivedType *createFriend(DIType *Ty, DIType *FriendTy);
297 
298  /// Create debugging information entry to establish
299  /// inheritance relationship between two types.
300  /// \param Ty Original type.
301  /// \param BaseTy Base type. Ty is inherits from base.
302  /// \param BaseOffset Base offset.
303  /// \param VBPtrOffset Virtual base pointer offset.
304  /// \param Flags Flags to describe inheritance attribute,
305  /// e.g. private
307  uint64_t BaseOffset, uint32_t VBPtrOffset,
308  DINode::DIFlags Flags);
309 
310  /// Create debugging information entry for a member.
311  /// \param Scope Member scope.
312  /// \param Name Member name.
313  /// \param File File where this member is defined.
314  /// \param LineNo Line number.
315  /// \param SizeInBits Member size.
316  /// \param AlignInBits Member alignment.
317  /// \param OffsetInBits Member offset.
318  /// \param Flags Flags to encode member attribute, e.g. private
319  /// \param Ty Parent type.
320  /// \param Annotations Member annotations.
322  DIFile *File, unsigned LineNo,
323  uint64_t SizeInBits, uint32_t AlignInBits,
324  uint64_t OffsetInBits,
325  DINode::DIFlags Flags, DIType *Ty,
326  DINodeArray Annotations = nullptr);
327 
328  /// Create debugging information entry for a variant. A variant
329  /// normally should be a member of a variant part.
330  /// \param Scope Member scope.
331  /// \param Name Member name.
332  /// \param File File where this member is defined.
333  /// \param LineNo Line number.
334  /// \param SizeInBits Member size.
335  /// \param AlignInBits Member alignment.
336  /// \param OffsetInBits Member offset.
337  /// \param Flags Flags to encode member attribute, e.g. private
338  /// \param Discriminant The discriminant for this branch; null for
339  /// the default branch
340  /// \param Ty Parent type.
342  DIFile *File, unsigned LineNo,
343  uint64_t SizeInBits,
344  uint32_t AlignInBits,
345  uint64_t OffsetInBits,
346  Constant *Discriminant,
347  DINode::DIFlags Flags, DIType *Ty);
348 
349  /// Create debugging information entry for a bit field member.
350  /// \param Scope Member scope.
351  /// \param Name Member name.
352  /// \param File File where this member is defined.
353  /// \param LineNo Line number.
354  /// \param SizeInBits Member size.
355  /// \param OffsetInBits Member offset.
356  /// \param StorageOffsetInBits Member storage offset.
357  /// \param Flags Flags to encode member attribute.
358  /// \param Ty Parent type.
359  /// \param Annotations Member annotations.
361  DIFile *File, unsigned LineNo,
362  uint64_t SizeInBits,
363  uint64_t OffsetInBits,
364  uint64_t StorageOffsetInBits,
365  DINode::DIFlags Flags, DIType *Ty,
366  DINodeArray Annotations = nullptr);
367 
368  /// Create debugging information entry for a
369  /// C++ static data member.
370  /// \param Scope Member scope.
371  /// \param Name Member name.
372  /// \param File File where this member is declared.
373  /// \param LineNo Line number.
374  /// \param Ty Type of the static member.
375  /// \param Flags Flags to encode member attribute, e.g. private.
376  /// \param Val Const initializer of the member.
377  /// \param AlignInBits Member alignment.
379  DIFile *File, unsigned LineNo,
380  DIType *Ty, DINode::DIFlags Flags,
381  Constant *Val,
382  uint32_t AlignInBits = 0);
383 
384  /// Create debugging information entry for Objective-C
385  /// instance variable.
386  /// \param Name Member name.
387  /// \param File File where this member is defined.
388  /// \param LineNo Line number.
389  /// \param SizeInBits Member size.
390  /// \param AlignInBits Member alignment.
391  /// \param OffsetInBits Member offset.
392  /// \param Flags Flags to encode member attribute, e.g. private
393  /// \param Ty Parent type.
394  /// \param PropertyNode Property associated with this ivar.
395  DIDerivedType *createObjCIVar(StringRef Name, DIFile *File, unsigned LineNo,
396  uint64_t SizeInBits, uint32_t AlignInBits,
397  uint64_t OffsetInBits, DINode::DIFlags Flags,
398  DIType *Ty, MDNode *PropertyNode);
399 
400  /// Create debugging information entry for Objective-C
401  /// property.
402  /// \param Name Property name.
403  /// \param File File where this property is defined.
404  /// \param LineNumber Line number.
405  /// \param GetterName Name of the Objective C property getter selector.
406  /// \param SetterName Name of the Objective C property setter selector.
407  /// \param PropertyAttributes Objective C property attributes.
408  /// \param Ty Type.
410  unsigned LineNumber,
411  StringRef GetterName,
412  StringRef SetterName,
413  unsigned PropertyAttributes, DIType *Ty);
414 
415  /// Create debugging information entry for a class.
416  /// \param Scope Scope in which this class is defined.
417  /// \param Name class name.
418  /// \param File File where this member is defined.
419  /// \param LineNumber Line number.
420  /// \param SizeInBits Member size.
421  /// \param AlignInBits Member alignment.
422  /// \param OffsetInBits Member offset.
423  /// \param Flags Flags to encode member attribute, e.g. private
424  /// \param Elements class members.
425  /// \param VTableHolder Debug info of the base class that contains vtable
426  /// for this type. This is used in
427  /// DW_AT_containing_type. See DWARF documentation
428  /// for more info.
429  /// \param TemplateParms Template type parameters.
430  /// \param UniqueIdentifier A unique identifier for the class.
432  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
433  uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
434  DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements,
435  DIType *VTableHolder = nullptr, MDNode *TemplateParms = nullptr,
436  StringRef UniqueIdentifier = "");
437 
438  /// Create debugging information entry for a struct.
439  /// \param Scope Scope in which this struct is defined.
440  /// \param Name Struct name.
441  /// \param File File where this member is defined.
442  /// \param LineNumber Line number.
443  /// \param SizeInBits Member size.
444  /// \param AlignInBits Member alignment.
445  /// \param Flags Flags to encode member attribute, e.g. private
446  /// \param Elements Struct elements.
447  /// \param RunTimeLang Optional parameter, Objective-C runtime version.
448  /// \param UniqueIdentifier A unique identifier for the struct.
450  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
451  uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags,
452  DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang = 0,
453  DIType *VTableHolder = nullptr, StringRef UniqueIdentifier = "");
454 
455  /// Create debugging information entry for an union.
456  /// \param Scope Scope in which this union is defined.
457  /// \param Name Union name.
458  /// \param File File where this member is defined.
459  /// \param LineNumber Line number.
460  /// \param SizeInBits Member size.
461  /// \param AlignInBits Member alignment.
462  /// \param Flags Flags to encode member attribute, e.g. private
463  /// \param Elements Union elements.
464  /// \param RunTimeLang Optional parameter, Objective-C runtime version.
465  /// \param UniqueIdentifier A unique identifier for the union.
467  DIFile *File, unsigned LineNumber,
468  uint64_t SizeInBits, uint32_t AlignInBits,
469  DINode::DIFlags Flags,
470  DINodeArray Elements,
471  unsigned RunTimeLang = 0,
472  StringRef UniqueIdentifier = "");
473 
474  /// Create debugging information entry for a variant part. A
475  /// variant part normally has a discriminator (though this is not
476  /// required) and a number of variant children.
477  /// \param Scope Scope in which this union is defined.
478  /// \param Name Union name.
479  /// \param File File where this member is defined.
480  /// \param LineNumber Line number.
481  /// \param SizeInBits Member size.
482  /// \param AlignInBits Member alignment.
483  /// \param Flags Flags to encode member attribute, e.g. private
484  /// \param Discriminator Discriminant member
485  /// \param Elements Variant elements.
486  /// \param UniqueIdentifier A unique identifier for the union.
488  DIFile *File, unsigned LineNumber,
489  uint64_t SizeInBits, uint32_t AlignInBits,
490  DINode::DIFlags Flags,
491  DIDerivedType *Discriminator,
492  DINodeArray Elements,
493  StringRef UniqueIdentifier = "");
494 
495  /// Create debugging information for template
496  /// type parameter.
497  /// \param Scope Scope in which this type is defined.
498  /// \param Name Type parameter name.
499  /// \param Ty Parameter type.
500  /// \param IsDefault Parameter is default or not
502  StringRef Name,
503  DIType *Ty,
504  bool IsDefault);
505 
506  /// Create debugging information for template
507  /// value parameter.
508  /// \param Scope Scope in which this type is defined.
509  /// \param Name Value parameter name.
510  /// \param Ty Parameter type.
511  /// \param IsDefault Parameter is default or not
512  /// \param Val Constant parameter value.
515  bool IsDefault, Constant *Val);
516 
517  /// Create debugging information for a template template parameter.
518  /// \param Scope Scope in which this type is defined.
519  /// \param Name Value parameter name.
520  /// \param Ty Parameter type.
521  /// \param Val The fully qualified name of the template.
523  StringRef Name,
524  DIType *Ty,
525  StringRef Val);
526 
527  /// Create debugging information for a template parameter pack.
528  /// \param Scope Scope in which this type is defined.
529  /// \param Name Value parameter name.
530  /// \param Ty Parameter type.
531  /// \param Val An array of types in the pack.
533  StringRef Name,
534  DIType *Ty,
535  DINodeArray Val);
536 
537  /// Create debugging information entry for an array.
538  /// \param Size Array size.
539  /// \param AlignInBits Alignment.
540  /// \param Ty Element type.
541  /// \param Subscripts Subscripts.
542  /// \param DataLocation The location of the raw data of a descriptor-based
543  /// Fortran array, either a DIExpression* or
544  /// a DIVariable*.
545  /// \param Associated The associated attribute of a descriptor-based
546  /// Fortran array, either a DIExpression* or
547  /// a DIVariable*.
548  /// \param Allocated The allocated attribute of a descriptor-based
549  /// Fortran array, either a DIExpression* or
550  /// a DIVariable*.
551  /// \param Rank The rank attribute of a descriptor-based
552  /// Fortran array, either a DIExpression* or
553  /// a DIVariable*.
555  uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts,
556  PointerUnion<DIExpression *, DIVariable *> DataLocation = nullptr,
557  PointerUnion<DIExpression *, DIVariable *> Associated = nullptr,
558  PointerUnion<DIExpression *, DIVariable *> Allocated = nullptr,
560 
561  /// Create debugging information entry for a vector type.
562  /// \param Size Array size.
563  /// \param AlignInBits Alignment.
564  /// \param Ty Element type.
565  /// \param Subscripts Subscripts.
567  DIType *Ty, DINodeArray Subscripts);
568 
569  /// Create debugging information entry for an
570  /// enumeration.
571  /// \param Scope Scope in which this enumeration is defined.
572  /// \param Name Union name.
573  /// \param File File where this member is defined.
574  /// \param LineNumber Line number.
575  /// \param SizeInBits Member size.
576  /// \param AlignInBits Member alignment.
577  /// \param Elements Enumeration elements.
578  /// \param UnderlyingType Underlying type of a C++11/ObjC fixed enum.
579  /// \param UniqueIdentifier A unique identifier for the enum.
580  /// \param IsScoped Boolean flag indicate if this is C++11/ObjC 'enum class'.
582  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
583  uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
584  DIType *UnderlyingType, StringRef UniqueIdentifier = "", bool IsScoped = false);
585 
586  /// Create debugging information entry for a set.
587  /// \param Scope Scope in which this set is defined.
588  /// \param Name Set name.
589  /// \param File File where this set is defined.
590  /// \param LineNo Line number.
591  /// \param SizeInBits Set size.
592  /// \param AlignInBits Set alignment.
593  /// \param Ty Base type of the set.
594  DIDerivedType *createSetType(DIScope *Scope, StringRef Name, DIFile *File,
595  unsigned LineNo, uint64_t SizeInBits,
596  uint32_t AlignInBits, DIType *Ty);
597 
598  /// Create subroutine type.
599  /// \param ParameterTypes An array of subroutine parameter types. This
600  /// includes return type at 0th index.
601  /// \param Flags E.g.: LValueReference.
602  /// These flags are used to emit dwarf attributes.
603  /// \param CC Calling convention, e.g. dwarf::DW_CC_normal
605  createSubroutineType(DITypeRefArray ParameterTypes,
606  DINode::DIFlags Flags = DINode::FlagZero,
607  unsigned CC = 0);
608 
609  /// Create a distinct clone of \p SP with FlagArtificial set.
611 
612  /// Create a uniqued clone of \p Ty with FlagArtificial set.
613  static DIType *createArtificialType(DIType *Ty);
614 
615  /// Create a uniqued clone of \p Ty with FlagObjectPointer and
616  /// FlagArtificial set.
618 
619  /// Create a permanent forward-declared type.
621  DIScope *Scope, DIFile *F, unsigned Line,
622  unsigned RuntimeLang = 0,
623  uint64_t SizeInBits = 0,
624  uint32_t AlignInBits = 0,
625  StringRef UniqueIdentifier = "");
626 
627  /// Create a temporary forward-declared type.
629  unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line,
630  unsigned RuntimeLang = 0, uint64_t SizeInBits = 0,
631  uint32_t AlignInBits = 0, DINode::DIFlags Flags = DINode::FlagFwdDecl,
632  StringRef UniqueIdentifier = "", DINodeArray Annotations = nullptr);
633 
634  /// Retain DIScope* in a module even if it is not referenced
635  /// through debug info anchors.
636  void retainType(DIScope *T);
637 
638  /// Create unspecified parameter type
639  /// for a subroutine type.
641 
642  /// Get a DINodeArray, create one if required.
643  DINodeArray getOrCreateArray(ArrayRef<Metadata *> Elements);
644 
645  /// Get a DIMacroNodeArray, create one if required.
646  DIMacroNodeArray getOrCreateMacroArray(ArrayRef<Metadata *> Elements);
647 
648  /// Get a DITypeRefArray, create one if required.
650 
651  /// Create a descriptor for a value range. This
652  /// implicitly uniques the values returned.
653  DISubrange *getOrCreateSubrange(int64_t Lo, int64_t Count);
654  DISubrange *getOrCreateSubrange(int64_t Lo, Metadata *CountNode);
655  DISubrange *getOrCreateSubrange(Metadata *Count, Metadata *LowerBound,
656  Metadata *UpperBound, Metadata *Stride);
657 
660  DIGenericSubrange::BoundType LowerBound,
661  DIGenericSubrange::BoundType UpperBound,
663 
664  /// Create a new descriptor for the specified variable.
665  /// \param Context Variable scope.
666  /// \param Name Name of the variable.
667  /// \param LinkageName Mangled name of the variable.
668  /// \param File File where this variable is defined.
669  /// \param LineNo Line number.
670  /// \param Ty Variable Type.
671  /// \param IsLocalToUnit Boolean flag indicate whether this variable is
672  /// externally visible or not.
673  /// \param Expr The location of the global relative to the attached
674  /// GlobalVariable.
675  /// \param Decl Reference to the corresponding declaration.
676  /// \param AlignInBits Variable alignment(or 0 if no alignment attr was
677  /// specified)
680  unsigned LineNo, DIType *Ty, bool IsLocalToUnit, bool isDefined = true,
681  DIExpression *Expr = nullptr, MDNode *Decl = nullptr,
682  MDTuple *TemplateParams = nullptr, uint32_t AlignInBits = 0,
683  DINodeArray Annotations = nullptr);
684 
685  /// Identical to createGlobalVariable
686  /// except that the resulting DbgNode is temporary and meant to be RAUWed.
689  unsigned LineNo, DIType *Ty, bool IsLocalToUnit, MDNode *Decl = nullptr,
690  MDTuple *TemplateParams = nullptr, uint32_t AlignInBits = 0);
691 
692  /// Create a new descriptor for an auto variable. This is a local variable
693  /// that is not a subprogram parameter.
694  ///
695  /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually
696  /// leads to a \a DISubprogram.
697  ///
698  /// If \c AlwaysPreserve, this variable will be referenced from its
699  /// containing subprogram, and will survive some optimizations.
701  createAutoVariable(DIScope *Scope, StringRef Name, DIFile *File,
702  unsigned LineNo, DIType *Ty, bool AlwaysPreserve = false,
703  DINode::DIFlags Flags = DINode::FlagZero,
704  uint32_t AlignInBits = 0);
705 
706  /// Create a new descriptor for an label.
707  ///
708  /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually
709  /// leads to a \a DISubprogram.
710  DILabel *
711  createLabel(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
712  bool AlwaysPreserve = false);
713 
714  /// Create a new descriptor for a parameter variable.
715  ///
716  /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually
717  /// leads to a \a DISubprogram.
718  ///
719  /// \c ArgNo is the index (starting from \c 1) of this variable in the
720  /// subprogram parameters. \c ArgNo should not conflict with other
721  /// parameters of the same subprogram.
722  ///
723  /// If \c AlwaysPreserve, this variable will be referenced from its
724  /// containing subprogram, and will survive some optimizations.
726  createParameterVariable(DIScope *Scope, StringRef Name, unsigned ArgNo,
727  DIFile *File, unsigned LineNo, DIType *Ty,
728  bool AlwaysPreserve = false,
729  DINode::DIFlags Flags = DINode::FlagZero,
730  DINodeArray Annotations = nullptr);
731 
732  /// Create a new descriptor for the specified
733  /// variable which has a complex address expression for its address.
734  /// \param Addr An array of complex address operations.
736 
737  /// Create an expression for a variable that does not have an address, but
738  /// does have a constant value.
740  return DIExpression::get(
741  VMContext, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_stack_value});
742  }
743 
744  /// Create a new descriptor for the specified subprogram.
745  /// See comments in DISubprogram* for descriptions of these fields.
746  /// \param Scope Function scope.
747  /// \param Name Function name.
748  /// \param LinkageName Mangled function name.
749  /// \param File File where this variable is defined.
750  /// \param LineNo Line number.
751  /// \param Ty Function type.
752  /// \param ScopeLine Set to the beginning of the scope this starts
753  /// \param Flags e.g. is this function prototyped or not.
754  /// These flags are used to emit dwarf attributes.
755  /// \param SPFlags Additional flags specific to subprograms.
756  /// \param TParams Function template parameters.
757  /// \param ThrownTypes Exception types this function may throw.
758  /// \param Annotations Attribute Annotations.
759  /// \param TargetFuncName The name of the target function if this is
760  /// a trampoline.
761  DISubprogram *
762  createFunction(DIScope *Scope, StringRef Name, StringRef LinkageName,
763  DIFile *File, unsigned LineNo, DISubroutineType *Ty,
764  unsigned ScopeLine, DINode::DIFlags Flags = DINode::FlagZero,
765  DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero,
766  DITemplateParameterArray TParams = nullptr,
767  DISubprogram *Decl = nullptr,
768  DITypeArray ThrownTypes = nullptr,
769  DINodeArray Annotations = nullptr,
770  StringRef TargetFuncName = "");
771 
772  /// Identical to createFunction,
773  /// except that the resulting DbgNode is meant to be RAUWed.
775  DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File,
776  unsigned LineNo, DISubroutineType *Ty, unsigned ScopeLine,
777  DINode::DIFlags Flags = DINode::FlagZero,
778  DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero,
779  DITemplateParameterArray TParams = nullptr,
780  DISubprogram *Decl = nullptr, DITypeArray ThrownTypes = nullptr);
781 
782  /// Create a new descriptor for the specified C++ method.
783  /// See comments in \a DISubprogram* for descriptions of these fields.
784  /// \param Scope Function scope.
785  /// \param Name Function name.
786  /// \param LinkageName Mangled function name.
787  /// \param File File where this variable is defined.
788  /// \param LineNo Line number.
789  /// \param Ty Function type.
790  /// \param VTableIndex Index no of this method in virtual table, or -1u if
791  /// unrepresentable.
792  /// \param ThisAdjustment
793  /// MS ABI-specific adjustment of 'this' that occurs
794  /// in the prologue.
795  /// \param VTableHolder Type that holds vtable.
796  /// \param Flags e.g. is this function prototyped or not.
797  /// This flags are used to emit dwarf attributes.
798  /// \param SPFlags Additional flags specific to subprograms.
799  /// \param TParams Function template parameters.
800  /// \param ThrownTypes Exception types this function may throw.
801  DISubprogram *
802  createMethod(DIScope *Scope, StringRef Name, StringRef LinkageName,
803  DIFile *File, unsigned LineNo, DISubroutineType *Ty,
804  unsigned VTableIndex = 0, int ThisAdjustment = 0,
805  DIType *VTableHolder = nullptr,
806  DINode::DIFlags Flags = DINode::FlagZero,
807  DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero,
808  DITemplateParameterArray TParams = nullptr,
809  DITypeArray ThrownTypes = nullptr);
810 
811  /// Create common block entry for a Fortran common block.
812  /// \param Scope Scope of this common block.
813  /// \param decl Global variable declaration.
814  /// \param Name The name of this common block.
815  /// \param File The file this common block is defined.
816  /// \param LineNo Line number.
818  StringRef Name, DIFile *File,
819  unsigned LineNo);
820 
821  /// This creates new descriptor for a namespace with the specified
822  /// parent scope.
823  /// \param Scope Namespace scope
824  /// \param Name Name of this namespace
825  /// \param ExportSymbols True for C++ inline namespaces.
827  bool ExportSymbols);
828 
829  /// This creates new descriptor for a module with the specified
830  /// parent scope.
831  /// \param Scope Parent scope
832  /// \param Name Name of this module
833  /// \param ConfigurationMacros
834  /// A space-separated shell-quoted list of -D macro
835  /// definitions as they would appear on a command line.
836  /// \param IncludePath The path to the module map file.
837  /// \param APINotesFile The path to an API notes file for this module.
838  /// \param File Source file of the module.
839  /// Used for Fortran modules.
840  /// \param LineNo Source line number of the module.
841  /// Used for Fortran modules.
842  /// \param IsDecl This is a module declaration; default to false;
843  /// when set to true, only Scope and Name are required
844  /// as this entry is just a hint for the debugger to find
845  /// the corresponding definition in the global scope.
846  DIModule *createModule(DIScope *Scope, StringRef Name,
847  StringRef ConfigurationMacros, StringRef IncludePath,
848  StringRef APINotesFile = {}, DIFile *File = nullptr,
849  unsigned LineNo = 0, bool IsDecl = false);
850 
851  /// This creates a descriptor for a lexical block with a new file
852  /// attached. This merely extends the existing
853  /// lexical block as it crosses a file.
854  /// \param Scope Lexical block.
855  /// \param File Source file.
856  /// \param Discriminator DWARF path discriminator value.
857  DILexicalBlockFile *createLexicalBlockFile(DIScope *Scope, DIFile *File,
858  unsigned Discriminator = 0);
859 
860  /// This creates a descriptor for a lexical block with the
861  /// specified parent context.
862  /// \param Scope Parent lexical scope.
863  /// \param File Source file.
864  /// \param Line Line number.
865  /// \param Col Column number.
866  DILexicalBlock *createLexicalBlock(DIScope *Scope, DIFile *File,
867  unsigned Line, unsigned Col);
868 
869  /// Create a descriptor for an imported module.
870  /// \param Context The scope this module is imported into
871  /// \param NS The namespace being imported here.
872  /// \param File File where the declaration is located.
873  /// \param Line Line number of the declaration.
874  /// \param Elements Renamed elements.
875  DIImportedEntity *createImportedModule(DIScope *Context, DINamespace *NS,
876  DIFile *File, unsigned Line,
877  DINodeArray Elements = nullptr);
878 
879  /// Create a descriptor for an imported module.
880  /// \param Context The scope this module is imported into.
881  /// \param NS An aliased namespace.
882  /// \param File File where the declaration is located.
883  /// \param Line Line number of the declaration.
884  /// \param Elements Renamed elements.
885  DIImportedEntity *createImportedModule(DIScope *Context,
886  DIImportedEntity *NS, DIFile *File,
887  unsigned Line,
888  DINodeArray Elements = nullptr);
889 
890  /// Create a descriptor for an imported module.
891  /// \param Context The scope this module is imported into.
892  /// \param M The module being imported here
893  /// \param File File where the declaration is located.
894  /// \param Line Line number of the declaration.
895  /// \param Elements Renamed elements.
896  DIImportedEntity *createImportedModule(DIScope *Context, DIModule *M,
897  DIFile *File, unsigned Line,
898  DINodeArray Elements = nullptr);
899 
900  /// Create a descriptor for an imported function.
901  /// \param Context The scope this module is imported into.
902  /// \param Decl The declaration (or definition) of a function, type, or
903  /// variable.
904  /// \param File File where the declaration is located.
905  /// \param Line Line number of the declaration.
906  /// \param Elements Renamed elements.
907  DIImportedEntity *createImportedDeclaration(DIScope *Context, DINode *Decl,
908  DIFile *File, unsigned Line,
909  StringRef Name = "",
910  DINodeArray Elements = nullptr);
911 
912  /// Insert a new llvm.dbg.declare intrinsic call.
913  /// \param Storage llvm::Value of the variable
914  /// \param VarInfo Variable's debug info descriptor.
915  /// \param Expr A complex location expression.
916  /// \param DL Debug info location.
917  /// \param InsertAtEnd Location for the new intrinsic.
918  Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
919  DIExpression *Expr, const DILocation *DL,
920  BasicBlock *InsertAtEnd);
921 
922  /// Insert a new llvm.dbg.assign intrinsic call.
923  /// \param LinkedInstr Instruction with a DIAssignID to link with the new
924  /// intrinsic. The intrinsic will be inserted after
925  /// this instruction.
926  /// \param Val The value component of this dbg.assign.
927  /// \param SrcVar Variable's debug info descriptor.
928  /// \param ValExpr A complex location expression to modify \p Val.
929  /// \param Addr The address component (store destination).
930  /// \param AddrExpr A complex location expression to modify \p Addr.
931  /// NOTE: \p ValExpr carries the FragInfo for the
932  /// variable.
933  /// \param DL Debug info location, usually: (line: 0,
934  /// column: 0, scope: var-decl-scope). See
935  /// getDebugValueLoc.
936  DbgAssignIntrinsic *insertDbgAssign(Instruction *LinkedInstr, Value *Val,
937  DILocalVariable *SrcVar,
938  DIExpression *ValExpr, Value *Addr,
939  DIExpression *AddrExpr,
940  const DILocation *DL);
941 
942  /// Insert a new llvm.dbg.declare intrinsic call.
943  /// \param Storage llvm::Value of the variable
944  /// \param VarInfo Variable's debug info descriptor.
945  /// \param Expr A complex location expression.
946  /// \param DL Debug info location.
947  /// \param InsertBefore Location for the new intrinsic.
948  Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
949  DIExpression *Expr, const DILocation *DL,
950  Instruction *InsertBefore);
951 
952  /// Insert a new llvm.dbg.label intrinsic call.
953  /// \param LabelInfo Label's debug info descriptor.
954  /// \param DL Debug info location.
955  /// \param InsertBefore Location for the new intrinsic.
956  Instruction *insertLabel(DILabel *LabelInfo, const DILocation *DL,
957  Instruction *InsertBefore);
958 
959  /// Insert a new llvm.dbg.label intrinsic call.
960  /// \param LabelInfo Label's debug info descriptor.
961  /// \param DL Debug info location.
962  /// \param InsertAtEnd Location for the new intrinsic.
963  Instruction *insertLabel(DILabel *LabelInfo, const DILocation *DL,
964  BasicBlock *InsertAtEnd);
965 
966  /// Insert a new llvm.dbg.value intrinsic call.
967  /// \param Val llvm::Value of the variable
968  /// \param VarInfo Variable's debug info descriptor.
969  /// \param Expr A complex location expression.
970  /// \param DL Debug info location.
971  /// \param InsertAtEnd Location for the new intrinsic.
972  Instruction *insertDbgValueIntrinsic(llvm::Value *Val,
973  DILocalVariable *VarInfo,
974  DIExpression *Expr,
975  const DILocation *DL,
976  BasicBlock *InsertAtEnd);
977 
978  /// Insert a new llvm.dbg.value intrinsic call.
979  /// \param Val llvm::Value of the variable
980  /// \param VarInfo Variable's debug info descriptor.
981  /// \param Expr A complex location expression.
982  /// \param DL Debug info location.
983  /// \param InsertBefore Location for the new intrinsic.
984  Instruction *insertDbgValueIntrinsic(llvm::Value *Val,
985  DILocalVariable *VarInfo,
986  DIExpression *Expr,
987  const DILocation *DL,
988  Instruction *InsertBefore);
989 
990  /// Insert a new llvm.dbg.addr intrinsic call.
991  /// \param Addr llvm::Value of the address
992  /// \param VarInfo Variable's debug info descriptor.
993  /// \param Expr A complex location expression.
994  /// \param DL Debug info location.
995  /// \param InsertAtEnd Location for the new intrinsic.
996  Instruction *insertDbgAddrIntrinsic(llvm::Value *Addr,
997  DILocalVariable *VarInfo,
998  DIExpression *Expr,
999  const DILocation *DL,
1000  BasicBlock *InsertAtEnd);
1001 
1002  /// Insert a new llvm.dbg.addr intrinsic call.
1003  /// \param Addr llvm::Value of the address.
1004  /// \param VarInfo Variable's debug info descriptor.
1005  /// \param Expr A complex location expression.
1006  /// \param DL Debug info location.
1007  /// \param InsertBefore Location for the new intrinsic.
1008  Instruction *insertDbgAddrIntrinsic(llvm::Value *Addr,
1009  DILocalVariable *VarInfo,
1010  DIExpression *Expr,
1011  const DILocation *DL,
1012  Instruction *InsertBefore);
1013 
1014  /// Replace the vtable holder in the given type.
1015  ///
1016  /// If this creates a self reference, it may orphan some unresolved cycles
1017  /// in the operands of \c T, so \a DIBuilder needs to track that.
1018  void replaceVTableHolder(DICompositeType *&T,
1019  DIType *VTableHolder);
1020 
1021  /// Replace arrays on a composite type.
1022  ///
1023  /// If \c T is resolved, but the arrays aren't -- which can happen if \c T
1024  /// has a self-reference -- \a DIBuilder needs to track the array to
1025  /// resolve cycles.
1026  void replaceArrays(DICompositeType *&T, DINodeArray Elements,
1027  DINodeArray TParams = DINodeArray());
1028 
1029  /// Replace a temporary node.
1030  ///
1031  /// Call \a MDNode::replaceAllUsesWith() on \c N, replacing it with \c
1032  /// Replacement.
1033  ///
1034  /// If \c Replacement is the same as \c N.get(), instead call \a
1035  /// MDNode::replaceWithUniqued(). In this case, the uniqued node could
1036  /// have a different address, so we return the final address.
1037  template <class NodeTy>
1038  NodeTy *replaceTemporary(TempMDNode &&N, NodeTy *Replacement) {
1039  if (N.get() == Replacement)
1040  return cast<NodeTy>(MDNode::replaceWithUniqued(std::move(N)));
1041 
1042  N->replaceAllUsesWith(Replacement);
1043  return Replacement;
1044  }
1045  };
1046 
1047  // Create wrappers for C Binding types (see CBindingWrapping.h).
1049 
1050 } // end namespace llvm
1051 
1052 #endif // LLVM_IR_DIBUILDER_H
llvm::DIBuilder::createModule
DIModule * createModule(DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef APINotesFile={}, DIFile *File=nullptr, unsigned LineNo=0, bool IsDecl=false)
This creates new descriptor for a module with the specified parent scope.
Definition: DIBuilder.cpp:924
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::DIType
Base class for types.
Definition: DebugInfoMetadata.h:696
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::DIBuilder::getOrCreateTypeArray
DITypeRefArray getOrCreateTypeArray(ArrayRef< Metadata * > Elements)
Get a DITypeRefArray, create one if required.
Definition: DIBuilder.cpp:687
llvm::DIBuilder::finalize
void finalize()
Construct any deferred debug info descriptors.
Definition: DIBuilder.cpp:79
Optional.h
llvm::DIBuilder::replaceVTableHolder
void replaceVTableHolder(DICompositeType *&T, DIType *VTableHolder)
Replace the vtable holder in the given type.
Definition: DIBuilder.cpp:1148
llvm::DIBuilder
Definition: DIBuilder.h:42
DebugInfoMetadata.h
llvm::DIGenericSubrange
Definition: DebugInfoMetadata.h:401
llvm::Function
Definition: Function.h:60
llvm::DIBuilder::finalizeSubprogram
void finalizeSubprogram(DISubprogram *SP)
Finalize a specific subprogram - no new variables may be added to this subprogram afterwards.
Definition: DIBuilder.cpp:59
StringRef.h
llvm::DIBuilder::createBitFieldMemberType
DIDerivedType * createBitFieldMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint64_t OffsetInBits, uint64_t StorageOffsetInBits, DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations=nullptr)
Create debugging information entry for a bit field member.
Definition: DIBuilder.cpp:405
llvm::lltok::NameTableKind
@ NameTableKind
Definition: LLToken.h:449
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1199
llvm::DIBuilder::createPointerType
DIDerivedType * createPointerType(DIType *PointeeTy, uint64_t SizeInBits, uint32_t AlignInBits=0, Optional< unsigned > DWARFAddressSpace=None, StringRef Name="", DINodeArray Annotations=nullptr)
Create debugging information entry for a pointer.
Definition: DIBuilder.cpp:319
llvm::DIStringType
String type, Fortran CHARACTER(n)
Definition: DebugInfoMetadata.h:870
llvm::DIFile::ChecksumInfo
A single checksum, represented by a Kind and a Value (a string).
Definition: DebugInfoMetadata.h:584
llvm::DIBuilder::createTempGlobalVariableFwdDecl
DIGlobalVariable * createTempGlobalVariableFwdDecl(DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DIType *Ty, bool IsLocalToUnit, MDNode *Decl=nullptr, MDTuple *TemplateParams=nullptr, uint32_t AlignInBits=0)
Identical to createGlobalVariable except that the resulting DbgNode is temporary and meant to be RAUW...
Definition: DIBuilder.cpp:757
MapVector.h
llvm::DILocation
Debug location.
Definition: DebugInfoMetadata.h:1595
llvm::DIBuilder::insertDbgAssign
DbgAssignIntrinsic * insertDbgAssign(Instruction *LinkedInstr, Value *Val, DILocalVariable *SrcVar, DIExpression *ValExpr, Value *Addr, DIExpression *AddrExpr, const DILocation *DL)
Insert a new llvm.dbg.assign intrinsic call.
Definition: DIBuilder.cpp:964
DenseMap.h
llvm::DIBuilder::createTempFunctionFwdDecl
DISubprogram * createTempFunctionFwdDecl(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DISubroutineType *Ty, unsigned ScopeLine, DINode::DIFlags Flags=DINode::FlagZero, DISubprogram::DISPFlags SPFlags=DISubprogram::SPFlagZero, 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:867
llvm::Optional
Definition: APInt.h:33
T
#define T
Definition: Mips16ISelLowering.cpp:341
llvm::MapVector
This class implements a map that also provides access to all stored values in a deterministic order.
Definition: MapVector.h:37
llvm::DIBuilder::createMemberType
DIDerivedType * createMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations=nullptr)
Create debugging information entry for a member.
Definition: DIBuilder.cpp:379
llvm::DIBuilder::createSubroutineType
DISubroutineType * createSubroutineType(DITypeRefArray ParameterTypes, DINode::DIFlags Flags=DINode::FlagZero, unsigned CC=0)
Create subroutine type.
Definition: DIBuilder.cpp:546
llvm::DIExpression
DWARF expression.
Definition: DebugInfoMetadata.h:2596
llvm::DIBuilder::createQualifiedType
DIDerivedType * createQualifiedType(unsigned Tag, DIType *FromTy)
Create debugging information entry for a qualified type, e.g.
Definition: DIBuilder.cpp:313
llvm::dwarf::Tag
Tag
Definition: Dwarf.h:105
llvm::DIBuilder::DIBuilder
DIBuilder(Module &M, bool AllowUnresolved=true, DICompileUnit *CU=nullptr)
Construct a builder for a module.
Definition: DIBuilder.cpp:31
llvm::DINameKind::LinkageName
@ LinkageName
llvm::DIBuilder::createStringType
DIStringType * createStringType(StringRef Name, uint64_t SizeInBits)
Create debugging information entry for a string type.
Definition: DIBuilder.cpp:291
llvm::DIBuilder::createObjCProperty
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:443
llvm::DICompileUnit::DebugEmissionKind
DebugEmissionKind
Definition: DebugInfoMetadata.h:1365
llvm::DIBuilder::createReplaceableCompositeType
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="", DINodeArray Annotations=nullptr)
Create a temporary forward-declared type.
Definition: DIBuilder.cpp:662
llvm::DINamespace
Definition: DebugInfoMetadata.h:2296
llvm::DIBuilder::createFile
DIFile * createFile(StringRef Filename, StringRef Directory, Optional< DIFile::ChecksumInfo< StringRef >> Checksum=None, Optional< StringRef > Source=None)
Create a file descriptor to hold debugging information for a file.
Definition: DIBuilder.cpp:231
llvm::MDNode::get
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
Definition: Metadata.h:1400
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::DIBuilder::createTemplateParameterPack
DITemplateValueParameter * createTemplateParameterPack(DIScope *Scope, StringRef Name, DIType *Ty, DINodeArray Val)
Create debugging information for a template parameter pack.
Definition: DIBuilder.cpp:483
llvm::BasicBlock
LLVM Basic Block Representation.
Definition: BasicBlock.h:55
llvm::Annotations
Annotations lets you mark points and ranges inside source code, for tests:
Definition: Annotations.h:54
llvm::DIBuilder::createAutoVariable
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:797
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::DITypeRefArray
Definition: DebugInfoMetadata.h:71
llvm::DIBuilder::createSetType
DIDerivedType * createSetType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, DIType *Ty)
Create debugging information entry for a set.
Definition: DIBuilder.cpp:566
llvm::DIBuilder::createArtificialType
static DIType * createArtificialType(DIType *Ty)
Create a uniqued clone of Ty with FlagArtificial set.
Definition: DIBuilder.cpp:622
llvm::DIObjCProperty
Definition: DebugInfoMetadata.h:3251
DEFINE_ISA_CONVERSION_FUNCTIONS
#define DEFINE_ISA_CONVERSION_FUNCTIONS(ty, ref)
Definition: CBindingWrapping.h:28
llvm::DIBuilder::replaceTemporary
NodeTy * replaceTemporary(TempMDNode &&N, NodeTy *Replacement)
Replace a temporary node.
Definition: DIBuilder.h:1038
llvm::DIBuilder::createStaticMemberType
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:420
llvm::ISD::Constant
@ Constant
Definition: ISDOpcodes.h:76
llvm::DILocalVariable
Local variable.
Definition: DebugInfoMetadata.h:3096
llvm::DIMacro
Definition: DebugInfoMetadata.h:3486
llvm::DIBuilder::createMacro
DIMacro * createMacro(DIMacroFile *Parent, unsigned Line, unsigned MacroType, StringRef Name, StringRef Value=StringRef())
Create debugging information entry for a macro.
Definition: DIBuilder.cpp:237
llvm::DIBuilder::createTempMacroFile
DIMacroFile * createTempMacroFile(DIMacroFile *Parent, unsigned Line, DIFile *File)
Create debugging information temporary entry for a macro file.
Definition: DIBuilder.cpp:249
llvm::DIBuilder::createCommonBlock
DICommonBlock * createCommonBlock(DIScope *Scope, DIGlobalVariable *decl, StringRef Name, DIFile *File, unsigned LineNo)
Create common block entry for a Fortran common block.
Definition: DIBuilder.cpp:905
llvm::DIBuilder::createTypedef
DIDerivedType * createTypedef(DIType *Ty, StringRef Name, DIFile *File, unsigned LineNo, DIScope *Context, uint32_t AlignInBits=0, DINode::DIFlags Flags=DINode::FlagZero, DINodeArray Annotations=nullptr)
Create debugging information entry for a typedef.
Definition: DIBuilder.cpp:350
llvm::DIBuilder::retainType
void retainType(DIScope *T)
Retain DIScope* in a module even if it is not referenced through debug info anchors.
Definition: DIBuilder.cpp:637
llvm::DISubprogram::DISPFlags
DISPFlags
Debug info subprogram flags.
Definition: DebugInfoMetadata.h:1856
llvm::MDTuple
Tuple of metadata.
Definition: Metadata.h:1329
llvm::DIBuilder::createEnumerator
DIEnumerator * createEnumerator(StringRef Name, const APSInt &Value)
Create a single enumerator value.
Definition: DIBuilder.cpp:269
llvm::DISubrange
Array subrange.
Definition: DebugInfoMetadata.h:338
llvm::DIBuilder::createFriend
DIDerivedType * createFriend(DIType *Ty, DIType *FriendTy)
Create debugging information entry for a 'friend'.
Definition: DIBuilder.cpp:360
llvm::DITemplateTypeParameter
Definition: DebugInfoMetadata.h:2441
llvm::Instruction
Definition: Instruction.h:42
llvm::APSInt
An arbitrary precision integer that knows its signedness.
Definition: APSInt.h:23
llvm::DIBuilder::createUnionType
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:520
llvm::DIBuilder::createVariantPart
DICompositeType * createVariantPart(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DIDerivedType *Discriminator, DINodeArray Elements, StringRef UniqueIdentifier="")
Create debugging information entry for a variant part.
Definition: DIBuilder.cpp:533
llvm::Metadata
Root of the metadata hierarchy.
Definition: Metadata.h:62
llvm::DIBuilder::replaceArrays
void replaceArrays(DICompositeType *&T, DINodeArray Elements, DINodeArray TParams=DINodeArray())
Replace arrays on a composite type.
Definition: DIBuilder.cpp:1167
llvm::DIBuilder::createObjectPointerType
static DIType * createObjectPointerType(DIType *Ty)
Create a uniqued clone of Ty with FlagObjectPointer and FlagArtificial set.
Definition: DIBuilder.cpp:629
llvm::DICommonBlock
Definition: DebugInfoMetadata.h:3037
llvm::DIBuilder::createReferenceType
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:341
llvm::Constant
This is an important base class in LLVM.
Definition: Constant.h:41
llvm::DIEnumerator
Enumeration value.
Definition: DebugInfoMetadata.h:449
llvm::DIBuilder::createMethod
DISubprogram * createMethod(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DISubroutineType *Ty, unsigned VTableIndex=0, int ThisAdjustment=0, DIType *VTableHolder=nullptr, DINode::DIFlags Flags=DINode::FlagZero, DISubprogram::DISPFlags SPFlags=DISubprogram::SPFlagZero, DITemplateParameterArray TParams=nullptr, DITypeArray ThrownTypes=nullptr)
Create a new descriptor for the specified C++ method.
Definition: DIBuilder.cpp:882
uint64_t
llvm::DIBuilder::createForwardDecl
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:648
llvm::DIBuilder::createArrayType
DICompositeType * createArrayType(uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts, PointerUnion< DIExpression *, DIVariable * > DataLocation=nullptr, PointerUnion< DIExpression *, DIVariable * > Associated=nullptr, PointerUnion< DIExpression *, DIVariable * > Allocated=nullptr, PointerUnion< DIExpression *, DIVariable * > Rank=nullptr)
Create debugging information entry for an array.
Definition: DIBuilder.cpp:579
Addr
uint64_t Addr
Definition: ELFObjHandler.cpp:79
llvm::DIBuilder::createEnumerationType
DICompositeType * createEnumerationType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements, DIType *UnderlyingType, StringRef UniqueIdentifier="", bool IsScoped=false)
Create debugging information entry for an enumeration.
Definition: DIBuilder.cpp:552
llvm::DIBuilder::createClassType
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:490
llvm::DIBuilder::createExpression
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:835
llvm::DIGlobalVariable
Global variables.
Definition: DebugInfoMetadata.h:2952
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::MDNode::replaceWithUniqued
static std::enable_if_t< std::is_base_of< MDNode, T >::value, T * > replaceWithUniqued(std::unique_ptr< T, TempMDNodeDeleter > N)
Replace a temporary node with a uniqued one.
Definition: Metadata.h:1168
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:67
llvm::DIBuilder::createTemplateTemplateParameter
DITemplateValueParameter * createTemplateTemplateParameter(DIScope *Scope, StringRef Name, DIType *Ty, StringRef Val)
Create debugging information for a template template parameter.
Definition: DIBuilder.cpp:475
llvm::DenseMap
Definition: DenseMap.h:714
llvm::DIBuilder::createMemberPointerType
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:330
llvm::DICompileUnit
Compile unit.
Definition: DebugInfoMetadata.h:1360
ArrayRef.h
llvm::DIMacroFile
Definition: DebugInfoMetadata.h:3537
llvm::DIBuilder::createArtificialSubprogram
static DISubprogram * createArtificialSubprogram(DISubprogram *SP)
Create a distinct clone of SP with FlagArtificial set.
Definition: DIBuilder.cpp:611
llvm::ISD::BasicBlock
@ BasicBlock
Various leaf nodes.
Definition: ISDOpcodes.h:71
llvm::DIBuilder::createLabel
DILabel * createLabel(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, bool AlwaysPreserve=false)
Create a new descriptor for an label.
Definition: DIBuilder.cpp:817
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
llvm::MDNode
Metadata node.
Definition: Metadata.h:944
llvm::DIBuilder::createImportedDeclaration
DIImportedEntity * createImportedDeclaration(DIScope *Context, DINode *Decl, DIFile *File, unsigned Line, StringRef Name="", DINodeArray Elements=nullptr)
Create a descriptor for an imported function.
Definition: DIBuilder.cpp:221
llvm::DIBasicType
Basic type, like 'int' or 'float'.
Definition: DebugInfoMetadata.h:802
llvm::DISubroutineType
Type array for a subprogram.
Definition: DebugInfoMetadata.h:1303
llvm::DICompositeType
Composite types.
Definition: DebugInfoMetadata.h:1080
llvm::DIBuilder::createImportedModule
DIImportedEntity * createImportedModule(DIScope *Context, DINamespace *NS, DIFile *File, unsigned Line, DINodeArray Elements=nullptr)
Create a descriptor for an imported module.
Definition: DIBuilder.cpp:194
llvm::Sched::Source
@ Source
Definition: TargetLowering.h:99
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::DIBuilder::createLexicalBlockFile
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:933
llvm::DICompileUnit::DebugNameTableKind
DebugNameTableKind
Definition: DebugInfoMetadata.h:1373
llvm::DIBuilder::createVariantMemberType
DIDerivedType * createVariantMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Constant *Discriminant, DINode::DIFlags Flags, DIType *Ty)
Create debugging information entry for a variant.
Definition: DIBuilder.cpp:395
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Dwarf.h
uint32_t
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
CC
auto CC
Definition: RISCVRedundantCopyElimination.cpp:79
llvm::DIVariable
Base class for variables.
Definition: DebugInfoMetadata.h:2530
llvm::DIBuilder::operator=
DIBuilder & operator=(const DIBuilder &)=delete
llvm::DIBuilder::getOrCreateGenericSubrange
DIGenericSubrange * getOrCreateGenericSubrange(DIGenericSubrange::BoundType Count, DIGenericSubrange::BoundType LowerBound, DIGenericSubrange::BoundType UpperBound, DIGenericSubrange::BoundType Stride)
Definition: DIBuilder.cpp:717
llvm::DIBuilder::createLexicalBlock
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:939
llvm::PointerUnion
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
Definition: PointerUnion.h:112
llvm::DIBuilder::createTemplateTypeParameter
DITemplateTypeParameter * createTemplateTypeParameter(DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault)
Create debugging information for template type parameter.
Definition: DIBuilder.cpp:451
llvm::DIBuilder::createInheritance
DIDerivedType * createInheritance(DIType *Ty, DIType *BaseTy, uint64_t BaseOffset, uint32_t VBPtrOffset, DINode::DIFlags Flags)
Create debugging information entry to establish inheritance relationship between two types.
Definition: DIBuilder.cpp:367
llvm::DIBuilder::createCompileUnit
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, DICompileUnit::DebugNameTableKind NameTableKind=DICompileUnit::DebugNameTableKind::Default, bool RangesBaseAddress=false, StringRef SysRoot={}, StringRef SDK={})
A CompileUnit provides an anchor for all debugging information generated during this instance of comp...
Definition: DIBuilder.cpp:151
llvm::DIBuilder::createNameSpace
DINamespace * createNameSpace(DIScope *Scope, StringRef Name, bool ExportSymbols)
This creates new descriptor for a namespace with the specified parent scope.
Definition: DIBuilder.cpp:912
llvm::DIBuilder::createStructType
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:507
llvm::None
constexpr std::nullopt_t None
Definition: None.h:27
llvm::DIBuilder::createUnspecifiedType
DIBasicType * createUnspecifiedType(StringRef Name)
Create a DWARF unspecified type.
Definition: DIBuilder.cpp:274
llvm::DIScope
Base class for scope-like contexts.
Definition: DebugInfoMetadata.h:509
llvm::DIBuilder::createObjCIVar
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:432
Casting.h
TrackingMDRef.h
llvm::DIBuilder::createVectorType
DICompositeType * createVectorType(uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts)
Create debugging information entry for a vector type.
Definition: DIBuilder.cpp:601
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::DIBuilder::getOrCreateArray
DINodeArray getOrCreateArray(ArrayRef< Metadata * > Elements)
Get a DINodeArray, create one if required.
Definition: DIBuilder.cpp:678
llvm::DIBuilder::createParameterVariable
DILocalVariable * createParameterVariable(DIScope *Scope, StringRef Name, unsigned ArgNo, DIFile *File, unsigned LineNo, DIType *Ty, bool AlwaysPreserve=false, DINode::DIFlags Flags=DINode::FlagZero, DINodeArray Annotations=nullptr)
Create a new descriptor for a parameter variable.
Definition: DIBuilder.cpp:807
llvm::DICompileUnit::DebugNameTableKind::Default
@ Default
llvm::DIBuilder::createGlobalVariableExpression
DIGlobalVariableExpression * createGlobalVariableExpression(DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DIType *Ty, bool IsLocalToUnit, bool isDefined=true, DIExpression *Expr=nullptr, MDNode *Decl=nullptr, MDTuple *TemplateParams=nullptr, uint32_t AlignInBits=0, DINodeArray Annotations=nullptr)
Create a new descriptor for the specified variable.
Definition: DIBuilder.cpp:738
llvm::DIDerivedType
Derived types.
Definition: DebugInfoMetadata.h:962
llvm::DIGlobalVariableExpression
A pair of DIGlobalVariable and DIExpression.
Definition: DebugInfoMetadata.h:3396
llvm::DIBuilder::createTemplateValueParameter
DITemplateValueParameter * createTemplateValueParameter(DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault, Constant *Val)
Create debugging information for template value parameter.
Definition: DIBuilder.cpp:466
llvm::DITemplateValueParameter
Definition: DebugInfoMetadata.h:2480
llvm::DIBuilder::createFunction
DISubprogram * createFunction(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned LineNo, DISubroutineType *Ty, unsigned ScopeLine, DINode::DIFlags Flags=DINode::FlagZero, DISubprogram::DISPFlags SPFlags=DISubprogram::SPFlagZero, DITemplateParameterArray TParams=nullptr, DISubprogram *Decl=nullptr, DITypeArray ThrownTypes=nullptr, DINodeArray Annotations=nullptr, StringRef TargetFuncName="")
Create a new descriptor for the specified subprogram.
Definition: DIBuilder.cpp:846
LLVMDIBuilderRef
struct LLVMOpaqueDIBuilder * LLVMDIBuilderRef
Represents an LLVM debug info builder.
Definition: Types.h:117
llvm::DIBuilder::createNullPtrType
DIBasicType * createNullPtrType()
Create C++11 nullptr type.
Definition: DIBuilder.cpp:279
llvm::DIBuilder::getOrCreateSubrange
DISubrange * getOrCreateSubrange(int64_t Lo, int64_t Count)
Create a descriptor for a value range.
Definition: DIBuilder.cpp:698
llvm::DIBuilder::getOrCreateMacroArray
DIMacroNodeArray getOrCreateMacroArray(ArrayRef< Metadata * > Elements)
Get a DIMacroNodeArray, create one if required.
Definition: DIBuilder.cpp:683
SmallVector.h
llvm::DINode::DIFlags
DIFlags
Debug info flags.
Definition: DebugInfoMetadata.h:170
N
#define N
llvm::DISubprogram
Subprogram description.
Definition: DebugInfoMetadata.h:1841
llvm::DIModule
Represents a module in the programming language, for example, a Clang module, or a Fortran module.
Definition: DebugInfoMetadata.h:2345
llvm::DILabel
Label.
Definition: DebugInfoMetadata.h:3186
llvm::DIBuilder::createBasicType
DIBasicType * createBasicType(StringRef Name, uint64_t SizeInBits, unsigned Encoding, DINode::DIFlags Flags=DINode::FlagZero)
Create debugging information entry for a basic type.
Definition: DIBuilder.cpp:283
CU
Definition: AArch64AsmBackend.cpp:504
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::DIBuilder::createUnspecifiedParameter
DIBasicType * createUnspecifiedParameter()
Create unspecified parameter type for a subroutine type.
Definition: DIBuilder.cpp:645
llvm::codeview::PublicSymFlags::Function
@ Function
llvm::DIBuilder::createConstantValueExpression
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:739
SetVector.h
llvm::DIFile
File.
Definition: DebugInfoMetadata.h:563