LLVM: include/llvm/IR/DIBuilder.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_IR_DIBUILDER_H
15#define LLVM_IR_DIBUILDER_H
16
28#include
29#include
30#include
31
32namespace llvm {
33
43
45
49
50 DICompileUnit *CUNode;
51
53
58
59
60
62
63
65 bool AllowUnresolvedNodes;
66
67
68
69
70
71
72
74 SubprogramTrackedNodes;
75
77 getImportTrackingVector(const DIScope *S) {
79 ? getSubprogramNodesTrackingVector(S)
80 : ImportedModules;
81 }
83 getSubprogramNodesTrackingVector(const DIScope *S) {
84 return SubprogramTrackedNodes[cast(S)->getSubprogram()];
85 }
86
87
88
89
90 void trackIfUnresolved(MDNode *N);
91
92
95
96
101
102 public:
103
104
105
106
107
108
113
114
116
117
118
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
154 uint64_t DWOId = 0, bool SplitDebugInlining = true,
155 bool DebugInfoForProfiling = false,
158 bool RangesBaseAddress = false, StringRef SysRoot = {},
160
161
162
163
164
165
166
168 StringRef Filename, StringRef Directory,
169 std::optional<DIFile::ChecksumInfo> Checksum = std::nullopt,
170 std::optional Source = std::nullopt);
171
172
173
174
175
176
177
179 unsigned MacroType, StringRef Name,
180 StringRef Value = StringRef());
181
182
183
184
185
186
187
189 unsigned Line, DIFile *File);
190
191
193 const APSInt &Value);
195 bool IsUnsigned = false);
196
197
199
200
202
203
204
205
206
207
208
209
210
211
212
213
214
215
219 uint32_t NumExtraInhabitants = 0,
220 uint32_t DataSizeInBits = 0);
221
222
223
224
225
226
227
230 uint32_t AlignInBits, unsigned Encoding,
232
233
234
235
236
237
238
241 uint32_t AlignInBits, unsigned Encoding,
243
244
245
246
247
248
249
250
251
254 uint32_t AlignInBits, unsigned Encoding,
256 APInt Denominator);
257
258
259
260
261
264
265
266
267
268
269
272 DIExpression *StrLocationExp = nullptr);
273
274
275
276
277
278
280 createStringType(StringRef Name, DIExpression *StringLengthExp,
281 DIExpression *StrLocationExp = nullptr);
282
283
284
285
286
288
289
290
291
292
293
294
295
299 std::optional DWARFAddressSpace = std::nullopt,
300 StringRef Name = "", DINodeArray Annotations = nullptr);
301
302
305 bool IsAddressDiscriminated,
306 unsigned ExtraDiscriminator, bool IsaPointer,
307 bool authenticatesNullValues);
308
309
310
311
312
313
318
319
320
322 unsigned Tag, DIType *RTy, uint64_t SizeInBits = 0,
324 std::optional DWARFAddressSpace = std::nullopt);
325
326
327
328
329
330
331
332
333
334
336 createTypedef(DIType *Ty, StringRef Name, DIFile *File, unsigned LineNo,
337 DIScope *Context, uint32_t AlignInBits = 0,
339 DINodeArray Annotations = nullptr);
340
341
342
343
344
345
346
347
348
349
350
351
354 unsigned LineNo, DIScope *Context, DINodeArray TParams,
357 DINodeArray Annotations = nullptr);
358
359
361
362
363
364
365
366
367
368
369
374
375
376
377
378
379
380
381
382
383
384
385
387 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
389 DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations = nullptr);
390
391
392
393
394
395
396
397
398
399
400
401
403 createMemberType(DIScope *Scope, StringRef Name, DIFile *File,
406 DINodeArray Annotations = nullptr);
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
424 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
426 Constant *Discriminant, DINode::DIFlags Flags, DIType *Ty);
427
428
429
430
431
432
433
434
435
436
437
439 DINodeArray Elements,
440 Constant *Discriminant,
441 DIType *Ty);
442
443
444
445
446
447
448
449
450
451
452
453
455 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
458 DINodeArray Annotations = nullptr);
459
460
461
462
463
464
465
466
467
468
469
470
472 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
475 DINodeArray Annotations = nullptr);
476
477
478
479
480
481
482
483
484
485
486
487
489 StringRef Name, DIFile *File,
490 unsigned LineNo, DIType *Ty,
492 Constant *Val, unsigned Tag,
494
495
496
497
498
499
500
501
502
503
504
505
507 unsigned LineNo, uint64_t SizeInBits,
511 MDNode *PropertyNode);
512
513
514
515
516
517
518
519
520
521
523 createObjCProperty(StringRef Name, DIFile *File, unsigned LineNumber,
524 StringRef GetterName, StringRef SetterName,
525 unsigned PropertyAttributes, DIType *Ty);
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
545 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
547 DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements,
548 unsigned RunTimeLang = 0, DIType *VTableHolder = nullptr,
549 MDNode *TemplateParms = nullptr, StringRef UniqueIdentifier = "");
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
568 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
570 DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang = 0,
571 DIType *VTableHolder = nullptr, StringRef UniqueIdentifier = "",
572 DIType *Specification = nullptr, uint32_t NumExtraInhabitants = 0);
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
591 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
593 DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang = 0,
594 DIType *VTableHolder = nullptr, StringRef UniqueIdentifier = "",
595 DIType *Specification = nullptr, uint32_t NumExtraInhabitants = 0);
596
597
598
599
600
601
602
603
604
605
606
607
609 createUnionType(DIScope *Scope, StringRef Name, DIFile *File,
610 unsigned LineNumber, uint64_t SizeInBits,
612 DINodeArray Elements, unsigned RunTimeLang = 0,
613 StringRef UniqueIdentifier = "");
614
615
616
617
618
619
620
621
622
623
624
625
626
627
630 unsigned LineNumber, uint64_t SizeInBits,
632 DIDerivedType *Discriminator, DINodeArray Elements,
633 StringRef UniqueIdentifier = "");
634
635
636
637
638
639
640
641 LLVM_ABI DITemplateTypeParameter *
643 bool IsDefault);
644
645
646
647
648
649
650
651
652 LLVM_ABI DITemplateValueParameter *
654 bool IsDefault, Constant *Val);
655
656
657
658
659
660
661
662 LLVM_ABI DITemplateValueParameter *
664 StringRef Val, bool IsDefault = false);
665
666
667
668
669
670
671 LLVM_ABI DITemplateValueParameter *
673 DINodeArray Val);
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
694 PointerUnion<DIExpression *, DIVariable *> DataLocation = nullptr,
695 PointerUnion<DIExpression *, DIVariable *> Associated = nullptr,
696 PointerUnion<DIExpression *, DIVariable *> Allocated = nullptr,
697 PointerUnion<DIExpression *, DIVariable *> Rank = nullptr);
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
722 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
724 PointerUnion<DIExpression *, DIVariable *> DataLocation = nullptr,
725 PointerUnion<DIExpression *, DIVariable *> Associated = nullptr,
726 PointerUnion<DIExpression *, DIVariable *> Allocated = nullptr,
727 PointerUnion<DIExpression *, DIVariable *> Rank = nullptr,
728 Metadata *BitStride = nullptr);
729
730
731
732
733
734
736 uint32_t AlignInBits, DIType *Ty,
737 DINodeArray Subscripts,
738 Metadata *BitStride = nullptr);
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
755 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
756 uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
757 DIType *UnderlyingType, unsigned RunTimeLang = 0,
758 StringRef UniqueIdentifier = "", bool IsScoped = false,
759 std::optional<uint32_t> EnumKind = std::nullopt);
760
761
762
763
764
765
766
767
769 DIFile *File, unsigned LineNo,
771 uint32_t AlignInBits, DIType *Ty);
772
773
774
775
776
777
778
782 unsigned CC = 0);
783
784
786
787
789
790
791
793
794
795
796
797
798
799
800
801
802
803
804
805
806
809 DIScope *Scope, uint64_t SizeInBits,
813
814
816 createForwardDecl(unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F,
817 unsigned Line, unsigned RuntimeLang = 0,
819 StringRef UniqueIdentifier = "",
820 std::optional<uint32_t> EnumKind = std::nullopt);
821
822
824 unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line,
825 unsigned RuntimeLang = 0, uint64_t SizeInBits = 0,
827 StringRef UniqueIdentifier = "", DINodeArray Annotations = nullptr,
828 std::optional<uint32_t> EnumKind = std::nullopt);
829
830
831
833
834
835
837
838
840
841
844
845
847
848
849
856
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
878 DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File,
879 unsigned LineNo, DIType *Ty, bool IsLocalToUnit, bool isDefined = true,
880 DIExpression *Expr = nullptr, MDNode *Decl = nullptr,
881 MDTuple *TemplateParams = nullptr, uint32_t AlignInBits = 0,
882 DINodeArray Annotations = nullptr);
883
884
885
887 DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File,
888 unsigned LineNo, DIType *Ty, bool IsLocalToUnit, MDNode *Decl = nullptr,
889 MDTuple *TemplateParams = nullptr, uint32_t AlignInBits = 0);
890
891
892
893
894
895
896
897
898
901 unsigned LineNo, DIType *Ty, bool AlwaysPreserve = false,
904
905
906
907
908
909 LLVM_ABI DILabel *createLabel(DIScope *Scope, StringRef Name, DIFile *File,
910 unsigned LineNo, unsigned Column,
911 bool IsArtificial,
912 std::optional CoroSuspendIdx,
913 bool AlwaysPreserve = false);
914
915
916
917
918
919
920
921
922
923
924
925
928 DIFile *File, unsigned LineNo, DIType *Ty,
929 bool AlwaysPreserve = false,
931 DINodeArray Annotations = nullptr);
932
933
934
935
937
938
939
942 VMContext, {dwarf::DW_OP_constu, Val, dwarf::DW_OP_stack_value});
943 }
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
969 DITemplateParameterArray TParams = nullptr,
970 DISubprogram *Decl = nullptr, DITypeArray ThrownTypes = nullptr,
972 bool UseKeyInstructions = false);
973
974
975
981 DITemplateParameterArray TParams = nullptr,
982 DISubprogram *Decl = nullptr, DITypeArray ThrownTypes = nullptr);
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1006 unsigned LineNo, DISubroutineType *Ty, unsigned VTableIndex = 0,
1007 int ThisAdjustment = 0, DIType *VTableHolder = nullptr,
1010 DITemplateParameterArray TParams = nullptr,
1011 DITypeArray ThrownTypes = nullptr, bool UseKeyInstructions = false);
1012
1013
1014
1015
1016
1017
1018
1022 unsigned LineNo);
1023
1024
1025
1026
1027
1028
1030 bool ExportSymbols);
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1053 DIFile *File = nullptr, unsigned LineNo = 0,
1054 bool IsDecl = false);
1055
1056
1057
1058
1059
1060
1061
1062 LLVM_ABI DILexicalBlockFile *
1064 unsigned Discriminator = 0);
1065
1066
1067
1068
1069
1070
1071
1073 unsigned Line, unsigned Col);
1074
1075
1076
1077
1078
1079
1080
1083 unsigned Line, DINodeArray Elements = nullptr);
1084
1085
1086
1087
1088
1089
1090
1093 unsigned Line, DINodeArray Elements = nullptr);
1094
1095
1096
1097
1098
1099
1100
1103 unsigned Line, DINodeArray Elements = nullptr);
1104
1105
1106
1107
1108
1109
1110
1111
1114 unsigned Line, StringRef Name = "",
1115 DINodeArray Elements = nullptr);
1116
1117
1118
1119
1120
1121
1122
1124 DILocalVariable *VarInfo,
1125 DIExpression *Expr, const DILocation *DL,
1126 BasicBlock *InsertAtEnd);
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1143 DILocalVariable *SrcVar,
1144 DIExpression *ValExpr, Value *Addr,
1145 DIExpression *AddrExpr,
1146 const DILocation *DL);
1147
1148
1149
1150
1151
1152
1153
1155 DILocalVariable *VarInfo,
1156 DIExpression *Expr, const DILocation *DL,
1157 InsertPosition InsertPt);
1158
1159
1160
1161
1162
1163
1164
1166 DILocalVariable *VarInfo,
1167 DIExpression *Expr,
1168 const DILocation *DL,
1169 InsertPosition InsertPt);
1170
1171
1172
1173
1174
1176 InsertPosition InsertPt);
1177
1178
1179
1180
1181
1182
1183
1185 DILocalVariable *VarInfo,
1186 DIExpression *Expr,
1187 const DILocation *DL,
1188 InsertPosition InsertPt);
1189
1190
1191
1192
1193
1195 DIType *VTableHolder);
1196
1197
1198
1199
1200
1201
1203 DINodeArray TParams = DINodeArray());
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213 template
1215 if (N.get() == Replacement)
1217
1218 N->replaceAllUsesWith(Replacement);
1219 return Replacement;
1220 }
1221 };
1222
1223
1225
1226}
1227
1228#endif
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
#define DEFINE_ISA_CONVERSION_FUNCTIONS(ty, ref)
This file defines the DenseMap class.
This file contains constants used for implementing Dwarf debug support.
This file implements a map that provides insertion order iteration.
This file implements a set that has insertion order iteration characteristics.
This file defines the SmallVector class.
Annotations lets you mark points and ranges inside source code, for tests:
LLVM Basic Block Representation.
This is an important base class in LLVM.
static LLVM_ABI DIType * createObjectPointerType(DIType *Ty, bool Implicit)
Create a uniqued clone of Ty with FlagObjectPointer set.
LLVM_ABI DIBasicType * createUnspecifiedParameter()
Create unspecified parameter type for a subroutine type.
LLVM_ABI 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...
LLVM_ABI DITemplateValueParameter * createTemplateTemplateParameter(DIScope *Scope, StringRef Name, DIType *Ty, StringRef Val, bool IsDefault=false)
Create debugging information for a template template parameter.
NodeTy * replaceTemporary(TempMDNode &&N, NodeTy *Replacement)
Replace a temporary node.
Definition DIBuilder.h:1214
LLVM_ABI 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.
DIBuilder & operator=(const DIBuilder &)=delete
LLVM_ABI void finalize()
Construct any deferred debug info descriptors.
LLVM_ABI DISubroutineType * createSubroutineType(DITypeRefArray ParameterTypes, DINode::DIFlags Flags=DINode::FlagZero, unsigned CC=0)
Create subroutine type.
LLVM_ABI DIMacro * createMacro(DIMacroFile *Parent, unsigned Line, unsigned MacroType, StringRef Name, StringRef Value=StringRef())
Create debugging information entry for a macro.
LLVM_ABI 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.
LLVM_ABI DICompositeType * createVectorType(uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subscripts, Metadata *BitStride=nullptr)
Create debugging information entry for a vector type.
LLVM_ABI DIDerivedType * createStaticMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, DIType *Ty, DINode::DIFlags Flags, Constant *Val, unsigned Tag, uint32_t AlignInBits=0)
Create debugging information entry for a C++ static data member.
LLVM_ABI 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.
LLVM_ABI 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, unsigned RunTimeLang=0, DIType *VTableHolder=nullptr, MDNode *TemplateParms=nullptr, StringRef UniqueIdentifier="")
Create debugging information entry for a class.
LLVM_ABI DILexicalBlockFile * createLexicalBlockFile(DIScope *Scope, DIFile *File, unsigned Discriminator=0)
This creates a descriptor for a lexical block with a new file attached.
LLVM_ABI void finalizeSubprogram(DISubprogram *SP)
Finalize a specific subprogram - no new variables may be added to this subprogram afterwards.
LLVM_ABI DIDerivedType * createQualifiedType(unsigned Tag, DIType *FromTy)
Create debugging information entry for a qualified type, e.g.
LLVM_ABI 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.
LLVM_ABI 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.
static LLVM_ABI DIType * createArtificialType(DIType *Ty)
Create a uniqued clone of Ty with FlagArtificial set.
LLVM_ABI DIDerivedType * createBitFieldMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, Metadata *SizeInBits, Metadata *OffsetInBits, uint64_t StorageOffsetInBits, DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations=nullptr)
Create debugging information entry for a bit field member.
LLVM_ABI DIFixedPointType * createRationalFixedPointType(StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DINode::DIFlags Flags, APInt Numerator, APInt Denominator)
Create debugging information entry for an arbitrary rational fixed-point type.
LLVM_ABI 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, bool UseKeyInstructions=false)
Create a new descriptor for the specified C++ method.
LLVM_ABI DINamespace * createNameSpace(DIScope *Scope, StringRef Name, bool ExportSymbols)
This creates new descriptor for a namespace with the specified parent scope.
LLVM_ABI DIStringType * createStringType(StringRef Name, uint64_t SizeInBits)
Create debugging information entry for a string type.
LLVM_ABI DbgInstPtr insertDbgAssign(Instruction *LinkedInstr, Value *Val, DILocalVariable *SrcVar, DIExpression *ValExpr, Value *Addr, DIExpression *AddrExpr, const DILocation *DL)
Insert a new llvm.dbg.assign intrinsic call.
LLVM_ABI DbgInstPtr insertDeclareValue(llvm::Value *Storage, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, InsertPosition InsertPt)
Insert a new llvm.dbg.declare_value intrinsic call.
LLVM_ABI DILexicalBlock * createLexicalBlock(DIScope *Scope, DIFile *File, unsigned Line, unsigned Col)
This creates a descriptor for a lexical block with the specified parent context.
LLVM_ABI 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.
LLVM_ABI DIMacroNodeArray getOrCreateMacroArray(ArrayRef< Metadata * > Elements)
Get a DIMacroNodeArray, create one if required.
LLVM_ABI DIDerivedType * createMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, Metadata *SizeInBits, uint32_t AlignInBits, Metadata *OffsetInBits, DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations=nullptr)
Create debugging information entry for a member.
LLVM_ABI 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.
LLVM_ABI void replaceVTableHolder(DICompositeType *&T, DIType *VTableHolder)
Replace the vtable holder in the given type.
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:940
LLVM_ABI DIBasicType * createNullPtrType()
Create C++11 nullptr type.
LLVM_ABI DICommonBlock * createCommonBlock(DIScope *Scope, DIGlobalVariable *decl, StringRef Name, DIFile *File, unsigned LineNo)
Create common block entry for a Fortran common block.
LLVM_ABI DIDerivedType * createFriend(DIType *Ty, DIType *FriendTy)
Create debugging information entry for a 'friend'.
LLVM_ABI DILabel * createLabel(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, unsigned Column, bool IsArtificial, std::optional< unsigned > CoroSuspendIdx, bool AlwaysPreserve=false)
Create a new descriptor for an label.
LLVM_ABI void retainType(DIScope *T)
Retain DIScope* in a module even if it is not referenced through debug info anchors.
LLVM_ABI DIDerivedType * createTemplateAlias(DIType *Ty, StringRef Name, DIFile *File, unsigned LineNo, DIScope *Context, DINodeArray TParams, uint32_t AlignInBits=0, DINode::DIFlags Flags=DINode::FlagZero, DINodeArray Annotations=nullptr)
Create debugging information entry for a template alias.
DIBuilder(const DIBuilder &)=delete
LLVM_ABI 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="", bool UseKeyInstructions=false)
Create a new descriptor for the specified subprogram.
LLVM_ABI 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.
LLVM_ABI DbgInstPtr insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, BasicBlock *InsertAtEnd)
Insert a new llvm.dbg.declare intrinsic call.
LLVM_ABI DbgInstPtr insertDbgValueIntrinsic(llvm::Value *Val, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, InsertPosition InsertPt)
Insert a new llvm.dbg.value intrinsic call.
LLVM_ABI DITemplateValueParameter * createTemplateParameterPack(DIScope *Scope, StringRef Name, DIType *Ty, DINodeArray Val)
Create debugging information for a template parameter pack.
LLVM_ABI 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.
LLVM_ABI 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, std::optional< uint32_t > EnumKind=std::nullopt)
Create a temporary forward-declared type.
LLVM_ABI DICompositeType * createEnumerationType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements, DIType *UnderlyingType, unsigned RunTimeLang=0, StringRef UniqueIdentifier="", bool IsScoped=false, std::optional< uint32_t > EnumKind=std::nullopt)
Create debugging information entry for an enumeration.
LLVM_ABI DIFixedPointType * createDecimalFixedPointType(StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DINode::DIFlags Flags, int Factor)
Create debugging information entry for a decimal fixed-point type.
LLVM_ABI DIBasicType * createBasicType(StringRef Name, uint64_t SizeInBits, unsigned Encoding, DINode::DIFlags Flags=DINode::FlagZero, uint32_t NumExtraInhabitants=0, uint32_t DataSizeInBits=0)
Create debugging information entry for a basic type.
LLVM_ABI DISubrange * getOrCreateSubrange(int64_t Lo, int64_t Count)
Create a descriptor for a value range.
LLVM_ABI DISubrangeType * createSubrangeType(StringRef Name, DIFile *File, unsigned LineNo, DIScope *Scope, uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DIType *Ty, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride, Metadata *Bias)
Create a type describing a subrange of another type.
LLVM_ABI 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.
LLVM_ABI DIMacroFile * createTempMacroFile(DIMacroFile *Parent, unsigned Line, DIFile *File)
Create debugging information temporary entry for a macro file.
LLVM_ABI 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.
LLVM_ABI 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.
LLVM_ABI DICompositeType * createStructType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, Metadata *SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang=0, DIType *VTableHolder=nullptr, StringRef UniqueIdentifier="", DIType *Specification=nullptr, uint32_t NumExtraInhabitants=0)
Create debugging information entry for a struct.
LLVM_ABI DITypeRefArray getOrCreateTypeArray(ArrayRef< Metadata * > Elements)
Get a DITypeRefArray, create one if required.
LLVM_ABI DINodeArray getOrCreateArray(ArrayRef< Metadata * > Elements)
Get a DINodeArray, create one if required.
LLVM_ABI DICompileUnit * createCompileUnit(DISourceLanguageName 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...
LLVM_ABI DIEnumerator * createEnumerator(StringRef Name, const APSInt &Value)
Create a single enumerator value.
LLVM_ABI DITemplateTypeParameter * createTemplateTypeParameter(DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault)
Create debugging information for template type parameter.
LLVM_ABI DIBuilder(Module &M, bool AllowUnresolved=true, DICompileUnit *CU=nullptr)
Construct a builder for a module.
LLVM_ABI DIExpression * createExpression(ArrayRef< uint64_t > Addr={})
Create a new descriptor for the specified variable which has a complex address expression for its add...
LLVM_ABI DIDerivedType * createPtrAuthQualifiedType(DIType *FromTy, unsigned Key, bool IsAddressDiscriminated, unsigned ExtraDiscriminator, bool IsaPointer, bool authenticatesNullValues)
Create a __ptrauth qualifier.
LLVM_ABI 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="", std::optional< uint32_t > EnumKind=std::nullopt)
Create a permanent forward-declared type.
LLVM_ABI 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.
LLVM_ABI DIImportedEntity * createImportedModule(DIScope *Context, DINamespace *NS, DIFile *File, unsigned Line, DINodeArray Elements=nullptr)
Create a descriptor for an imported module.
LLVM_ABI DbgInstPtr insertLabel(DILabel *LabelInfo, const DILocation *DL, InsertPosition InsertPt)
Insert a new llvm.dbg.label intrinsic call.
LLVM_ABI DIImportedEntity * createImportedDeclaration(DIScope *Context, DINode *Decl, DIFile *File, unsigned Line, StringRef Name="", DINodeArray Elements=nullptr)
Create a descriptor for an imported function.
LLVM_ABI 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.
static LLVM_ABI DISubprogram * createArtificialSubprogram(DISubprogram *SP)
Create a distinct clone of SP with FlagArtificial set.
LLVM_ABI DIGenericSubrange * getOrCreateGenericSubrange(DIGenericSubrange::BoundType Count, DIGenericSubrange::BoundType LowerBound, DIGenericSubrange::BoundType UpperBound, DIGenericSubrange::BoundType Stride)
LLVM_ABI DIBasicType * createUnspecifiedType(StringRef Name)
Create a DWARF unspecified type.
LLVM_ABI DIObjCProperty * createObjCProperty(StringRef Name, DIFile *File, unsigned LineNumber, StringRef GetterName, StringRef SetterName, unsigned PropertyAttributes, DIType *Ty)
Create debugging information entry for Objective-C property.
LLVM_ABI DITemplateValueParameter * createTemplateValueParameter(DIScope *Scope, StringRef Name, DIType *Ty, bool IsDefault, Constant *Val)
Create debugging information for template value parameter.
LLVM_ABI 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.
LLVM_ABI 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.
LLVM_ABI void replaceArrays(DICompositeType *&T, DINodeArray Elements, DINodeArray TParams=DINodeArray())
Replace arrays on a composite type.
LLVM_ABI DIFixedPointType * createBinaryFixedPointType(StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DINode::DIFlags Flags, int Factor)
Create debugging information entry for a binary fixed-point type.
LLVM_ABI 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.
PointerUnion< DIVariable *, DIExpression * > BoundType
Represents a module in the programming language, for example, a Clang module, or a Fortran module.
Base class for scope-like contexts.
Wrapper structure that holds a language name and its version.
Subprogram description. Uses SubclassData1.
DISPFlags
Debug info subprogram flags.
Type array for a subprogram.
This represents the llvm.dbg.assign instruction.
Base class for non-instruction debug metadata records that have positions within IR.
Record of a variable value-assignment, aka a non instruction representation of the dbg....
This is an important class for using LLVM in a threaded context.
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
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.
This class implements a map that also provides access to all stored values in a deterministic order.
A Module instance is used to store all the information related to an LLVM module.
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
struct LLVMOpaqueDIBuilder * LLVMDIBuilderRef
Represents an LLVM debug info builder.
This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM.
This is an optimization pass for GlobalISel generic memory operations.
bool isa_and_nonnull(const Y &Val)
FunctionAddr VTableAddr Count
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
ArrayRef(const T &OneElt) -> ArrayRef< T >
decltype(auto) cast(const From &Val)
cast - Return the argument parameter cast to the specified type.
PointerUnion< Instruction *, DbgRecord * > DbgInstPtr
Definition DIBuilder.h:44