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/SetVector.h"
21 #include "llvm/ADT/SmallVector.h"
22 #include "llvm/ADT/StringRef.h"
25 #include "llvm/IR/TrackingMDRef.h"
26 #include "llvm/Support/Casting.h"
27 #include <algorithm>
28 #include <cstdint>
29 #include <optional>
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.
177  StringRef Filename, StringRef Directory,
178  std::optional<DIFile::ChecksumInfo<StringRef>> Checksum = std::nullopt,
179  std::optional<StringRef> Source = std::nullopt);
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  std::optional<unsigned> DWARFAddressSpace = std::nullopt,
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  unsigned Tag, DIType *RTy, uint64_t SizeInBits = 0,
276  uint32_t AlignInBits = 0,
277  std::optional<unsigned> DWARFAddressSpace = std::nullopt);
278 
279  /// Create debugging information entry for a typedef.
280  /// \param Ty Original type.
281  /// \param Name Typedef name.
282  /// \param File File where this type is defined.
283  /// \param LineNo Line number.
284  /// \param Context The surrounding context for the typedef.
285  /// \param AlignInBits Alignment. (optional)
286  /// \param Flags Flags to describe inheritance attribute, e.g. private
287  /// \param Annotations Annotations. (optional)
289  unsigned LineNo, DIScope *Context,
290  uint32_t AlignInBits = 0,
291  DINode::DIFlags Flags = DINode::FlagZero,
292  DINodeArray Annotations = nullptr);
293 
294  /// Create debugging information entry for a 'friend'.
295  DIDerivedType *createFriend(DIType *Ty, DIType *FriendTy);
296 
297  /// Create debugging information entry to establish
298  /// inheritance relationship between two types.
299  /// \param Ty Original type.
300  /// \param BaseTy Base type. Ty is inherits from base.
301  /// \param BaseOffset Base offset.
302  /// \param VBPtrOffset Virtual base pointer offset.
303  /// \param Flags Flags to describe inheritance attribute,
304  /// e.g. private
306  uint64_t BaseOffset, uint32_t VBPtrOffset,
307  DINode::DIFlags Flags);
308 
309  /// Create debugging information entry for a member.
310  /// \param Scope Member scope.
311  /// \param Name Member name.
312  /// \param File File where this member is defined.
313  /// \param LineNo Line number.
314  /// \param SizeInBits Member size.
315  /// \param AlignInBits Member alignment.
316  /// \param OffsetInBits Member offset.
317  /// \param Flags Flags to encode member attribute, e.g. private
318  /// \param Ty Parent type.
319  /// \param Annotations Member annotations.
321  DIFile *File, unsigned LineNo,
322  uint64_t SizeInBits, uint32_t AlignInBits,
323  uint64_t OffsetInBits,
324  DINode::DIFlags Flags, DIType *Ty,
325  DINodeArray Annotations = nullptr);
326 
327  /// Create debugging information entry for a variant. A variant
328  /// normally should be a member of a variant part.
329  /// \param Scope Member scope.
330  /// \param Name Member name.
331  /// \param File File where this member is defined.
332  /// \param LineNo Line number.
333  /// \param SizeInBits Member size.
334  /// \param AlignInBits Member alignment.
335  /// \param OffsetInBits Member offset.
336  /// \param Flags Flags to encode member attribute, e.g. private
337  /// \param Discriminant The discriminant for this branch; null for
338  /// the default branch
339  /// \param Ty Parent type.
341  DIFile *File, unsigned LineNo,
342  uint64_t SizeInBits,
343  uint32_t AlignInBits,
344  uint64_t OffsetInBits,
345  Constant *Discriminant,
346  DINode::DIFlags Flags, DIType *Ty);
347 
348  /// Create debugging information entry for a bit field member.
349  /// \param Scope Member scope.
350  /// \param Name Member name.
351  /// \param File File where this member is defined.
352  /// \param LineNo Line number.
353  /// \param SizeInBits Member size.
354  /// \param OffsetInBits Member offset.
355  /// \param StorageOffsetInBits Member storage offset.
356  /// \param Flags Flags to encode member attribute.
357  /// \param Ty Parent type.
358  /// \param Annotations Member annotations.
360  DIFile *File, unsigned LineNo,
361  uint64_t SizeInBits,
362  uint64_t OffsetInBits,
363  uint64_t StorageOffsetInBits,
364  DINode::DIFlags Flags, DIType *Ty,
365  DINodeArray Annotations = nullptr);
366 
367  /// Create debugging information entry for a
368  /// C++ static data member.
369  /// \param Scope Member scope.
370  /// \param Name Member name.
371  /// \param File File where this member is declared.
372  /// \param LineNo Line number.
373  /// \param Ty Type of the static member.
374  /// \param Flags Flags to encode member attribute, e.g. private.
375  /// \param Val Const initializer of the member.
376  /// \param AlignInBits Member alignment.
378  DIFile *File, unsigned LineNo,
379  DIType *Ty, DINode::DIFlags Flags,
380  Constant *Val,
381  uint32_t AlignInBits = 0);
382 
383  /// Create debugging information entry for Objective-C
384  /// instance variable.
385  /// \param Name Member name.
386  /// \param File File where this member is defined.
387  /// \param LineNo Line number.
388  /// \param SizeInBits Member size.
389  /// \param AlignInBits Member alignment.
390  /// \param OffsetInBits Member offset.
391  /// \param Flags Flags to encode member attribute, e.g. private
392  /// \param Ty Parent type.
393  /// \param PropertyNode Property associated with this ivar.
394  DIDerivedType *createObjCIVar(StringRef Name, DIFile *File, unsigned LineNo,
395  uint64_t SizeInBits, uint32_t AlignInBits,
396  uint64_t OffsetInBits, DINode::DIFlags Flags,
397  DIType *Ty, MDNode *PropertyNode);
398 
399  /// Create debugging information entry for Objective-C
400  /// property.
401  /// \param Name Property name.
402  /// \param File File where this property is defined.
403  /// \param LineNumber Line number.
404  /// \param GetterName Name of the Objective C property getter selector.
405  /// \param SetterName Name of the Objective C property setter selector.
406  /// \param PropertyAttributes Objective C property attributes.
407  /// \param Ty Type.
409  unsigned LineNumber,
410  StringRef GetterName,
411  StringRef SetterName,
412  unsigned PropertyAttributes, DIType *Ty);
413 
414  /// Create debugging information entry for a class.
415  /// \param Scope Scope in which this class is defined.
416  /// \param Name class name.
417  /// \param File File where this member is defined.
418  /// \param LineNumber Line number.
419  /// \param SizeInBits Member size.
420  /// \param AlignInBits Member alignment.
421  /// \param OffsetInBits Member offset.
422  /// \param Flags Flags to encode member attribute, e.g. private
423  /// \param Elements class members.
424  /// \param VTableHolder Debug info of the base class that contains vtable
425  /// for this type. This is used in
426  /// DW_AT_containing_type. See DWARF documentation
427  /// for more info.
428  /// \param TemplateParms Template type parameters.
429  /// \param UniqueIdentifier A unique identifier for the class.
431  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
432  uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
433  DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements,
434  DIType *VTableHolder = nullptr, MDNode *TemplateParms = nullptr,
435  StringRef UniqueIdentifier = "");
436 
437  /// Create debugging information entry for a struct.
438  /// \param Scope Scope in which this struct is defined.
439  /// \param Name Struct name.
440  /// \param File File where this member is defined.
441  /// \param LineNumber Line number.
442  /// \param SizeInBits Member size.
443  /// \param AlignInBits Member alignment.
444  /// \param Flags Flags to encode member attribute, e.g. private
445  /// \param Elements Struct elements.
446  /// \param RunTimeLang Optional parameter, Objective-C runtime version.
447  /// \param UniqueIdentifier A unique identifier for the struct.
449  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
450  uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags,
451  DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang = 0,
452  DIType *VTableHolder = nullptr, StringRef UniqueIdentifier = "");
453 
454  /// Create debugging information entry for an union.
455  /// \param Scope Scope in which this union is defined.
456  /// \param Name Union name.
457  /// \param File File where this member is defined.
458  /// \param LineNumber Line number.
459  /// \param SizeInBits Member size.
460  /// \param AlignInBits Member alignment.
461  /// \param Flags Flags to encode member attribute, e.g. private
462  /// \param Elements Union elements.
463  /// \param RunTimeLang Optional parameter, Objective-C runtime version.
464  /// \param UniqueIdentifier A unique identifier for the union.
466  DIFile *File, unsigned LineNumber,
467  uint64_t SizeInBits, uint32_t AlignInBits,
468  DINode::DIFlags Flags,
469  DINodeArray Elements,
470  unsigned RunTimeLang = 0,
471  StringRef UniqueIdentifier = "");
472 
473  /// Create debugging information entry for a variant part. A
474  /// variant part normally has a discriminator (though this is not
475  /// required) and a number of variant children.
476  /// \param Scope Scope in which this union is defined.
477  /// \param Name Union name.
478  /// \param File File where this member is defined.
479  /// \param LineNumber Line number.
480  /// \param SizeInBits Member size.
481  /// \param AlignInBits Member alignment.
482  /// \param Flags Flags to encode member attribute, e.g. private
483  /// \param Discriminator Discriminant member
484  /// \param Elements Variant elements.
485  /// \param UniqueIdentifier A unique identifier for the union.
487  DIFile *File, unsigned LineNumber,
488  uint64_t SizeInBits, uint32_t AlignInBits,
489  DINode::DIFlags Flags,
490  DIDerivedType *Discriminator,
491  DINodeArray Elements,
492  StringRef UniqueIdentifier = "");
493 
494  /// Create debugging information for template
495  /// type parameter.
496  /// \param Scope Scope in which this type is defined.
497  /// \param Name Type parameter name.
498  /// \param Ty Parameter type.
499  /// \param IsDefault Parameter is default or not
501  StringRef Name,
502  DIType *Ty,
503  bool IsDefault);
504 
505  /// Create debugging information for template
506  /// value parameter.
507  /// \param Scope Scope in which this type is defined.
508  /// \param Name Value parameter name.
509  /// \param Ty Parameter type.
510  /// \param IsDefault Parameter is default or not
511  /// \param Val Constant parameter value.
514  bool IsDefault, Constant *Val);
515 
516  /// Create debugging information for a template template parameter.
517  /// \param Scope Scope in which this type is defined.
518  /// \param Name Value parameter name.
519  /// \param Ty Parameter type.
520  /// \param Val The fully qualified name of the template.
522  StringRef Name,
523  DIType *Ty,
524  StringRef Val);
525 
526  /// Create debugging information for a template parameter pack.
527  /// \param Scope Scope in which this type is defined.
528  /// \param Name Value parameter name.
529  /// \param Ty Parameter type.
530  /// \param Val An array of types in the pack.
532  StringRef Name,
533  DIType *Ty,
534  DINodeArray Val);
535 
536  /// Create debugging information entry for an array.
537  /// \param Size Array size.
538  /// \param AlignInBits Alignment.
539  /// \param Ty Element type.
540  /// \param Subscripts Subscripts.
541  /// \param DataLocation The location of the raw data of a descriptor-based
542  /// Fortran array, either a DIExpression* or
543  /// a DIVariable*.
544  /// \param Associated The associated attribute of a descriptor-based
545  /// Fortran array, either a DIExpression* or
546  /// a DIVariable*.
547  /// \param Allocated The allocated attribute of a descriptor-based
548  /// Fortran array, either a DIExpression* or
549  /// a DIVariable*.
550  /// \param Rank The rank attribute of a descriptor-based
551  /// Fortran array, either a DIExpression* or
552  /// a DIVariable*.
554  uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts,
555  PointerUnion<DIExpression *, DIVariable *> DataLocation = nullptr,
556  PointerUnion<DIExpression *, DIVariable *> Associated = nullptr,
557  PointerUnion<DIExpression *, DIVariable *> Allocated = nullptr,
559 
560  /// Create debugging information entry for a vector type.
561  /// \param Size Array size.
562  /// \param AlignInBits Alignment.
563  /// \param Ty Element type.
564  /// \param Subscripts Subscripts.
566  DIType *Ty, DINodeArray Subscripts);
567 
568  /// Create debugging information entry for an
569  /// enumeration.
570  /// \param Scope Scope in which this enumeration is defined.
571  /// \param Name Union name.
572  /// \param File File where this member is defined.
573  /// \param LineNumber Line number.
574  /// \param SizeInBits Member size.
575  /// \param AlignInBits Member alignment.
576  /// \param Elements Enumeration elements.
577  /// \param UnderlyingType Underlying type of a C++11/ObjC fixed enum.
578  /// \param UniqueIdentifier A unique identifier for the enum.
579  /// \param IsScoped Boolean flag indicate if this is C++11/ObjC 'enum class'.
581  DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
582  uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
583  DIType *UnderlyingType, StringRef UniqueIdentifier = "", bool IsScoped = false);
584 
585  /// Create debugging information entry for a set.
586  /// \param Scope Scope in which this set is defined.
587  /// \param Name Set name.
588  /// \param File File where this set is defined.
589  /// \param LineNo Line number.
590  /// \param SizeInBits Set size.
591  /// \param AlignInBits Set alignment.
592  /// \param Ty Base type of the set.
593  DIDerivedType *createSetType(DIScope *Scope, StringRef Name, DIFile *File,
594  unsigned LineNo, uint64_t SizeInBits,
595  uint32_t AlignInBits, DIType *Ty);
596 
597  /// Create subroutine type.
598  /// \param ParameterTypes An array of subroutine parameter types. This
599  /// includes return type at 0th index.
600  /// \param Flags E.g.: LValueReference.
601  /// These flags are used to emit dwarf attributes.
602  /// \param CC Calling convention, e.g. dwarf::DW_CC_normal
604  createSubroutineType(DITypeRefArray ParameterTypes,
605  DINode::DIFlags Flags = DINode::FlagZero,
606  unsigned CC = 0);
607 
608  /// Create a distinct clone of \p SP with FlagArtificial set.
610 
611  /// Create a uniqued clone of \p Ty with FlagArtificial set.
612  static DIType *createArtificialType(DIType *Ty);
613 
614  /// Create a uniqued clone of \p Ty with FlagObjectPointer and
615  /// FlagArtificial set.
617 
618  /// Create a permanent forward-declared type.
620  DIScope *Scope, DIFile *F, unsigned Line,
621  unsigned RuntimeLang = 0,
622  uint64_t SizeInBits = 0,
623  uint32_t AlignInBits = 0,
624  StringRef UniqueIdentifier = "");
625 
626  /// Create a temporary forward-declared type.
628  unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line,
629  unsigned RuntimeLang = 0, uint64_t SizeInBits = 0,
630  uint32_t AlignInBits = 0, DINode::DIFlags Flags = DINode::FlagFwdDecl,
631  StringRef UniqueIdentifier = "", DINodeArray Annotations = nullptr);
632 
633  /// Retain DIScope* in a module even if it is not referenced
634  /// through debug info anchors.
635  void retainType(DIScope *T);
636 
637  /// Create unspecified parameter type
638  /// for a subroutine type.
640 
641  /// Get a DINodeArray, create one if required.
642  DINodeArray getOrCreateArray(ArrayRef<Metadata *> Elements);
643 
644  /// Get a DIMacroNodeArray, create one if required.
645  DIMacroNodeArray getOrCreateMacroArray(ArrayRef<Metadata *> Elements);
646 
647  /// Get a DITypeRefArray, create one if required.
649 
650  /// Create a descriptor for a value range. This
651  /// implicitly uniques the values returned.
652  DISubrange *getOrCreateSubrange(int64_t Lo, int64_t Count);
653  DISubrange *getOrCreateSubrange(int64_t Lo, Metadata *CountNode);
654  DISubrange *getOrCreateSubrange(Metadata *Count, Metadata *LowerBound,
655  Metadata *UpperBound, Metadata *Stride);
656 
659  DIGenericSubrange::BoundType LowerBound,
660  DIGenericSubrange::BoundType UpperBound,
662 
663  /// Create a new descriptor for the specified variable.
664  /// \param Context Variable scope.
665  /// \param Name Name of the variable.
666  /// \param LinkageName Mangled name of the variable.
667  /// \param File File where this variable is defined.
668  /// \param LineNo Line number.
669  /// \param Ty Variable Type.
670  /// \param IsLocalToUnit Boolean flag indicate whether this variable is
671  /// externally visible or not.
672  /// \param Expr The location of the global relative to the attached
673  /// GlobalVariable.
674  /// \param Decl Reference to the corresponding declaration.
675  /// \param AlignInBits Variable alignment(or 0 if no alignment attr was
676  /// specified)
679  unsigned LineNo, DIType *Ty, bool IsLocalToUnit, bool isDefined = true,
680  DIExpression *Expr = nullptr, MDNode *Decl = nullptr,
681  MDTuple *TemplateParams = nullptr, uint32_t AlignInBits = 0,
682  DINodeArray Annotations = nullptr);
683 
684  /// Identical to createGlobalVariable
685  /// except that the resulting DbgNode is temporary and meant to be RAUWed.
688  unsigned LineNo, DIType *Ty, bool IsLocalToUnit, MDNode *Decl = nullptr,
689  MDTuple *TemplateParams = nullptr, uint32_t AlignInBits = 0);
690 
691  /// Create a new descriptor for an auto variable. This is a local variable
692  /// that is not a subprogram parameter.
693  ///
694  /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually
695  /// leads to a \a DISubprogram.
696  ///
697  /// If \c AlwaysPreserve, this variable will be referenced from its
698  /// containing subprogram, and will survive some optimizations.
700  createAutoVariable(DIScope *Scope, StringRef Name, DIFile *File,
701  unsigned LineNo, DIType *Ty, bool AlwaysPreserve = false,
702  DINode::DIFlags Flags = DINode::FlagZero,
703  uint32_t AlignInBits = 0);
704 
705  /// Create a new descriptor for an label.
706  ///
707  /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually
708  /// leads to a \a DISubprogram.
709  DILabel *
710  createLabel(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
711  bool AlwaysPreserve = false);
712 
713  /// Create a new descriptor for a parameter variable.
714  ///
715  /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually
716  /// leads to a \a DISubprogram.
717  ///
718  /// \c ArgNo is the index (starting from \c 1) of this variable in the
719  /// subprogram parameters. \c ArgNo should not conflict with other
720  /// parameters of the same subprogram.
721  ///
722  /// If \c AlwaysPreserve, this variable will be referenced from its
723  /// containing subprogram, and will survive some optimizations.
725  createParameterVariable(DIScope *Scope, StringRef Name, unsigned ArgNo,
726  DIFile *File, unsigned LineNo, DIType *Ty,
727  bool AlwaysPreserve = false,
728  DINode::DIFlags Flags = DINode::FlagZero,
729  DINodeArray Annotations = nullptr);
730 
731  /// Create a new descriptor for the specified
732  /// variable which has a complex address expression for its address.
733  /// \param Addr An array of complex address operations.
735 
736  /// Create an expression for a variable that does not have an address, but
737  /// does have a constant value.
739  return DIExpression::get(
740  VMContext, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_stack_value});
741  }
742 
743  /// Create a new descriptor for the specified subprogram.
744  /// See comments in DISubprogram* for descriptions of these fields.
745  /// \param Scope Function scope.
746  /// \param Name Function name.
747  /// \param LinkageName Mangled function name.
748  /// \param File File where this variable is defined.
749  /// \param LineNo Line number.
750  /// \param Ty Function type.
751  /// \param ScopeLine Set to the beginning of the scope this starts
752  /// \param Flags e.g. is this function prototyped or not.
753  /// These flags are used to emit dwarf attributes.
754  /// \param SPFlags Additional flags specific to subprograms.
755  /// \param TParams Function template parameters.
756  /// \param ThrownTypes Exception types this function may throw.
757  /// \param Annotations Attribute Annotations.
758  /// \param TargetFuncName The name of the target function if this is
759  /// a trampoline.
760  DISubprogram *
761  createFunction(DIScope *Scope, StringRef Name, StringRef LinkageName,
762  DIFile *File, unsigned LineNo, DISubroutineType *Ty,
763  unsigned ScopeLine, DINode::DIFlags Flags = DINode::FlagZero,
764  DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero,
765  DITemplateParameterArray TParams = nullptr,
766  DISubprogram *Decl = nullptr,
767  DITypeArray ThrownTypes = nullptr,
768  DINodeArray Annotations = nullptr,
769  StringRef TargetFuncName = "");
770 
771  /// Identical to createFunction,
772  /// except that the resulting DbgNode is meant to be RAUWed.
774  DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File,
775  unsigned LineNo, DISubroutineType *Ty, unsigned ScopeLine,
776  DINode::DIFlags Flags = DINode::FlagZero,
777  DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero,
778  DITemplateParameterArray TParams = nullptr,
779  DISubprogram *Decl = nullptr, DITypeArray ThrownTypes = nullptr);
780 
781  /// Create a new descriptor for the specified C++ method.
782  /// See comments in \a DISubprogram* for descriptions of these fields.
783  /// \param Scope Function scope.
784  /// \param Name Function name.
785  /// \param LinkageName Mangled function name.
786  /// \param File File where this variable is defined.
787  /// \param LineNo Line number.
788  /// \param Ty Function type.
789  /// \param VTableIndex Index no of this method in virtual table, or -1u if
790  /// unrepresentable.
791  /// \param ThisAdjustment
792  /// MS ABI-specific adjustment of 'this' that occurs
793  /// in the prologue.
794  /// \param VTableHolder Type that holds vtable.
795  /// \param Flags e.g. is this function prototyped or not.
796  /// This flags are used to emit dwarf attributes.
797  /// \param SPFlags Additional flags specific to subprograms.
798  /// \param TParams Function template parameters.
799  /// \param ThrownTypes Exception types this function may throw.
800  DISubprogram *
801  createMethod(DIScope *Scope, StringRef Name, StringRef LinkageName,
802  DIFile *File, unsigned LineNo, DISubroutineType *Ty,
803  unsigned VTableIndex = 0, int ThisAdjustment = 0,
804  DIType *VTableHolder = nullptr,
805  DINode::DIFlags Flags = DINode::FlagZero,
806  DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagZero,
807  DITemplateParameterArray TParams = nullptr,
808  DITypeArray ThrownTypes = nullptr);
809 
810  /// Create common block entry for a Fortran common block.
811  /// \param Scope Scope of this common block.
812  /// \param decl Global variable declaration.
813  /// \param Name The name of this common block.
814  /// \param File The file this common block is defined.
815  /// \param LineNo Line number.
817  StringRef Name, DIFile *File,
818  unsigned LineNo);
819 
820  /// This creates new descriptor for a namespace with the specified
821  /// parent scope.
822  /// \param Scope Namespace scope
823  /// \param Name Name of this namespace
824  /// \param ExportSymbols True for C++ inline namespaces.
826  bool ExportSymbols);
827 
828  /// This creates new descriptor for a module with the specified
829  /// parent scope.
830  /// \param Scope Parent scope
831  /// \param Name Name of this module
832  /// \param ConfigurationMacros
833  /// A space-separated shell-quoted list of -D macro
834  /// definitions as they would appear on a command line.
835  /// \param IncludePath The path to the module map file.
836  /// \param APINotesFile The path to an API notes file for this module.
837  /// \param File Source file of the module.
838  /// Used for Fortran modules.
839  /// \param LineNo Source line number of the module.
840  /// Used for Fortran modules.
841  /// \param IsDecl This is a module declaration; default to false;
842  /// when set to true, only Scope and Name are required
843  /// as this entry is just a hint for the debugger to find
844  /// the corresponding definition in the global scope.
845  DIModule *createModule(DIScope *Scope, StringRef Name,
846  StringRef ConfigurationMacros, StringRef IncludePath,
847  StringRef APINotesFile = {}, DIFile *File = nullptr,
848  unsigned LineNo = 0, bool IsDecl = false);
849 
850  /// This creates a descriptor for a lexical block with a new file
851  /// attached. This merely extends the existing
852  /// lexical block as it crosses a file.
853  /// \param Scope Lexical block.
854  /// \param File Source file.
855  /// \param Discriminator DWARF path discriminator value.
856  DILexicalBlockFile *createLexicalBlockFile(DIScope *Scope, DIFile *File,
857  unsigned Discriminator = 0);
858 
859  /// This creates a descriptor for a lexical block with the
860  /// specified parent context.
861  /// \param Scope Parent lexical scope.
862  /// \param File Source file.
863  /// \param Line Line number.
864  /// \param Col Column number.
865  DILexicalBlock *createLexicalBlock(DIScope *Scope, DIFile *File,
866  unsigned Line, unsigned Col);
867 
868  /// Create a descriptor for an imported module.
869  /// \param Context The scope this module is imported into
870  /// \param NS The namespace being imported here.
871  /// \param File File where the declaration is located.
872  /// \param Line Line number of the declaration.
873  /// \param Elements Renamed elements.
874  DIImportedEntity *createImportedModule(DIScope *Context, DINamespace *NS,
875  DIFile *File, unsigned Line,
876  DINodeArray Elements = nullptr);
877 
878  /// Create a descriptor for an imported module.
879  /// \param Context The scope this module is imported into.
880  /// \param NS An aliased namespace.
881  /// \param File File where the declaration is located.
882  /// \param Line Line number of the declaration.
883  /// \param Elements Renamed elements.
884  DIImportedEntity *createImportedModule(DIScope *Context,
885  DIImportedEntity *NS, DIFile *File,
886  unsigned Line,
887  DINodeArray Elements = nullptr);
888 
889  /// Create a descriptor for an imported module.
890  /// \param Context The scope this module is imported into.
891  /// \param M The module being imported here
892  /// \param File File where the declaration is located.
893  /// \param Line Line number of the declaration.
894  /// \param Elements Renamed elements.
895  DIImportedEntity *createImportedModule(DIScope *Context, DIModule *M,
896  DIFile *File, unsigned Line,
897  DINodeArray Elements = nullptr);
898 
899  /// Create a descriptor for an imported function.
900  /// \param Context The scope this module is imported into.
901  /// \param Decl The declaration (or definition) of a function, type, or
902  /// variable.
903  /// \param File File where the declaration is located.
904  /// \param Line Line number of the declaration.
905  /// \param Elements Renamed elements.
906  DIImportedEntity *createImportedDeclaration(DIScope *Context, DINode *Decl,
907  DIFile *File, unsigned Line,
908  StringRef Name = "",
909  DINodeArray Elements = nullptr);
910 
911  /// Insert a new llvm.dbg.declare intrinsic call.
912  /// \param Storage llvm::Value of the variable
913  /// \param VarInfo Variable's debug info descriptor.
914  /// \param Expr A complex location expression.
915  /// \param DL Debug info location.
916  /// \param InsertAtEnd Location for the new intrinsic.
917  Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
918  DIExpression *Expr, const DILocation *DL,
919  BasicBlock *InsertAtEnd);
920 
921  /// Insert a new llvm.dbg.assign intrinsic call.
922  /// \param LinkedInstr Instruction with a DIAssignID to link with the new
923  /// intrinsic. The intrinsic will be inserted after
924  /// this instruction.
925  /// \param Val The value component of this dbg.assign.
926  /// \param SrcVar Variable's debug info descriptor.
927  /// \param ValExpr A complex location expression to modify \p Val.
928  /// \param Addr The address component (store destination).
929  /// \param AddrExpr A complex location expression to modify \p Addr.
930  /// NOTE: \p ValExpr carries the FragInfo for the
931  /// variable.
932  /// \param DL Debug info location, usually: (line: 0,
933  /// column: 0, scope: var-decl-scope). See
934  /// getDebugValueLoc.
935  DbgAssignIntrinsic *insertDbgAssign(Instruction *LinkedInstr, Value *Val,
936  DILocalVariable *SrcVar,
937  DIExpression *ValExpr, Value *Addr,
938  DIExpression *AddrExpr,
939  const DILocation *DL);
940 
941  /// Insert a new llvm.dbg.declare intrinsic call.
942  /// \param Storage llvm::Value of the variable
943  /// \param VarInfo Variable's debug info descriptor.
944  /// \param Expr A complex location expression.
945  /// \param DL Debug info location.
946  /// \param InsertBefore Location for the new intrinsic.
947  Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo,
948  DIExpression *Expr, const DILocation *DL,
949  Instruction *InsertBefore);
950 
951  /// Insert a new llvm.dbg.label intrinsic call.
952  /// \param LabelInfo Label's debug info descriptor.
953  /// \param DL Debug info location.
954  /// \param InsertBefore Location for the new intrinsic.
955  Instruction *insertLabel(DILabel *LabelInfo, const DILocation *DL,
956  Instruction *InsertBefore);
957 
958  /// Insert a new llvm.dbg.label intrinsic call.
959  /// \param LabelInfo Label's debug info descriptor.
960  /// \param DL Debug info location.
961  /// \param InsertAtEnd Location for the new intrinsic.
962  Instruction *insertLabel(DILabel *LabelInfo, const DILocation *DL,
963  BasicBlock *InsertAtEnd);
964 
965  /// Insert a new llvm.dbg.value intrinsic call.
966  /// \param Val llvm::Value of the variable
967  /// \param VarInfo Variable's debug info descriptor.
968  /// \param Expr A complex location expression.
969  /// \param DL Debug info location.
970  /// \param InsertAtEnd Location for the new intrinsic.
971  Instruction *insertDbgValueIntrinsic(llvm::Value *Val,
972  DILocalVariable *VarInfo,
973  DIExpression *Expr,
974  const DILocation *DL,
975  BasicBlock *InsertAtEnd);
976 
977  /// Insert a new llvm.dbg.value intrinsic call.
978  /// \param Val llvm::Value of the variable
979  /// \param VarInfo Variable's debug info descriptor.
980  /// \param Expr A complex location expression.
981  /// \param DL Debug info location.
982  /// \param InsertBefore Location for the new intrinsic.
983  Instruction *insertDbgValueIntrinsic(llvm::Value *Val,
984  DILocalVariable *VarInfo,
985  DIExpression *Expr,
986  const DILocation *DL,
987  Instruction *InsertBefore);
988 
989  /// Insert a new llvm.dbg.addr intrinsic call.
990  /// \param Addr llvm::Value of the address
991  /// \param VarInfo Variable's debug info descriptor.
992  /// \param Expr A complex location expression.
993  /// \param DL Debug info location.
994  /// \param InsertAtEnd Location for the new intrinsic.
995  Instruction *insertDbgAddrIntrinsic(llvm::Value *Addr,
996  DILocalVariable *VarInfo,
997  DIExpression *Expr,
998  const DILocation *DL,
999  BasicBlock *InsertAtEnd);
1000 
1001  /// Insert a new llvm.dbg.addr intrinsic call.
1002  /// \param Addr llvm::Value of the address.
1003  /// \param VarInfo Variable's debug info descriptor.
1004  /// \param Expr A complex location expression.
1005  /// \param DL Debug info location.
1006  /// \param InsertBefore Location for the new intrinsic.
1007  Instruction *insertDbgAddrIntrinsic(llvm::Value *Addr,
1008  DILocalVariable *VarInfo,
1009  DIExpression *Expr,
1010  const DILocation *DL,
1011  Instruction *InsertBefore);
1012 
1013  /// Replace the vtable holder in the given type.
1014  ///
1015  /// If this creates a self reference, it may orphan some unresolved cycles
1016  /// in the operands of \c T, so \a DIBuilder needs to track that.
1017  void replaceVTableHolder(DICompositeType *&T,
1018  DIType *VTableHolder);
1019 
1020  /// Replace arrays on a composite type.
1021  ///
1022  /// If \c T is resolved, but the arrays aren't -- which can happen if \c T
1023  /// has a self-reference -- \a DIBuilder needs to track the array to
1024  /// resolve cycles.
1025  void replaceArrays(DICompositeType *&T, DINodeArray Elements,
1026  DINodeArray TParams = DINodeArray());
1027 
1028  /// Replace a temporary node.
1029  ///
1030  /// Call \a MDNode::replaceAllUsesWith() on \c N, replacing it with \c
1031  /// Replacement.
1032  ///
1033  /// If \c Replacement is the same as \c N.get(), instead call \a
1034  /// MDNode::replaceWithUniqued(). In this case, the uniqued node could
1035  /// have a different address, so we return the final address.
1036  template <class NodeTy>
1037  NodeTy *replaceTemporary(TempMDNode &&N, NodeTy *Replacement) {
1038  if (N.get() == Replacement)
1039  return cast<NodeTy>(MDNode::replaceWithUniqued(std::move(N)));
1040 
1041  N->replaceAllUsesWith(Replacement);
1042  return Replacement;
1043  }
1044  };
1045 
1046  // Create wrappers for C Binding types (see CBindingWrapping.h).
1048 
1049 } // end namespace llvm
1050 
1051 #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:925
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::DIType
Base class for types.
Definition: DebugInfoMetadata.h:699
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:688
llvm::DIBuilder::finalize
void finalize()
Construct any deferred debug info descriptors.
Definition: DIBuilder.cpp:79
llvm::DIBuilder::replaceVTableHolder
void replaceVTableHolder(DICompositeType *&T, DIType *VTableHolder)
Replace the vtable holder in the given type.
Definition: DIBuilder.cpp:1149
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:406
llvm::lltok::NameTableKind
@ NameTableKind
Definition: LLToken.h:449
llvm::DIBuilder::createReferenceType
DIDerivedType * createReferenceType(unsigned Tag, DIType *RTy, uint64_t SizeInBits=0, uint32_t AlignInBits=0, std::optional< unsigned > DWARFAddressSpace=std::nullopt)
Create debugging information entry for a c++ style reference or rvalue reference type.
Definition: DIBuilder.cpp:341
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::DIStringType
String type, Fortran CHARACTER(n)
Definition: DebugInfoMetadata.h:873
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:758
MapVector.h
llvm::DILocation
Debug location.
Definition: DebugInfoMetadata.h:1600
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:965
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:868
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:380
llvm::DIBuilder::createSubroutineType
DISubroutineType * createSubroutineType(DITypeRefArray ParameterTypes, DINode::DIFlags Flags=DINode::FlagZero, unsigned CC=0)
Create subroutine type.
Definition: DIBuilder.cpp:547
llvm::DIExpression
DWARF expression.
Definition: DebugInfoMetadata.h:2601
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:444
llvm::DICompileUnit::DebugEmissionKind
DebugEmissionKind
Definition: DebugInfoMetadata.h:1370
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:663
llvm::DINamespace
Definition: DebugInfoMetadata.h:2301
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:484
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:53
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:798
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:567
llvm::DIBuilder::createPointerType
DIDerivedType * createPointerType(DIType *PointeeTy, uint64_t SizeInBits, uint32_t AlignInBits=0, std::optional< unsigned > DWARFAddressSpace=std::nullopt, StringRef Name="", DINodeArray Annotations=nullptr)
Create debugging information entry for a pointer.
Definition: DIBuilder.cpp:319
llvm::DIBuilder::createArtificialType
static DIType * createArtificialType(DIType *Ty)
Create a uniqued clone of Ty with FlagArtificial set.
Definition: DIBuilder.cpp:623
llvm::DIObjCProperty
Definition: DebugInfoMetadata.h:3256
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:1037
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:421
llvm::ISD::Constant
@ Constant
Definition: ISDOpcodes.h:76
llvm::DILocalVariable
Local variable.
Definition: DebugInfoMetadata.h:3101
llvm::DIMacro
Definition: DebugInfoMetadata.h:3492
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:906
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:638
llvm::DISubprogram::DISPFlags
DISPFlags
Debug info subprogram flags.
Definition: DebugInfoMetadata.h:1861
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:361
llvm::DITemplateTypeParameter
Definition: DebugInfoMetadata.h:2446
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:521
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:534
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:1168
llvm::DIBuilder::createObjectPointerType
static DIType * createObjectPointerType(DIType *Ty)
Create a uniqued clone of Ty with FlagObjectPointer and FlagArtificial set.
Definition: DIBuilder.cpp:630
llvm::DICommonBlock
Definition: DebugInfoMetadata.h:3042
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:883
uint64_t
llvm::DIBuilder::createFile
DIFile * createFile(StringRef Filename, StringRef Directory, std::optional< DIFile::ChecksumInfo< StringRef >> Checksum=std::nullopt, std::optional< StringRef > Source=std::nullopt)
Create a file descriptor to hold debugging information for a file.
Definition: DIBuilder.cpp:231
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:649
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:580
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:553
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:491
llvm::DIGlobalVariable
Global variables.
Definition: DebugInfoMetadata.h:2957
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:476
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:1365
ArrayRef.h
llvm::DIMacroFile
Definition: DebugInfoMetadata.h:3543
llvm::DIBuilder::createArtificialSubprogram
static DISubprogram * createArtificialSubprogram(DISubprogram *SP)
Create a distinct clone of SP with FlagArtificial set.
Definition: DIBuilder.cpp:612
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:818
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:805
llvm::DISubroutineType
Type array for a subprogram.
Definition: DebugInfoMetadata.h:1308
llvm::DICompositeType
Composite types.
Definition: DebugInfoMetadata.h:1085
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:934
llvm::DICompileUnit::DebugNameTableKind
DebugNameTableKind
Definition: DebugInfoMetadata.h:1378
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:396
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:2535
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:718
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:940
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:452
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:368
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::createExpression
DIExpression * createExpression(ArrayRef< uint64_t > Addr=std::nullopt)
Create a new descriptor for the specified variable which has a complex address expression for its add...
Definition: DIBuilder.cpp:836
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:913
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:508
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:433
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:602
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:679
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:808
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:739
llvm::DIDerivedType
Derived types.
Definition: DebugInfoMetadata.h:965
llvm::DIGlobalVariableExpression
A pair of DIGlobalVariable and DIExpression.
Definition: DebugInfoMetadata.h:3401
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:467
llvm::DITemplateValueParameter
Definition: DebugInfoMetadata.h:2485
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:847
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:699
llvm::DIBuilder::getOrCreateMacroArray
DIMacroNodeArray getOrCreateMacroArray(ArrayRef< Metadata * > Elements)
Get a DIMacroNodeArray, create one if required.
Definition: DIBuilder.cpp:684
SmallVector.h
llvm::DINode::DIFlags
DIFlags
Debug info flags.
Definition: DebugInfoMetadata.h:170
N
#define N
llvm::DISubprogram
Subprogram description.
Definition: DebugInfoMetadata.h:1846
llvm::DIModule
Represents a module in the programming language, for example, a Clang module, or a Fortran module.
Definition: DebugInfoMetadata.h:2350
llvm::DILabel
Label.
Definition: DebugInfoMetadata.h:3191
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:505
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:646
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:738
SetVector.h
llvm::DIFile
File.
Definition: DebugInfoMetadata.h:563