LLVM: include/llvm/IR/DebugInfoMetadata.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_IR_DEBUGINFOMETADATA_H
14#define LLVM_IR_DEBUGINFOMETADATA_H
15
31#include
32#include
33#include
34#include
35#include
36#include
37#include
38
39
40#define DEFINE_MDNODE_GET_UNPACK_IMPL(...) __VA_ARGS__
41#define DEFINE_MDNODE_GET_UNPACK(ARGS) DEFINE_MDNODE_GET_UNPACK_IMPL ARGS
42#define DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS) \
43 static CLASS *getDistinct(LLVMContext &Context, \
44 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
45 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Distinct); \
46 } \
47 static Temp##CLASS getTemporary(LLVMContext &Context, \
48 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
49 return Temp##CLASS( \
50 getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Temporary)); \
51 }
52#define DEFINE_MDNODE_GET(CLASS, FORMAL, ARGS) \
53 static CLASS *get(LLVMContext &Context, DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
54 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued); \
55 } \
56 static CLASS *getIfExists(LLVMContext &Context, \
57 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
58 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued, \
59 false); \
60 } \
61 DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS)
62
63namespace llvm {
64
65namespace dwarf {
67}
68
69
70
71
72
73
74
76
77
79
80
81
82
83
85
86
87
88 bool HasVersion;
89
90public:
92
93
95
96
97
98
99
100
105
106
109 return Version;
110 }
111
113 : Version(Version), Name(Lang), HasVersion(true) {};
115 : Version(0), Name(Lang), HasVersion(false) {};
116};
117
118class DbgVariableRecord;
119
121
123 const MDTuple *N = nullptr;
124
125public:
128
129 explicit operator bool() const { return get(); }
130 explicit operator MDTuple *() const { return get(); }
131
135
136
137 unsigned size() const { return N ? N->getNumOperands() : 0u; }
141
144
145 public:
151
154
156
158 ++I;
159 return *this;
160 }
161
164 ++I;
165 return Temp;
166 }
167
170 };
171
172
175};
176
177
178
179
180
181
182
183
187
188protected:
196
200
203 return S->getString();
205 }
206
209 return nullptr;
211 }
212
213
215
216public:
218
219
220
221
222
224#define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = ID,
225#define DI_FLAG_LARGEST_NEEDED
226#include "llvm/IR/DebugInfoFlags.def"
229 FlagVirtualInheritance,
231 };
232
235
236
237
238
239
242
245 default:
246 return false;
247 case GenericDINodeKind:
248 case DISubrangeKind:
249 case DIEnumeratorKind:
250 case DIBasicTypeKind:
251 case DIFixedPointTypeKind:
252 case DIStringTypeKind:
253 case DISubrangeTypeKind:
254 case DIDerivedTypeKind:
255 case DICompositeTypeKind:
256 case DISubroutineTypeKind:
257 case DIFileKind:
258 case DICompileUnitKind:
259 case DISubprogramKind:
260 case DILexicalBlockKind:
261 case DILexicalBlockFileKind:
262 case DINamespaceKind:
263 case DICommonBlockKind:
264 case DITemplateTypeParameterKind:
265 case DITemplateValueParameterKind:
266 case DIGlobalVariableKind:
267 case DILocalVariableKind:
268 case DILabelKind:
269 case DIObjCPropertyKind:
270 case DIImportedEntityKind:
271 case DIModuleKind:
272 case DIGenericSubrangeKind:
273 case DIAssignIDKind:
274 return true;
275 }
276 }
277};
278
279
280
281
282
283
284
285
286
287class GenericDINode : public DINode {
290
295 setHash(Hash);
296 }
298
299 void setHash(unsigned Hash) { SubclassData32 = Hash; }
300 void recalculateHash();
301
302 static GenericDINode *getImpl(LLVMContext &Context, unsigned Tag,
307 }
308
309 LLVM_ABI static GenericDINode *getImpl(LLVMContext &Context, unsigned Tag,
313 bool ShouldCreate = true);
314
315 TempGenericDINode cloneImpl() const {
318 }
319
320public:
322
331
332
333 TempGenericDINode clone() const { return cloneImpl(); }
334
338
344
352
356};
357
358
359
360
361
362class DIAssignID : public MDNode {
365
368
370
372 bool ShouldCreate = true);
373
375
376public:
377
379
381 return Context.getReplaceableUses()->getAllDbgVariableRecordUsers();
382 }
383
385 return getImpl(Context, Distinct);
386 }
388 return TempDIAssignID(getImpl(Context, Temporary));
389 }
390
391
395};
396
397
398class DISubrange : public DINode {
401
403
404 ~DISubrange() = default;
405
408 bool ShouldCreate = true);
409
412 bool ShouldCreate = true);
413
418 bool ShouldCreate = true);
419
420 TempDISubrange cloneImpl() const {
422 getRawUpperBound(), getRawStride());
423 }
424
425public:
428
431
436
437 TempDISubrange clone() const { return cloneImpl(); }
438
440
442
444
446
447 typedef PointerUnion<ConstantInt *, DIVariable *, DIExpression *> BoundType;
448
450
452
454
456
460};
461
462class DIGenericSubrange : public DINode {
465
468
469 ~DIGenericSubrange() = default;
470
471 LLVM_ABI static DIGenericSubrange *
474 bool ShouldCreate = true);
475
476 TempDIGenericSubrange cloneImpl() const {
479 }
480
481public:
485 (CountNode, LowerBound, UpperBound, Stride))
486
487 TempDIGenericSubrange clone() const { return cloneImpl(); }
488
493
495
500
504};
505
506
507
508
509
510class DIEnumerator : public DINode {
513
522
528 }
529 LLVM_ABI static DIEnumerator *getImpl(LLVMContext &Context,
532 bool ShouldCreate = true);
533
534 TempDIEnumerator cloneImpl() const {
536 }
537
538public:
551
552 TempDIEnumerator clone() const { return cloneImpl(); }
553
557
559
563};
564
565
566
567
568
569
570
572protected:
577
578public:
580
583 inline std::optional getSource() const;
584
587
588
589
590
591
592
593
598
601 default:
602 return false;
603 case DIBasicTypeKind:
604 case DIFixedPointTypeKind:
605 case DIStringTypeKind:
606 case DISubrangeTypeKind:
607 case DIDerivedTypeKind:
608 case DICompositeTypeKind:
609 case DISubroutineTypeKind:
610 case DIFileKind:
611 case DICompileUnitKind:
612 case DISubprogramKind:
613 case DILexicalBlockKind:
614 case DILexicalBlockFileKind:
615 case DINamespaceKind:
616 case DICommonBlockKind:
617 case DIModuleKind:
618 return true;
619 }
620 }
621};
622
623
624
625
626
630
631public:
632
633
634
635
646
647
662
663private:
664 std::optional<ChecksumInfo<MDString *>> Checksum;
665
667
669 std::optional<ChecksumInfo<MDString *>> CS, MDString *Src,
672
675 std::optional<ChecksumInfo> CS,
677 bool ShouldCreate = true) {
678 std::optional<ChecksumInfo<MDString *>> MDChecksum;
679 if (CS)
684 ShouldCreate);
685 }
686 LLVM_ABI static DIFile *getImpl(LLVMContext &Context, MDString *Filename,
688 std::optional<ChecksumInfo<MDString *>> CS,
690 bool ShouldCreate = true);
691
692 TempDIFile cloneImpl() const {
695 }
696
697public:
701 std::optional Source = std::nullopt),
708
709 TempDIFile clone() const { return cloneImpl(); }
710
713 std::optional<ChecksumInfo> getChecksum() const {
714 std::optional<ChecksumInfo> StringRefChecksum;
715 if (Checksum)
716 StringRefChecksum.emplace(Checksum->Kind, Checksum->Value->getString());
717 return StringRefChecksum;
718 }
719 std::optional getSource() const {
720 return Source ? std::optional(Source->getString())
721 : std::nullopt;
722 }
723
726 std::optional<ChecksumInfo<MDString *>> getRawChecksum() const {
727 return Checksum;
728 }
729 MDString *getRawSource() const { return Source; }
730
732 LLVM_ABI static std::optional
734
738};
739
742 return F->getFilename();
743 return "";
744}
745
748 return F->getDirectory();
749 return "";
750}
751
754 return F->getSource();
755 return std::nullopt;
756}
757
758
759
760
761
762
763
764
766 unsigned Line;
768 uint32_t NumExtraInhabitants;
769
770protected:
772
774 unsigned Line, uint32_t AlignInBits, uint32_t NumExtraInhabitants,
777 init(Line, AlignInBits, NumExtraInhabitants, Flags);
778 }
780
783 this->Line = Line;
784 this->Flags = Flags;
786 this->NumExtraInhabitants = NumExtraInhabitants;
787 }
788
789
794 init(Line, AlignInBits, NumExtraInhabitants, Flags);
795 }
796
797public:
801
802 unsigned getLine() const { return Line; }
807
810
813
818 return CI->getZExtValue();
819 }
820 return 0;
821 }
822
827 return CI->getZExtValue();
828 }
829 return 0;
830 }
831
832
834 auto NewTy = clone();
835 NewTy->Flags = NewFlags;
836 return NewTy;
837 }
838
854 return getFlags() & FlagObjcClassComplete;
855 }
863 return getFlags() & FlagTypePassByReference;
864 }
868
871 default:
872 return false;
873 case DIBasicTypeKind:
874 case DIFixedPointTypeKind:
875 case DIStringTypeKind:
876 case DISubrangeTypeKind:
877 case DIDerivedTypeKind:
878 case DICompositeTypeKind:
879 case DISubroutineTypeKind:
880 return true;
881 }
882 }
883};
884
885
886
887
888
892
893 unsigned Encoding;
894
895
896
898
899protected:
906 Encoding(Encoding), DataSizeInBits(DataSizeInBits) {}
913 Encoding(Encoding), DataSizeInBits(DataSizeInBits) {}
915
943
950
951public:
953 (Tag, Name, 0, 0, 0, 0, 0, FlagZero))
997
999
1001
1003
1004
1005
1007
1012};
1013
1014
1018
1019
1020 unsigned Kind;
1021
1022 int Factor;
1023
1024 APInt Numerator;
1025 APInt Denominator;
1026
1032 Kind(Kind), Factor(Factor) {
1034 }
1043 }
1052 ~DIFixedPointType() = default;
1053
1054 static DIFixedPointType *
1055 getImpl(LLVMContext &Context, unsigned Tag, StringRef Name,
1057 DIFlags Flags, unsigned Kind, int Factor, APInt Numerator,
1063 Numerator, Denominator, Storage, ShouldCreate);
1064 }
1065 static DIFixedPointType *
1066 getImpl(LLVMContext &Context, unsigned Tag, StringRef Name,
1068 DIFlags Flags, unsigned Kind, int Factor, APInt Numerator,
1072 Numerator, Denominator, Storage, ShouldCreate);
1073 }
1074 static DIFixedPointType *
1075 getImpl(LLVMContext &Context, unsigned Tag, MDString *Name,
1077 DIFlags Flags, unsigned Kind, int Factor, APInt Numerator,
1082 Flags, Kind, Factor, Numerator, Denominator, Storage,
1083 ShouldCreate);
1084 }
1085 LLVM_ABI static DIFixedPointType *
1086 getImpl(LLVMContext &Context, unsigned Tag, MDString *Name,
1088 DIFlags Flags, unsigned Kind, int Factor, APInt Numerator,
1090
1091 TempDIFixedPointType cloneImpl() const {
1094 getFlags(), Kind, Factor, Numerator, Denominator);
1095 }
1096
1097public:
1107
1108 LLVM_ABI static std::optional
1111
1115 unsigned Kind, int Factor, APInt Numerator,
1116 APInt Denominator),
1118 Factor, Numerator, Denominator))
1122 unsigned Kind, int Factor, APInt Numerator,
1125 Factor, Numerator, Denominator))
1129 unsigned Kind, int Factor, APInt Numerator,
1130 APInt Denominator),
1132 Factor, Numerator, Denominator))
1133
1134 TempDIFixedPointType clone() const { return cloneImpl(); }
1135
1139
1141
1143
1147 return Factor;
1148 }
1149
1153 return Numerator;
1154 }
1155
1159 return Denominator;
1160 }
1161
1165};
1166
1167
1171
1173
1174 unsigned Encoding;
1175
1181 Encoding(Encoding) {}
1183
1189 bool ShouldCreate = true) {
1193 StringLength, StrLenExp, StrLocationExp, SizeInBitsNode,
1195 }
1196 static DIStringType *getImpl(LLVMContext &Context, unsigned Tag,
1201 bool ShouldCreate = true) {
1204 return getImpl(Context, Tag, Name, StringLength, StrLenExp, StrLocationExp,
1206 ShouldCreate);
1207 }
1208 LLVM_ABI static DIStringType *
1209 getImpl(LLVMContext &Context, unsigned Tag, MDString *Name,
1213
1214 TempDIStringType cloneImpl() const {
1219 }
1220
1221public:
1231 unsigned Encoding),
1238 unsigned Encoding),
1245 unsigned Encoding),
1248
1249 TempDIStringType clone() const { return cloneImpl(); }
1250
1254
1258
1262
1266
1268
1270
1272 return getOperand(MY_FIRST_OPERAND + 1);
1273 }
1274
1276 return getOperand(MY_FIRST_OPERAND + 2);
1277 }
1278};
1279
1280
1281
1282
1283
1284
1285
1286class DIDerivedType : public DIType {
1287public:
1288
1290
1291
1292
1293
1294
1295
1297
1300 bool IsaPointer, bool AuthenticatesNullValues) {
1302 assert(Discriminator <= 0xffff);
1303 RawData = (Key << 0) | (IsDiscr ? (1 << 4) : 0) | (Discriminator << 5) |
1304 (IsaPointer ? (1 << 21) : 0) |
1305 (AuthenticatesNullValues ? (1 << 22) : 0);
1306 }
1307
1313 };
1314
1315private:
1318
1320
1321
1322
1323 std::optional DWARFAddressSpace;
1324
1327 std::optional DWARFAddressSpace,
1332 DWARFAddressSpace(DWARFAddressSpace) {
1335 }
1342 std::optional PtrAuthData, DIFlags Flags,
1344 bool ShouldCreate = true) {
1353 }
1354 static DIDerivedType *
1355 getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, DIFile *File,
1359 std::optional PtrAuthData, DIFlags Flags,
1361 bool ShouldCreate = true) {
1366 return getImpl(Context, Tag, Name, File, Line, Scope, BaseType,
1367 SizeInBitsNode, AlignInBits, OffsetInBitsNode,
1370 }
1371 static DIDerivedType *
1372 getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File,
1375 std::optional DWARFAddressSpace,
1378 bool ShouldCreate = true) {
1383 }
1384 LLVM_ABI static DIDerivedType *
1385 getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File,
1388 std::optional DWARFAddressSpace,
1391 bool ShouldCreate = true);
1392
1393 TempDIDerivedType cloneImpl() const {
1399 }
1400
1401public:
1407 std::optional DWARFAddressSpace,
1418 std::optional DWARFAddressSpace,
1429 std::optional DWARFAddressSpace,
1440 std::optional DWARFAddressSpace,
1447
1448 TempDIDerivedType clone() const { return cloneImpl(); }
1449
1450
1452 Metadata *getRawBaseType() const { return getOperand(MY_FIRST_OPERAND); }
1453
1454
1455
1456 std::optional getDWARFAddressSpace() const {
1457 return DWARFAddressSpace;
1458 }
1459
1460 LLVM_ABI std::optional getPtrAuthData() const;
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1473
1474
1478
1479
1484 return getOperand(MY_FIRST_OPERAND + 2);
1485 }
1486
1487
1488
1490
1494
1496
1498
1500
1502
1503
1507};
1508
1513
1516 return !(Lhs == Rhs);
1517}
1518
1519
1520
1521class DISubrangeType : public DIType {
1522public:
1526
1527private:
1530
1532
1535
1536 ~DISubrangeType() = default;
1537
1538 static DISubrangeType *
1549 }
1550
1557
1558 TempDISubrangeType cloneImpl() const {
1563 }
1564
1566
1567public:
1583
1584 TempDISubrangeType clone() const { return cloneImpl(); }
1585
1586
1589
1593
1597
1601
1605
1609
1613
1615
1617
1621};
1622
1623
1624
1625
1626
1627class DICompositeType : public DIType {
1630
1632
1633 unsigned RuntimeLang;
1634 std::optional<uint32_t> EnumKind;
1635
1639 std::optional<uint32_t> EnumKind, DIFlags Flags,
1643 RuntimeLang(RuntimeLang), EnumKind(EnumKind) {}
1645
1646
1647 void mutate(unsigned Tag, unsigned Line, unsigned RuntimeLang,
1649 std::optional<uint32_t> EnumKind, DIFlags Flags) {
1655 }
1656
1657 static DICompositeType *
1658 getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, Metadata *File,
1664 StringRef Identifier, DIDerivedType *Discriminator,
1679 ShouldCreate);
1680 }
1681 static DICompositeType *
1682 getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File,
1702 }
1703 static DICompositeType *
1704 getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, Metadata *File,
1708 unsigned RuntimeLang, std::optional<uint32_t> EnumKind,
1714 return getImpl(
1721 }
1722 LLVM_ABI static DICompositeType *
1723 getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File,
1733
1734 TempDICompositeType cloneImpl() const {
1744 }
1745
1746public:
1748 DICompositeType,
1752 DINodeArray Elements, unsigned RuntimeLang,
1766 DICompositeType,
1784 DICompositeType,
1788 DINodeArray Elements, unsigned RuntimeLang,
1802 DICompositeType,
1819
1820 TempDICompositeType clone() const { return cloneImpl(); }
1821
1822
1823
1824
1825
1826
1827
1828
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1863
1878 std::optional<uint32_t> getEnumKind() const { return EnumKind; }
1879
1883 return getOperand(MY_FIRST_OPERAND + 2);
1884 }
1886 return getOperand(MY_FIRST_OPERAND + 3);
1887 }
1892 return getOperand(MY_FIRST_OPERAND + 5);
1893 }
1898 return getOperand(MY_FIRST_OPERAND + 6);
1899 }
1907 return getOperand(MY_FIRST_OPERAND + 7);
1908 }
1926 return nullptr;
1927 }
1931
1933 return getOperand(MY_FIRST_OPERAND + 10);
1934 }
1938
1940 return getOperand(MY_FIRST_OPERAND + 11);
1941 }
1945
1947 return getOperand(MY_FIRST_OPERAND + 12);
1948 }
1952 return nullptr;
1953 }
1954
1955
1956
1957
1958
1959
1960
1962#ifndef NDEBUG
1965 "Lost a member during member list replacement");
1966#endif
1968 }
1969
1973
1977
1978
1982};
1983
1984
1985
1986
1987class DISubroutineType : public DIType {
1990
1992
1993
1994
1996
1999 ~DISubroutineType() = default;
2000
2004 bool ShouldCreate = true) {
2006 }
2010 bool ShouldCreate = true);
2011
2012 TempDISubroutineType cloneImpl() const {
2014 }
2015
2016public:
2023
2024 TempDISubroutineType clone() const { return cloneImpl(); }
2025
2027 auto NewTy = clone();
2028 NewTy->CC = CC;
2029 return NewTy;
2030 }
2031
2033
2037
2039
2043};
2044
2045
2049
2050public:
2058
2066
2067 LLVM_ABI static std::optional
2070 LLVM_ABI static std::optional
2073
2074private:
2084
2092
2104 return getImpl(
2113 }
2114 LLVM_ABI static DICompileUnit *
2115 getImpl(LLVMContext &Context, DISourceLanguageName SourceLanguage,
2124
2125 TempDICompileUnit cloneImpl() const {
2133 }
2134
2135public:
2136 static void get() = delete;
2138
2140 DICompileUnit,
2142 bool IsOptimized, StringRef Flags, unsigned RuntimeVersion,
2147 uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling,
2150 (SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion,
2153 DebugInfoForProfiling, (unsigned)NameTableKind, RangesBaseAddress,
2156 DICompileUnit,
2162 bool SplitDebugInlining, bool DebugInfoForProfiling,
2168 DebugInfoForProfiling, NameTableKind, RangesBaseAddress, SysRoot, SDK))
2169
2170 TempDICompileUnit clone() const { return cloneImpl(); }
2171
2208 this->SplitDebugInlining = SplitDebugInlining;
2209 }
2212
2225
2226
2227
2228
2229
2230
2231
2243
2244
2248};
2249
2250
2251
2252
2253
2254
2256protected:
2261
2262public:
2263
2264
2265
2266
2268
2269
2270
2275
2276
2277
2278
2279
2281
2287};
2288
2289
2293
2294 unsigned Line;
2295 unsigned ScopeLine;
2296 unsigned VirtualIndex;
2297
2298
2299
2300
2301 int ThisAdjustment;
2302
2303public:
2304
2306#define HANDLE_DISP_FLAG(ID, NAME) SPFlag##NAME = ID,
2307#define DISP_FLAG_LARGEST_NEEDED
2308#include "llvm/IR/DebugInfoFlags.def"
2312 };
2313
2316
2317
2318
2319
2320
2323
2324
2325 LLVM_ABI static DISPFlags toSPFlags(bool IsLocalToUnit, bool IsDefinition,
2326 bool IsOptimized,
2328 bool IsMainSubprogram = false);
2329
2330private:
2331 DIFlags Flags;
2333
2339
2350 bool ShouldCreate = true) {
2358 }
2359
2360 LLVM_ABI static DISubprogram *
2361 getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name,
2369
2370 TempDISubprogram cloneImpl() const {
2373 getContainingType(), getVirtualIndex(),
2374 getThisAdjustment(), getFlags(), getSPFlags(),
2375 getUnit(), getTemplateParams(), getDeclaration(),
2376 getRetainedNodes(), getThrownTypes(), getAnnotations(),
2377 getTargetFuncName(), getKeyInstructionsEnabled());
2378 }
2379
2380public:
2382 DISubprogram,
2395
2397 DISubprogram,
2410
2411 TempDISubprogram clone() const { return cloneImpl(); }
2412
2413
2414 TempDISubprogram cloneWithFlags(DIFlags NewFlags) const {
2415 auto NewSP = clone();
2416 NewSP->Flags = NewFlags;
2417 return NewSP;
2418 }
2419
2420 bool getKeyInstructionsEnabled() const { return SubclassData1; }
2421
2422public:
2423 unsigned getLine() const { return Line; }
2425 unsigned getVirtualIndex() const { return VirtualIndex; }
2426 int getThisAdjustment() const { return ThisAdjustment; }
2427 unsigned getScopeLine() const { return ScopeLine; }
2428 void setScopeLine(unsigned L) {
2430 ScopeLine = L;
2431 }
2433 DISPFlags getSPFlags() const { return SPFlags; }
2434 bool isLocalToUnit() const { return getSPFlags() & SPFlagLocalToUnit; }
2435 bool isDefinition() const { return getSPFlags() & SPFlagDefinition; }
2436 bool isOptimized() const { return getSPFlags() & SPFlagOptimized; }
2437 bool isMainSubprogram() const { return getSPFlags() & SPFlagMainSubprogram; }
2438
2439 bool isArtificial() const { return getFlags() & FlagArtificial; }
2440 bool isPrivate() const {
2442 }
2443 bool isProtected() const {
2445 }
2446 bool isPublic() const {
2448 }
2449 bool isExplicit() const { return getFlags() & FlagExplicit; }
2450 bool isPrototyped() const { return getFlags() & FlagPrototyped; }
2451 bool areAllCallsDescribed() const {
2452 return getFlags() & FlagAllCallsDescribed;
2453 }
2454 bool isPure() const { return getSPFlags() & SPFlagPure; }
2455 bool isElemental() const { return getSPFlags() & SPFlagElemental; }
2456 bool isRecursive() const { return getSPFlags() & SPFlagRecursive; }
2457 bool isObjCDirect() const { return getSPFlags() & SPFlagObjCDirect; }
2458
2459
2460
2461
2462
2463 bool isDeleted() const { return getSPFlags() & SPFlagDeleted; }
2464
2465
2466
2467
2468
2469 bool isLValueReference() const { return getFlags() & FlagLValueReference; }
2470
2471
2472
2473
2474
2475 bool isRValueReference() const { return getFlags() & FlagRValueReference; }
2476
2477
2478
2479
2480 bool isNoReturn() const { return getFlags() & FlagNoReturn; }
2481
2482
2483
2484
2485 bool isThunk() const { return getFlags() & FlagThunk; }
2486
2488
2491
2492 void replaceLinkageName(MDString *LN) { replaceOperandWith(3, LN); }
2493
2494 DISubroutineType *getType() const {
2496 }
2497 DIType *getContainingType() const {
2499 }
2500 void replaceType(DISubroutineType *Ty) {
2503 }
2504
2505 DICompileUnit *getUnit() const {
2507 }
2509 DITemplateParameterArray getTemplateParams() const {
2511 }
2512 DISubprogram *getDeclaration() const {
2514 }
2515 void replaceDeclaration(DISubprogram *Decl) { replaceOperandWith(6, Decl); }
2516 DINodeArray getRetainedNodes() const {
2518 }
2519 DITypeArray getThrownTypes() const {
2521 }
2522 DINodeArray getAnnotations() const {
2524 }
2525 StringRef getTargetFuncName() const {
2526 return (getRawTargetFuncName()) ? getStringOperand(12) : StringRef();
2527 }
2528
2536 Metadata *getRawContainingType() const {
2538 }
2539 Metadata *getRawTemplateParams() const {
2541 }
2542 Metadata *getRawThrownTypes() const {
2544 }
2545 Metadata *getRawAnnotations() const {
2547 }
2548 MDString *getRawTargetFuncName() const {
2550 }
2551
2552 void replaceRawLinkageName(MDString *LinkageName) {
2554 }
2555 void replaceRetainedNodes(DINodeArray N) {
2557 }
2558
2559
2560
2561 template <typename T, typename FuncLVT, typename FuncLabelT,
2562 typename FuncImportedEntityT, typename FuncUnknownT>
2563 static T
2564 visitRetainedNode(const Metadata *N, FuncLVT &&FuncLV, FuncLabelT &&FuncLabel,
2565 FuncImportedEntityT &&FuncIE, FuncUnknownT &&FuncUnknown) {
2567 return FuncLV(LV);
2569 return FuncLabel(L);
2571 return FuncIE(IE);
2572 return FuncUnknown(N);
2573 }
2574
2575
2577
2579
2580
2581
2582 template <typename FuncLVT, typename FuncLabelT, typename FuncImportedEntityT>
2584 FuncImportedEntityT &&FuncIE) const {
2585 for (MDNode *N : getRetainedNodes())
2586 visitRetainedNode(N, FuncLV, FuncLabel, FuncIE,
2589 });
2590 }
2591
2592
2593
2594
2596
2600};
2601
2602
2603
2604
2605
2606
2607
2608
2614
2619
2629 return getImpl(Context, Line, Column, static_cast<Metadata *>(Scope),
2632 }
2633
2634 TempDILocation cloneImpl() const {
2635
2636
2640 }
2641
2642public:
2645
2648 return this;
2649 return get(getContext(), getLine(), getColumn(), getScope(), getInlinedAt(),
2650 isImplicitCode());
2651 }
2652
2653
2655
2661 AtomRank))
2667 AtomRank))
2668
2669
2670 TempDILocation clone() const { return cloneImpl(); }
2671
2673 unsigned getColumn() const { return SubclassData16; }
2675
2676
2677
2678 StringRef getSubprogramLinkageName() const {
2679 DISubprogram *SP = getScope()->getSubprogram();
2680 if (!SP)
2681 return "";
2682 auto Name = SP->getLinkageName();
2683 if (.empty())
2684 return Name;
2685 return SP->getName();
2686 }
2687
2688 DILocation *getInlinedAt() const {
2690 }
2691
2692
2693
2694
2695
2696
2697
2698 bool isImplicitCode() const { return SubclassData1; }
2700
2701 DIFile *getFile() const { return getScope()->getFile(); }
2702 StringRef getFilename() const { return getScope()->getFilename(); }
2703 StringRef getDirectory() const { return getScope()->getDirectory(); }
2704 std::optional getSource() const { return getScope()->getSource(); }
2705
2706
2707
2708 const DILocation *getInlinedAtLocation() const {
2709 const DILocation *Current = this;
2710 while (const DILocation *Next = Current->getInlinedAt())
2711 Current = Next;
2712 return Current;
2713 }
2714
2715
2716
2717 DILocalScope *getInlinedAtScope() const {
2718 return getInlinedAtLocation()->getScope();
2719 }
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755 inline unsigned getDiscriminator() const;
2756
2757
2758
2759
2760
2761
2762
2763
2764
2766 return ((Discriminator & 0x7) == 0x7) && (Discriminator & 0xFFFFFFF8);
2767 }
2768
2769
2771
2772
2773
2774
2775
2776 inline std::optional<const DILocation *>
2778
2779
2780
2782
2783
2785
2786
2788
2789
2790
2791
2792
2793 inline std::optional<const DILocation *>
2795
2796
2797
2798
2799
2800
2801
2804
2805
2806
2807
2808
2809
2810
2811
2812
2814
2815
2816
2817
2821
2822
2824
2825
2826 static unsigned
2828 bool IsFSDiscriminator = false) {
2829
2830
2832 auto DwarfBaseDiscriminator =
2834 if (DwarfBaseDiscriminator)
2835 return *DwarfBaseDiscriminator;
2836
2837
2838
2839
2840
2842 }
2843
2844 if (IsFSDiscriminator)
2847 }
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862 LLVM_ABI static std::optional
2864
2865
2867 unsigned &DF, unsigned &CI);
2868
2869
2870
2873 return 1;
2876 if (Ret == 0)
2877 return 1;
2878 return Ret;
2879 }
2880
2881
2886
2891 return nullptr;
2892 }
2893
2897};
2898
2900protected:
2904
2905public:
2907
2909
2914
2919};
2920
2921
2922
2923
2927
2929
2933 Column(Column) {
2935 assert(Column < (1u << 16) && "Expected 16-bit column");
2936 }
2938
2942 bool ShouldCreate = true) {
2943 return getImpl(Context, static_cast<Metadata *>(Scope),
2945 ShouldCreate);
2946 }
2947
2948 LLVM_ABI static DILexicalBlock *getImpl(LLVMContext &Context, Metadata *Scope,
2951 bool ShouldCreate = true);
2952
2953 TempDILexicalBlock cloneImpl() const {
2956 }
2957
2958public:
2961 unsigned Column),
2965 unsigned Column),
2967
2968 TempDILexicalBlock clone() const { return cloneImpl(); }
2969
2972
2976};
2977
2981
2986 }
2988
2992 bool ShouldCreate = true) {
2993 return getImpl(Context, static_cast<Metadata *>(Scope),
2995 ShouldCreate);
2996 }
2997
2998 LLVM_ABI static DILexicalBlockFile *getImpl(LLVMContext &Context,
3002 bool ShouldCreate = true);
3003
3004 TempDILexicalBlockFile cloneImpl() const {
3007 }
3008
3009public:
3017
3018 TempDILexicalBlockFile clone() const { return cloneImpl(); }
3020
3022 return MD->getMetadataID() == DILexicalBlockFileKind;
3023 }
3024};
3025
3026unsigned DILocation::getDiscriminator() const {
3028 return F->getDiscriminator();
3029 return 0;
3030}
3031
3035
3036
3037
3038
3040 LBF && LBF->getDiscriminator() != 0;
3042 Scope = LBF->getScope();
3046 getInlinedAt(), isImplicitCode(), getAtomGroup(),
3048}
3049
3054
3058
3062
3063std::optional<const DILocation *>
3065 unsigned BD, DF, CI;
3066
3069 if (D == BD)
3070 return this;
3072 }
3073
3075 if (D == BD)
3076 return this;
3079 return std::nullopt;
3080}
3081
3082std::optional<const DILocation *>
3085
3086
3087
3088
3090 return this;
3091
3093 if (DF <= 1)
3094 return this;
3095
3100 return std::nullopt;
3101}
3102
3103
3104
3105
3109
3112 ~DINamespace() = default;
3113
3119 }
3123 bool ShouldCreate = true);
3124
3125 TempDINamespace cloneImpl() const {
3128 }
3129
3130public:
3137
3138 TempDINamespace clone() const { return cloneImpl(); }
3139
3143
3146
3150};
3151
3152
3153
3154
3155
3159
3162 ~DIModule() = default;
3163
3168 bool ShouldCreate = true) {
3174 }
3180
3181 TempDIModule cloneImpl() const {
3183 getConfigurationMacros(), getIncludePath(),
3184 getAPINotesFile(), getLineNo(), getIsDecl());
3185 }
3186
3187public:
3192 bool IsDecl = false),
3199 bool IsDecl = false),
3202
3203 TempDIModule clone() const { return cloneImpl(); }
3204
3207 StringRef getConfigurationMacros() const { return getStringOperand(3); }
3208 StringRef getIncludePath() const { return getStringOperand(4); }
3209 StringRef getAPINotesFile() const { return getStringOperand(5); }
3210 unsigned getLineNo() const { return SubclassData32; }
3211 bool getIsDecl() const { return SubclassData1; }
3212
3215 MDString *getRawConfigurationMacros() const {
3217 }
3220
3222 return MD->getMetadataID() == DIModuleKind;
3223 }
3224};
3225
3226
3227
3228
3230protected:
3237
3238public:
3241
3245
3247 return MD->getMetadataID() == DITemplateTypeParameterKind ||
3248 MD->getMetadataID() == DITemplateValueParameterKind;
3249 }
3250};
3251
3255
3258 ~DITemplateTypeParameter() = default;
3259
3263 bool ShouldCreate = true) {
3266 }
3270
3271 TempDITemplateTypeParameter cloneImpl() const {
3273 }
3274
3275public:
3282
3283 TempDITemplateTypeParameter clone() const { return cloneImpl(); }
3284
3286 return MD->getMetadataID() == DITemplateTypeParameterKind;
3287 }
3288};
3289
3293
3300
3305 bool ShouldCreate = true) {
3308 }
3309 LLVM_ABI static DITemplateValueParameter *
3310 getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *Type,
3312 bool ShouldCreate = true);
3313
3314 TempDITemplateValueParameter cloneImpl() const {
3317 }
3318
3319public:
3328
3329 TempDITemplateValueParameter clone() const { return cloneImpl(); }
3330
3332
3334 return MD->getMetadataID() == DITemplateValueParameterKind;
3335 }
3336};
3337
3338
3339
3340
3342 unsigned Line;
3343
3344protected:
3349
3350public:
3351 unsigned getLine() const { return Line; }
3358
3360
3361
3362
3365 return BT->getSignedness();
3366 return std::nullopt;
3367 }
3368
3371 return F->getFilename();
3372 return "";
3373 }
3374
3377 return F->getDirectory();
3378 return "";
3379 }
3380
3383 return F->getSource();
3384 return std::nullopt;
3385 }
3386
3391
3396};
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3410
3411 std::vector<uint64_t> Elements;
3412
3415 Elements(Elements.begin(), Elements.end()) {}
3416 ~DIExpression() = default;
3417
3418 LLVM_ABI static DIExpression *getImpl(LLVMContext &Context,
3419 ArrayRef<uint64_t> Elements,
3421 bool ShouldCreate = true);
3422
3423 TempDIExpression cloneImpl() const {
3425 }
3426
3427public:
3429
3430 TempDIExpression clone() const { return cloneImpl(); }
3431
3433
3435
3437 assert(I < Elements.size() && "Index out of range");
3438 return Elements[I];
3439 }
3440
3442
3443
3444 LLVM_ABI std::optional isConstant() const;
3445
3446
3447
3448
3449
3450
3451
3452
3453
3455
3457
3460
3461
3462
3463
3464
3466 const uint64_t *Op = nullptr;
3467
3468 public:
3471
3473
3474
3476
3477
3478
3479
3481
3483
3484
3485
3486
3488
3489
3493 };
3494
3495
3498
3499 public:
3505
3508
3512
3514 increment();
3515 return *this;
3516 }
3519 increment();
3520 return T;
3521 }
3522
3523
3524
3525
3526
3527
3529
3531 return getBase() == X.getBase();
3532 }
3534 return getBase() != X.getBase();
3535 }
3536
3537 private:
3539 };
3540
3541
3542
3543
3544
3545
3546
3547
3548
3558
3559
3561
3565
3566
3568
3569
3571
3573
3574
3575
3576
3577
3579
3580
3581 LLVM_ABI static std::optional
3583
3584
3588
3589
3591
3592
3594
3595
3596
3598
3599
3600
3601
3603
3604
3605
3606
3607
3608
3609 LLVM_ABI std::optional<ArrayRef<uint64_t>>
3611
3612
3613
3614
3615
3616
3617
3620
3621
3622
3623
3626
3627
3628
3629
3630
3631
3632
3633
3634 LLVM_ABI static std::optional<const DIExpression *>
3636
3637
3638
3639
3640
3641
3644 bool IsIndirect);
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3658 bool FirstIndirect,
3660 bool SecondIndirect);
3661
3662
3665
3666
3667
3669
3670
3671
3672
3673
3674
3675
3676
3680
3681
3682
3684
3685
3686
3687
3690
3691
3699
3700
3701
3703 int64_t Offset = 0);
3704
3705
3706
3711
3712
3713
3714
3715
3718
3719
3720
3721
3722
3725
3726
3727
3728
3729
3732 unsigned ArgNo,
3734
3735
3736
3737
3738
3739
3740
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755 LLVM_ABI static std::optional<DIExpression *>
3757 unsigned SizeInBits);
3758
3759
3760
3761
3767 if (r1 <= l2)
3768 return -1;
3769 else if (r2 <= l1)
3770 return 1;
3771 else
3772 return 0;
3773 }
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3807 uint64_t SliceSizeInBits, const Value *DbgPtr, int64_t DbgPtrOffsetInBits,
3809 std::optionalDIExpression::FragmentInfo &Result,
3810 int64_t &OffsetFromLocationInBits);
3811
3812 using ExtOps = std::array<uint64_t, 6>;
3813
3814
3817
3818
3819
3820 LLVM_ABI static DIExpression *appendExt(const DIExpression *Expr,
3821 unsigned FromSize, unsigned ToSize,
3823
3824
3828
3829
3830
3833 auto Fragment2 = *Other->getFragmentInfo();
3834 return fragmentCmp(Fragment1, Fragment2);
3835 }
3836
3837
3843
3844
3845
3847
3848
3849
3850
3851 LLVM_ABI std::pair<DIExpression *, const ConstantInt *>
3853
3854
3855
3856
3858};
3859
3862 return std::tie(A.SizeInBits, A.OffsetInBits) ==
3863 std::tie(B.SizeInBits, B.OffsetInBits);
3864}
3865
3868 return std::tie(A.SizeInBits, A.OffsetInBits) <
3869 std::tie(B.SizeInBits, B.OffsetInBits);
3870}
3871
3874 static const uint64_t MaxVal = std::numeric_limits<uint64_t>::max();
3875
3877
3879
3883
3885};
3886
3887
3888
3891
3892public:
3894 if (!Expr) {
3895 assert(Start == End);
3896 return;
3897 }
3900 }
3901
3903 : Start(Expr.begin()), End(Expr.end()) {}
3904
3906
3907
3908 std::optionalDIExpression::ExprOperand take() {
3909 if (Start == End)
3910 return std::nullopt;
3911 return *(Start++);
3912 }
3913
3914
3915 void consume(unsigned N) { std::advance(Start, N); }
3916
3917
3918 std::optionalDIExpression::ExprOperand peek() const {
3919 if (Start == End)
3920 return std::nullopt;
3921 return *(Start);
3922 }
3923
3924
3925 std::optionalDIExpression::ExprOperand peekNext() const {
3926 if (Start == End)
3927 return std::nullopt;
3928
3929 auto Next = Start.getNext();
3930 if (Next == End)
3931 return std::nullopt;
3932
3933 return *Next;
3934 }
3935
3936 std::optionalDIExpression::ExprOperand peekNextN(unsigned N) const {
3937 if (Start == End)
3938 return std::nullopt;
3940 for (unsigned I = 0; I < N; I++) {
3942 if (Nth == End)
3943 return std::nullopt;
3944 }
3945 return *Nth;
3946 }
3947
3952
3953
3954 operator bool() const { return Start != End; }
3955
3958
3959
3963};
3964
3965
3966
3967
3971
3972 bool IsLocalToUnit;
3973 bool IsDefinition;
3974
3979 IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition) {}
3981
3988 bool ShouldCreate = true) {
3994 }
3995 LLVM_ABI static DIGlobalVariable *
3996 getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name,
4001 bool ShouldCreate = true);
4002
4003 TempDIGlobalVariable cloneImpl() const {
4009 }
4010
4011public:
4013 DIGlobalVariable,
4015 unsigned Line, DIType *Type, bool IsLocalToUnit, bool IsDefinition,
4021 DIGlobalVariable,
4028
4029 TempDIGlobalVariable clone() const { return cloneImpl(); }
4030
4041
4047
4051};
4052
4053
4054
4055
4059
4062
4069 }
4074 bool ShouldCreate = true);
4075
4076 TempDICommonBlock cloneImpl() const {
4079 }
4080
4081public:
4090
4091 TempDICommonBlock clone() const { return cloneImpl(); }
4092
4100
4105
4109};
4110
4111
4112
4113
4117
4118 unsigned Arg : 16;
4120
4125 Arg(Arg), Flags(Flags) {
4126 assert(Arg < (1 << 16) && "DILocalVariable: Arg out of range");
4127 }
4129
4135 bool ShouldCreate = true) {
4139 }
4140 LLVM_ABI static DILocalVariable *
4142 unsigned Line, Metadata *Type, unsigned Arg, DIFlags Flags,
4144 bool ShouldCreate = true);
4145
4146 TempDILocalVariable cloneImpl() const {
4150 }
4151
4152public:
4165
4166 TempDILocalVariable clone() const { return cloneImpl(); }
4167
4168
4169
4170
4174
4176 unsigned getArg() const { return Arg; }
4178
4183
4186
4187
4188
4189
4190
4191
4195
4199};
4200
4201
4202
4203
4207
4208 unsigned Column;
4209 std::optional CoroSuspendIdx;
4210 bool IsArtificial;
4211
4213 bool IsArtificial, std::optional CoroSuspendIdx,
4215 ~DILabel() = default;
4216
4219 bool IsArtificial,
4220 std::optional CoroSuspendIdx,
4223 Line, Column, IsArtificial, CoroSuspendIdx, Storage,
4224 ShouldCreate);
4225 }
4230 bool ShouldCreate = true);
4231
4232 TempDILabel cloneImpl() const {
4236 }
4237
4238public:
4241 unsigned Line, unsigned Column, bool IsArtificial,
4242 std::optional CoroSuspendIdx),
4244 CoroSuspendIdx))
4247 unsigned Line, unsigned Column, bool IsArtificial,
4248 std::optional CoroSuspendIdx),
4250 CoroSuspendIdx))
4251
4252 TempDILabel clone() const { return cloneImpl(); }
4253
4254
4255
4256
4266
4270
4271
4272
4273
4274
4275
4279
4283};
4284
4285class DIObjCProperty : public DINode {
4288
4289 unsigned Line;
4290 unsigned Attributes;
4291
4294 ~DIObjCProperty() = default;
4295
4296 static DIObjCProperty *
4304 }
4309
4310 TempDIObjCProperty cloneImpl() const {
4314 }
4315
4316public:
4329
4330 TempDIObjCProperty clone() const { return cloneImpl(); }
4331
4332 unsigned getLine() const { return Line; }
4339
4342 return F->getFilename();
4343 return "";
4344 }
4345
4348 return F->getDirectory();
4349 return "";
4350 }
4351
4357
4361};
4362
4363
4364
4365
4366class DIImportedEntity : public DINode {
4369
4374 }
4376
4381 bool ShouldCreate = true) {
4382 return getImpl(Context, Tag, Scope, Entity, File, Line,
4384 ShouldCreate);
4385 }
4386 LLVM_ABI static DIImportedEntity *
4390
4391 TempDIImportedEntity cloneImpl() const {
4393 getFile(), getLine(), getName(), getElements());
4394 }
4395
4396public:
4400 DINodeArray Elements = nullptr),
4405 Metadata *Elements = nullptr),
4407
4408 TempDIImportedEntity clone() const { return cloneImpl(); }
4409
4415 DINodeArray getElements() const {
4417 }
4418
4424
4426 return MD->getMetadataID() == DIImportedEntityKind;
4427 }
4428};
4429
4430
4431class DIGlobalVariableExpression : public MDNode {
4434
4439
4443
4444 TempDIGlobalVariableExpression cloneImpl() const {
4446 }
4447
4448public:
4452
4453 TempDIGlobalVariableExpression clone() const { return cloneImpl(); }
4454
4456
4460
4462
4466
4468 return MD->getMetadataID() == DIGlobalVariableExpressionKind;
4469 }
4470};
4471
4472
4473
4474
4475
4476
4477
4478
4479
4483
4484protected:
4488 assert(MIType < 1u << 16);
4490 }
4492
4496
4499 return S->getString();
4501 }
4502
4505 return nullptr;
4507 }
4508
4509public:
4511
4514 default:
4515 return false;
4516 case DIMacroKind:
4517 case DIMacroFileKind:
4518 return true;
4519 }
4520 }
4521};
4522
4523
4524
4525
4529
4534 }
4536
4539 bool ShouldCreate = true) {
4542 }
4543 LLVM_ABI static DIMacro *getImpl(LLVMContext &Context, unsigned MIType,
4544 unsigned Line, MDString *Name,
4546 bool ShouldCreate = true);
4547
4548 TempDIMacro cloneImpl() const {
4551 }
4552
4553public:
4562
4563 TempDIMacro clone() const { return cloneImpl(); }
4564
4566
4569
4572
4576};
4577
4578
4579
4580
4584
4589 }
4591
4595 bool ShouldCreate = true) {
4596 return getImpl(Context, MIType, Line, static_cast<Metadata *>(File),
4598 }
4599
4600 LLVM_ABI static DIMacroFile *getImpl(LLVMContext &Context, unsigned MIType,
4603 bool ShouldCreate = true);
4604
4605 TempDIMacroFile cloneImpl() const {
4608 }
4609
4610public:
4619
4620 TempDIMacroFile clone() const { return cloneImpl(); }
4621
4623#ifndef NDEBUG
4626 "Lost a macro node during macro node list replacement");
4627#endif
4629 }
4630
4633
4637
4640
4644};
4645
4646
4647
4652
4654
4657 Args(Args) {
4658 track();
4659 }
4661
4664 void dropAllReferences(bool Untrack);
4665
4666public:
4667 LLVM_ABI static DIArgList *get(LLVMContext &Context,
4669
4671
4674
4678
4682
4684};
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4699
4701 std::optional Fragment;
4703
4704
4705
4706 LLVM_ABI static const FragmentInfo DefaultFragment;
4707
4708public:
4710
4712 std::optional FragmentInfo,
4714 : Variable(Var), Fragment(FragmentInfo), InlinedAt(InlinedAt) {}
4715
4718 : Variable(Var),
4719 Fragment(DIExpr ? DIExpr->getFragmentInfo() : std::nullopt),
4720 InlinedAt(InlinedAt) {}
4721
4723 std::optional getFragment() const { return Fragment; }
4725
4727 return Fragment.value_or(DefaultFragment);
4728 }
4729
4731 return F == DefaultFragment;
4732 }
4733
4735 return std::tie(Variable, Fragment, InlinedAt) ==
4736 std::tie(Other.Variable, Other.Fragment, Other.InlinedAt);
4737 }
4738
4740 return std::tie(Variable, Fragment, InlinedAt) <
4741 std::tie(Other.Variable, Other.Fragment, Other.InlinedAt);
4742 }
4743};
4744
4747
4748
4750 return DebugVariable(nullptr, std::nullopt, nullptr);
4751 }
4752
4753
4757
4759 unsigned HV = 0;
4760 const std::optional Fragment = D.getFragment();
4761 if (Fragment)
4763
4764 return hash_combine(D.getVariable(), HV, D.getInlinedAt());
4765 }
4766
4769 }
4770};
4771
4772
4773
4780
4781template <>
4784}
4785
4786#undef DEFINE_MDNODE_GET_UNPACK_IMPL
4787#undef DEFINE_MDNODE_GET_UNPACK
4788#undef DEFINE_MDNODE_GET
4789
4790#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static std::string getLinkageName(GlobalValue::LinkageTypes LT)
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")
static unsigned getNextComponentInDiscriminator(unsigned D)
Returns the next component stored in discriminator.
static unsigned getUnsignedFromPrefixEncoding(unsigned U)
Reverse transformation as getPrefixEncodingFromUnsigned.
static const DILocalScope * getRetainedNodeScope(const MDNode *N)
static SmallString< 128 > getFilename(const DIScope *SP, vfs::FileSystem &VFS)
Extract a filename for a DIScope.
const AbstractManglingParser< Derived, Alloc >::OperatorInfo AbstractManglingParser< Derived, Alloc >::Ops[]
This file defines the PointerUnion class, which is a discriminated union of pointer types.
static StringRef getName(Value *V)
static void r2(uint32_t &A, uint32_t &B, uint32_t &C, uint32_t &D, uint32_t &E, int I, uint32_t *Buf)
static void r1(uint32_t &A, uint32_t &B, uint32_t &C, uint32_t &D, uint32_t &E, int I, uint32_t *Buf)
static enum BaseType getBaseType(const Value *Val)
Return the baseType for Val which states whether Val is exclusively derived from constant/null,...
BaseType
A given derived pointer can have multiple base pointers through phi/selects.
This file defines the SmallVector class.
static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")
static uint32_t getFlags(const Symbol *Sym)
static SymbolRef::Type getType(const Symbol *Sym)
Class for arbitrary precision integers.
Annotations lets you mark points and ranges inside source code, for tests:
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This is the shared class of boolean and integer constants.
This is an important base class in LLVM.
List of ValueAsMetadata, to be used as an argument to a dbg.value intrinsic.
Definition DebugInfoMetadata.h:4648
ArrayRef< ValueAsMetadata * > getArgs() const
Definition DebugInfoMetadata.h:4670
LLVM_ABI void handleChangedOperand(void *Ref, Metadata *New)
iterator args_begin()
Definition DebugInfoMetadata.h:4672
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4675
static LLVM_ABI DIArgList * get(LLVMContext &Context, ArrayRef< ValueAsMetadata * > Args)
friend class ReplaceableMetadataImpl
Definition DebugInfoMetadata.h:4649
iterator args_end()
Definition DebugInfoMetadata.h:4673
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4650
SmallVector< DbgVariableRecord * > getAllDbgVariableRecordUsers()
Definition DebugInfoMetadata.h:4679
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:392
SmallVector< DbgVariableRecord * > getAllDbgVariableRecordUsers()
Definition DebugInfoMetadata.h:380
static TempDIAssignID getTemporary(LLVMContext &Context)
Definition DebugInfoMetadata.h:387
static DIAssignID * getDistinct(LLVMContext &Context)
Definition DebugInfoMetadata.h:384
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:363
friend class MDNode
Definition DebugInfoMetadata.h:364
void replaceOperandWith(unsigned I, Metadata *New)=delete
Basic type, like 'int' or 'float'.
Definition DebugInfoMetadata.h:889
static DIBasicType * getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, uint32_t NumExtraInhabitants, uint32_t DataSizeInBits, DIFlags Flags, StorageType Storage, bool ShouldCreate=true)
Definition DebugInfoMetadata.h:916
unsigned Tag
Definition DebugInfoMetadata.h:955
unsigned StringRef uint64_t FlagZero unsigned StringRef uint64_t uint32_t unsigned Encoding
Definition DebugInfoMetadata.h:962
unsigned StringRef uint64_t FlagZero unsigned StringRef uint64_t uint32_t unsigned DIFlags Flags
Definition DebugInfoMetadata.h:962
TempDIBasicType cloneImpl() const
Definition DebugInfoMetadata.h:944
DIBasicType(LLVMContext &C, StorageType Storage, unsigned Tag, uint32_t AlignInBits, unsigned Encoding, uint32_t NumExtraInhabitants, uint32_t DataSizeInBits, DIFlags Flags, ArrayRef< Metadata * > Ops)
Definition DebugInfoMetadata.h:900
unsigned StringRef uint64_t FlagZero unsigned StringRef uint64_t uint32_t unsigned DIFlags Flags unsigned StringRef uint64_t uint32_t unsigned uint32_t DIFlags Flags unsigned MDString uint64_t uint32_t unsigned uint32_t uint32_t DataSizeInBits
Definition DebugInfoMetadata.h:984
Signedness
Definition DebugInfoMetadata.h:1002
@ Signed
Definition DebugInfoMetadata.h:1002
@ Unsigned
Definition DebugInfoMetadata.h:1002
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:1008
DEFINE_MDNODE_GET(DIBasicType,(unsigned Tag, StringRef Name),(Tag, Name, 0, 0, 0, 0, 0, FlagZero)) DEFINE_MDNODE_GET(DIBasicType
static DIBasicType * getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, uint32_t NumExtraInhabitants, uint32_t DataSizeInBits, DIFlags Flags, StorageType Storage, bool ShouldCreate=true)
Definition DebugInfoMetadata.h:926
uint32_t getDataSizeInBits() const
Definition DebugInfoMetadata.h:1000
unsigned StringRef uint64_t SizeInBits
Definition DebugInfoMetadata.h:955
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:890
LLVM_ABI std::optional< Signedness > getSignedness() const
Return the signedness of this type, or std::nullopt if this type is neither signed nor unsigned.
unsigned getEncoding() const
Definition DebugInfoMetadata.h:998
unsigned StringRef uint64_t FlagZero unsigned StringRef uint64_t uint32_t unsigned DIFlags Flags unsigned StringRef uint64_t uint32_t unsigned uint32_t NumExtraInhabitants
Definition DebugInfoMetadata.h:971
friend class MDNode
Definition DebugInfoMetadata.h:891
DIBasicType(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, uint32_t AlignInBits, unsigned Encoding, uint32_t NumExtraInhabitants, uint32_t DataSizeInBits, DIFlags Flags, ArrayRef< Metadata * > Ops)
Definition DebugInfoMetadata.h:907
unsigned StringRef Name
Definition DebugInfoMetadata.h:955
unsigned StringRef uint64_t FlagZero unsigned StringRef uint64_t uint32_t AlignInBits
Definition DebugInfoMetadata.h:962
Debug common block.
Definition DebugInfoMetadata.h:4056
Metadata * getRawScope() const
Definition DebugInfoMetadata.h:4101
Metadata Metadata MDString Metadata unsigned LineNo TempDICommonBlock clone() const
Definition DebugInfoMetadata.h:4091
Metadata * getRawDecl() const
Definition DebugInfoMetadata.h:4102
Metadata Metadata * Decl
Definition DebugInfoMetadata.h:4087
Metadata * getRawFile() const
Definition DebugInfoMetadata.h:4104
Metadata Metadata MDString Metadata unsigned LineNo
Definition DebugInfoMetadata.h:4088
Metadata Metadata MDString * Name
Definition DebugInfoMetadata.h:4087
MDString * getRawName() const
Definition DebugInfoMetadata.h:4103
DIFile * getFile() const
Definition DebugInfoMetadata.h:4098
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4106
unsigned getLineNo() const
Definition DebugInfoMetadata.h:4099
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4057
Metadata Metadata MDString Metadata * File
Definition DebugInfoMetadata.h:4088
StringRef getName() const
Definition DebugInfoMetadata.h:4097
DIScope * getScope() const
Definition DebugInfoMetadata.h:4093
friend class MDNode
Definition DebugInfoMetadata.h:4058
DEFINE_MDNODE_GET(DICommonBlock,(DIScope *Scope, DIGlobalVariable *Decl, StringRef Name, DIFile *File, unsigned LineNo),(Scope, Decl, Name, File, LineNo)) DEFINE_MDNODE_GET(DICommonBlock
DIGlobalVariable * getDecl() const
Definition DebugInfoMetadata.h:4094
Metadata * Scope
Definition DebugInfoMetadata.h:4087
Compile unit.
Definition DebugInfoMetadata.h:2046
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool unsigned NameTableKind
Definition DebugInfoMetadata.h:2163
MDString * getRawSplitDebugFilename() const
Definition DebugInfoMetadata.h:2215
bool getDebugInfoForProfiling() const
Definition DebugInfoMetadata.h:2181
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool DebugInfoForProfiling
Definition DebugInfoMetadata.h:2162
Metadata * getRawRetainedTypes() const
Definition DebugInfoMetadata.h:2219
static LLVM_ABI const char * nameTableKindString(DebugNameTableKind PK)
static LLVM_ABI const char * emissionKindString(DebugEmissionKind EK)
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool unsigned bool MDString * SysRoot
Definition DebugInfoMetadata.h:2163
DISourceLanguageName Metadata MDString bool MDString * Flags
Definition DebugInfoMetadata.h:2158
void setSplitDebugInlining(bool SplitDebugInlining)
Definition DebugInfoMetadata.h:2207
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool unsigned bool MDString MDString * SDK
Definition DebugInfoMetadata.h:2164
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata * GlobalVariables
Definition DebugInfoMetadata.h:2160
DICompositeTypeArray getEnumTypes() const
Definition DebugInfoMetadata.h:2189
DebugEmissionKind getEmissionKind() const
Definition DebugInfoMetadata.h:2175
bool isDebugDirectivesOnly() const
Definition DebugInfoMetadata.h:2178
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t DWOId
Definition DebugInfoMetadata.h:2161
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata * EnumTypes
Definition DebugInfoMetadata.h:2159
StringRef getFlags() const
Definition DebugInfoMetadata.h:2187
MDString * getRawProducer() const
Definition DebugInfoMetadata.h:2213
DISourceLanguageName Metadata MDString * Producer
Definition DebugInfoMetadata.h:2157
DebugNameTableKind
Definition DebugInfoMetadata.h:2059
@ None
Definition DebugInfoMetadata.h:2062
@ Default
Definition DebugInfoMetadata.h:2060
@ Apple
Definition DebugInfoMetadata.h:2063
@ GNU
Definition DebugInfoMetadata.h:2061
@ LastDebugNameTableKind
Definition DebugInfoMetadata.h:2064
void replaceEnumTypes(DICompositeTypeArray N)
Replace arrays.
Definition DebugInfoMetadata.h:2232
MDString * getRawSysRoot() const
Definition DebugInfoMetadata.h:2223
DISourceLanguageName Metadata MDString bool MDString unsigned RuntimeVersion
Definition DebugInfoMetadata.h:2158
StringRef getSDK() const
Definition DebugInfoMetadata.h:2211
static void getIfExists()=delete
bool getRangesBaseAddress() const
Definition DebugInfoMetadata.h:2185
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata * RetainedTypes
Definition DebugInfoMetadata.h:2160
DIMacroNodeArray getMacros() const
Definition DebugInfoMetadata.h:2201
unsigned getRuntimeVersion() const
Definition DebugInfoMetadata.h:2174
Metadata * getRawMacros() const
Definition DebugInfoMetadata.h:2222
void replaceRetainedTypes(DITypeArray N)
Definition DebugInfoMetadata.h:2235
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:2245
DISourceLanguageName Metadata MDString bool MDString unsigned MDString * SplitDebugFilename
Definition DebugInfoMetadata.h:2159
void replaceGlobalVariables(DIGlobalVariableExpressionArray N)
Definition DebugInfoMetadata.h:2236
void replaceMacros(DIMacroNodeArray N)
Definition DebugInfoMetadata.h:2242
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool unsigned bool MDString MDString SDK TempDICompileUnit clone() const
Definition DebugInfoMetadata.h:2170
bool getSplitDebugInlining() const
Definition DebugInfoMetadata.h:2206
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata * ImportedEntities
Definition DebugInfoMetadata.h:2161
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata * Macros
Definition DebugInfoMetadata.h:2161
StringRef getSysRoot() const
Definition DebugInfoMetadata.h:2210
DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(DICompileUnit,(DISourceLanguageName SourceLanguage, DIFile *File, StringRef Producer, bool IsOptimized, StringRef Flags, unsigned RuntimeVersion, StringRef SplitDebugFilename, DebugEmissionKind EmissionKind, DICompositeTypeArray EnumTypes, DIScopeArray RetainedTypes, DIGlobalVariableExpressionArray GlobalVariables, DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros, uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling, DebugNameTableKind NameTableKind, bool RangesBaseAddress, StringRef SysRoot, StringRef SDK),(SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, GlobalVariables, ImportedEntities, Macros, DWOId, SplitDebugInlining, DebugInfoForProfiling,(unsigned) NameTableKind, RangesBaseAddress, SysRoot, SDK)) DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(DICompileUnit
DebugNameTableKind getNameTableKind() const
Definition DebugInfoMetadata.h:2182
MDString * getRawSDK() const
Definition DebugInfoMetadata.h:2224
DISourceLanguageName Metadata MDString bool IsOptimized
Definition DebugInfoMetadata.h:2158
DISourceLanguageName Metadata * File
Definition DebugInfoMetadata.h:2157
MDString * getRawFlags() const
Definition DebugInfoMetadata.h:2214
DIImportedEntityArray getImportedEntities() const
Definition DebugInfoMetadata.h:2198
Metadata * getRawEnumTypes() const
Definition DebugInfoMetadata.h:2218
StringRef getProducer() const
Definition DebugInfoMetadata.h:2186
void setDWOId(uint64_t DwoId)
Definition DebugInfoMetadata.h:2205
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:2047
DIScopeArray getRetainedTypes() const
Definition DebugInfoMetadata.h:2192
DebugEmissionKind
Definition DebugInfoMetadata.h:2051
@ LineTablesOnly
Definition DebugInfoMetadata.h:2054
@ LastEmissionKind
Definition DebugInfoMetadata.h:2056
@ FullDebug
Definition DebugInfoMetadata.h:2053
@ DebugDirectivesOnly
Definition DebugInfoMetadata.h:2055
@ NoDebug
Definition DebugInfoMetadata.h:2052
void replaceImportedEntities(DIImportedEntityArray N)
Definition DebugInfoMetadata.h:2239
Metadata * getRawGlobalVariables() const
Definition DebugInfoMetadata.h:2220
DIGlobalVariableExpressionArray getGlobalVariables() const
Definition DebugInfoMetadata.h:2195
friend class MDNode
Definition DebugInfoMetadata.h:2048
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool SplitDebugInlining
Definition DebugInfoMetadata.h:2162
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned EmissionKind
Definition DebugInfoMetadata.h:2159
DISourceLanguageName getSourceLanguage() const
Definition DebugInfoMetadata.h:2172
Metadata * getRawImportedEntities() const
Definition DebugInfoMetadata.h:2221
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool unsigned bool RangesBaseAddress
Definition DebugInfoMetadata.h:2163
uint64_t getDWOId() const
Definition DebugInfoMetadata.h:2204
StringRef getSplitDebugFilename() const
Definition DebugInfoMetadata.h:2188
bool isOptimized() const
Definition DebugInfoMetadata.h:2173
Composite types.
Definition DebugInfoMetadata.h:1627
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t AlignInBits
Definition DebugInfoMetadata.h:1769
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > EnumKind
Definition DebugInfoMetadata.h:1771
Metadata * getRawVTableHolder() const
Definition DebugInfoMetadata.h:1882
DIExpression * getRankExp() const
Definition DebugInfoMetadata.h:1928
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata Metadata * DataLocation
Definition DebugInfoMetadata.h:1773
static LLVM_ABI DICompositeType * buildODRType(LLVMContext &Context, MDString &Identifier, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, Metadata *SizeInBits, uint32_t AlignInBits, Metadata *OffsetInBits, Metadata *Specification, uint32_t NumExtraInhabitants, DIFlags Flags, Metadata *Elements, unsigned RuntimeLang, std::optional< uint32_t > EnumKind, Metadata *VTableHolder, Metadata *TemplateParams, Metadata *Discriminator, Metadata *DataLocation, Metadata *Associated, Metadata *Allocated, Metadata *Rank, Metadata *Annotations, Metadata *BitStride)
Build a DICompositeType with the given ODR identifier.
unsigned MDString Metadata unsigned Line
Definition DebugInfoMetadata.h:1767
Metadata * getRawRank() const
Definition DebugInfoMetadata.h:1922
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata * Elements
Definition DebugInfoMetadata.h:1770
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned RuntimeLang
Definition DebugInfoMetadata.h:1770
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata Metadata Metadata Metadata Metadata Metadata * Annotations
Definition DebugInfoMetadata.h:1775
Metadata * getRawSpecification() const
Definition DebugInfoMetadata.h:1939
DIExpression * getAssociatedExp() const
Definition DebugInfoMetadata.h:1912
DIVariable * getAllocated() const
Definition DebugInfoMetadata.h:1916
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString * Identifier
Definition DebugInfoMetadata.h:1772
DIExpression * getDataLocationExp() const
Definition DebugInfoMetadata.h:1903
Metadata * getRawDiscriminator() const
Definition DebugInfoMetadata.h:1891
static LLVM_ABI DICompositeType * getODRTypeIfExists(LLVMContext &Context, MDString &Identifier)
DIVariable * getAssociated() const
Definition DebugInfoMetadata.h:1909
unsigned Tag
Definition DebugInfoMetadata.h:1767
DIDerivedType * getDiscriminator() const
Definition DebugInfoMetadata.h:1894
DIVariable * getDataLocation() const
Definition DebugInfoMetadata.h:1900
unsigned getRuntimeLang() const
Definition DebugInfoMetadata.h:1877
DIType * getSpecification() const
Definition DebugInfoMetadata.h:1942
Metadata * getRawElements() const
Definition DebugInfoMetadata.h:1881
unsigned MDString * Name
Definition DebugInfoMetadata.h:1767
void replaceVTableHolder(DIType *VTableHolder)
Definition DebugInfoMetadata.h:1970
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata * Discriminator
Definition DebugInfoMetadata.h:1773
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata * TemplateParams
Definition DebugInfoMetadata.h:1772
StringRef getIdentifier() const
Definition DebugInfoMetadata.h:1874
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t OffsetInBits
Definition DebugInfoMetadata.h:1769
unsigned MDString Metadata unsigned Metadata * Scope
Definition DebugInfoMetadata.h:1768
unsigned MDString Metadata * File
Definition DebugInfoMetadata.h:1767
Metadata * getRawDataLocation() const
Definition DebugInfoMetadata.h:1897
Metadata * getRawTemplateParams() const
Definition DebugInfoMetadata.h:1885
unsigned MDString Metadata unsigned Metadata Metadata * BaseType
Definition DebugInfoMetadata.h:1768
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Flags
Definition DebugInfoMetadata.h:1769
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata Metadata Metadata Metadata * Allocated
Definition DebugInfoMetadata.h:1774
DINodeArray getElements() const
Definition DebugInfoMetadata.h:1865
DITemplateParameterArray getTemplateParams() const
Definition DebugInfoMetadata.h:1871
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata Metadata Metadata Metadata Metadata Metadata Metadata * Specification
Definition DebugInfoMetadata.h:1776
Metadata * getRawAnnotations() const
Definition DebugInfoMetadata.h:1932
Metadata * getRawAllocated() const
Definition DebugInfoMetadata.h:1915
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata * VTableHolder
Definition DebugInfoMetadata.h:1771
DIExpression * getAllocatedExp() const
Definition DebugInfoMetadata.h:1919
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:1628
void replaceElements(DINodeArray Elements)
Replace operands.
Definition DebugInfoMetadata.h:1961
ConstantInt * getBitStrideConst() const
Definition DebugInfoMetadata.h:1949
std::optional< uint32_t > getEnumKind() const
Definition DebugInfoMetadata.h:1878
unsigned MDString Metadata unsigned Metadata Metadata uint64_t SizeInBits
Definition DebugInfoMetadata.h:1768
friend class MDNode
Definition DebugInfoMetadata.h:1629
DIType * getVTableHolder() const
Definition DebugInfoMetadata.h:1868
DINodeArray getAnnotations() const
Definition DebugInfoMetadata.h:1935
Metadata * getRawAssociated() const
Definition DebugInfoMetadata.h:1906
ConstantInt * getRankConst() const
Definition DebugInfoMetadata.h:1923
void replaceTemplateParams(DITemplateParameterArray TemplateParams)
Definition DebugInfoMetadata.h:1974
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata Metadata Metadata * Associated
Definition DebugInfoMetadata.h:1774
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata Metadata Metadata Metadata Metadata Metadata Metadata uint32_t NumExtraInhabitants
Definition DebugInfoMetadata.h:1776
Metadata * getRawBitStride() const
Definition DebugInfoMetadata.h:1946
Metadata * getRawBaseType() const
Definition DebugInfoMetadata.h:1880
DEFINE_MDNODE_GET(DICompositeType,(unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, DINodeArray Elements, unsigned RuntimeLang, std::optional< uint32_t > EnumKind, DIType *VTableHolder, DITemplateParameterArray TemplateParams=nullptr, StringRef Identifier="", DIDerivedType *Discriminator=nullptr, Metadata *DataLocation=nullptr, Metadata *Associated=nullptr, Metadata *Allocated=nullptr, Metadata *Rank=nullptr, DINodeArray Annotations=nullptr, DIType *Specification=nullptr, uint32_t NumExtraInhabitants=0, Metadata *BitStride=nullptr),(Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Specification, NumExtraInhabitants, Flags, Elements, RuntimeLang, EnumKind, VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation, Associated, Allocated, Rank, Annotations, BitStride)) DEFINE_MDNODE_GET(DICompositeType
MDString * getRawIdentifier() const
Definition DebugInfoMetadata.h:1888
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:1979
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata Metadata Metadata Metadata Metadata * Rank
Definition DebugInfoMetadata.h:1775
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata Metadata Metadata Metadata Metadata Metadata Metadata uint32_t Metadata * BitStride
Definition DebugInfoMetadata.h:1777
DIType * getBaseType() const
Definition DebugInfoMetadata.h:1864
Derived types.
Definition DebugInfoMetadata.h:1286
unsigned Tag
Definition DebugInfoMetadata.h:1415
Metadata * getRawExtraData() const
Definition DebugInfoMetadata.h:1472
unsigned StringRef DIFile unsigned DIScope DIType * BaseType
Definition DebugInfoMetadata.h:1416
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata * OffsetInBits
Definition DebugInfoMetadata.h:1417
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > std::optional< PtrAuthData > DIFlags Flags
Definition DebugInfoMetadata.h:1419
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t AlignInBits
Definition DebugInfoMetadata.h:1417
DINodeArray getAnnotations() const
Get annotations associated with this derived type.
Definition DebugInfoMetadata.h:1480
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > std::optional< PtrAuthData > PtrAuthData
Definition DebugInfoMetadata.h:1419
DEFINE_MDNODE_GET(DIDerivedType,(unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, Metadata *SizeInBits, uint32_t AlignInBits, Metadata *OffsetInBits, std::optional< unsigned > DWARFAddressSpace, std::optional< PtrAuthData > PtrAuthData, DIFlags Flags, Metadata *ExtraData=nullptr, Metadata *Annotations=nullptr),(Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, DWARFAddressSpace, PtrAuthData, Flags, ExtraData, Annotations)) DEFINE_MDNODE_GET(DIDerivedType
Metadata * getExtraData() const
Get extra data associated with this derived type.
Definition DebugInfoMetadata.h:1471
DITemplateParameterArray getTemplateParams() const
Get the template parameters from a template alias.
Definition DebugInfoMetadata.h:1475
unsigned StringRef DIFile * File
Definition DebugInfoMetadata.h:1415
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > std::optional< PtrAuthData > DIFlags Metadata DINodeArray Annotations
Definition DebugInfoMetadata.h:1421
DIObjCProperty * getObjCProperty() const
Definition DebugInfoMetadata.h:1491
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > DWARFAddressSpace
Definition DebugInfoMetadata.h:1418
unsigned StringRef DIFile unsigned DIScope * Scope
Definition DebugInfoMetadata.h:1416
Metadata * getRawAnnotations() const
Definition DebugInfoMetadata.h:1483
LLVM_ABI DIType * getClassType() const
Get casted version of extra data.
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:1504
LLVM_ABI Constant * getConstant() const
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:1316
unsigned StringRef DIFile unsigned DIScope DIType Metadata * SizeInBits
Definition DebugInfoMetadata.h:1416
LLVM_ABI Constant * getStorageOffsetInBits() const
LLVM_ABI Constant * getDiscriminantValue() const
unsigned StringRef Name
Definition DebugInfoMetadata.h:1415
LLVM_ABI uint32_t getVBPtrOffset() const
friend class MDNode
Definition DebugInfoMetadata.h:1317
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > std::optional< PtrAuthData > DIFlags Metadata * ExtraData
Definition DebugInfoMetadata.h:1420
unsigned StringRef DIFile unsigned Line
Definition DebugInfoMetadata.h:1415
Enumeration value.
Definition DebugInfoMetadata.h:510
int64_t bool MDString APInt(64, Value, !IsUnsigned)
const APInt & getValue() const
Definition DebugInfoMetadata.h:554
int64_t bool MDString Name APInt bool MDString Name TempDIEnumerator clone() const
Definition DebugInfoMetadata.h:552
MDString * getRawName() const
Definition DebugInfoMetadata.h:558
StringRef getName() const
Definition DebugInfoMetadata.h:556
int64_t bool IsUnsigned
Definition DebugInfoMetadata.h:543
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:511
DEFINE_MDNODE_GET(DIEnumerator,(int64_t Value, bool IsUnsigned, StringRef Name),(APInt(64, Value, !IsUnsigned), IsUnsigned, Name)) DEFINE_MDNODE_GET(DIEnumerator
friend class MDNode
Definition DebugInfoMetadata.h:512
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:560
bool isUnsigned() const
Definition DebugInfoMetadata.h:555
int64_t bool MDString * Name
Definition DebugInfoMetadata.h:543
std::optional< DIExpression::ExprOperand > peekNext() const
Return the next operation.
Definition DebugInfoMetadata.h:3925
std::optional< DIExpression::FragmentInfo > getFragmentInfo() const
Retrieve the fragment information, if any.
Definition DebugInfoMetadata.h:3960
DIExpressionCursor(const DIExpressionCursor &)=default
DIExpressionCursor(const DIExpression *Expr)
Definition DebugInfoMetadata.h:3893
DIExpression::expr_op_iterator end() const
Definition DebugInfoMetadata.h:3957
std::optional< DIExpression::ExprOperand > peekNextN(unsigned N) const
Definition DebugInfoMetadata.h:3936
std::optional< DIExpression::ExprOperand > peek() const
Return the current operation.
Definition DebugInfoMetadata.h:3918
void consume(unsigned N)
Consume N operations.
Definition DebugInfoMetadata.h:3915
std::optional< DIExpression::ExprOperand > take()
Consume one operation.
Definition DebugInfoMetadata.h:3908
DIExpressionCursor(ArrayRef< uint64_t > Expr)
Definition DebugInfoMetadata.h:3902
DIExpression::expr_op_iterator begin() const
Definition DebugInfoMetadata.h:3956
void assignNewExpr(ArrayRef< uint64_t > Expr)
Definition DebugInfoMetadata.h:3948
A lightweight wrapper around an expression operand.
Definition DebugInfoMetadata.h:3465
LLVM_ABI unsigned getSize() const
Return the size of the operand.
ExprOperand(const uint64_t *Op)
Definition DebugInfoMetadata.h:3470
uint64_t getArg(unsigned I) const
Get an argument to the operand.
Definition DebugInfoMetadata.h:3480
unsigned getNumArgs() const
Definition DebugInfoMetadata.h:3482
uint64_t getOp() const
Get the operand code.
Definition DebugInfoMetadata.h:3475
const uint64_t * get() const
Definition DebugInfoMetadata.h:3472
void appendToVector(SmallVectorImpl< uint64_t > &V) const
Append the elements of this operand to V.
Definition DebugInfoMetadata.h:3490
An iterator for expression operands.
Definition DebugInfoMetadata.h:3496
bool operator==(const expr_op_iterator &X) const
Definition DebugInfoMetadata.h:3530
std::input_iterator_tag iterator_category
Definition DebugInfoMetadata.h:3500
ExprOperand value_type
Definition DebugInfoMetadata.h:3501
value_type * pointer
Definition DebugInfoMetadata.h:3503
expr_op_iterator & operator++()
Definition DebugInfoMetadata.h:3513
const ExprOperand * operator->() const
Definition DebugInfoMetadata.h:3511
bool operator!=(const expr_op_iterator &X) const
Definition DebugInfoMetadata.h:3533
expr_op_iterator(element_iterator I)
Definition DebugInfoMetadata.h:3507
value_type & reference
Definition DebugInfoMetadata.h:3504
std::ptrdiff_t difference_type
Definition DebugInfoMetadata.h:3502
element_iterator getBase() const
Definition DebugInfoMetadata.h:3509
const ExprOperand & operator*() const
Definition DebugInfoMetadata.h:3510
expr_op_iterator getNext() const
Get the next iterator.
Definition DebugInfoMetadata.h:3528
expr_op_iterator operator++(int)
Definition DebugInfoMetadata.h:3517
expr_op_iterator()=default
DWARF expression.
Definition DebugInfoMetadata.h:3407
element_iterator elements_end() const
Definition DebugInfoMetadata.h:3459
LLVM_ABI bool isEntryValue() const
Check if the expression consists of exactly one entry value operand.
iterator_range< expr_op_iterator > expr_ops() const
Definition DebugInfoMetadata.h:3555
bool isFragment() const
Return whether this is a piece of an aggregate variable.
Definition DebugInfoMetadata.h:3590
static LLVM_ABI DIExpression * append(const DIExpression *Expr, ArrayRef< uint64_t > Ops)
Append the opcodes Ops to DIExpr.
std::array< uint64_t, 6 > ExtOps
Definition DebugInfoMetadata.h:3812
unsigned getNumElements() const
Definition DebugInfoMetadata.h:3434
ArrayRef< uint64_t >::iterator element_iterator
Definition DebugInfoMetadata.h:3456
static LLVM_ABI ExtOps getExtOps(unsigned FromSize, unsigned ToSize, bool Signed)
Returns the ops for a zero- or sign-extension in a DIExpression.
expr_op_iterator expr_op_begin() const
Visit the elements via ExprOperand wrappers.
Definition DebugInfoMetadata.h:3549
LLVM_ABI bool extractIfOffset(int64_t &Offset) const
If this is a constant offset, extract it.
static LLVM_ABI void appendOffset(SmallVectorImpl< uint64_t > &Ops, int64_t Offset)
Append Ops with operations to apply the Offset.
DbgVariableFragmentInfo FragmentInfo
Definition DebugInfoMetadata.h:3572
int fragmentCmp(const DIExpression *Other) const
Determine the relative position of the fragments described by this DIExpression and Other.
Definition DebugInfoMetadata.h:3831
LLVM_ABI bool startsWithDeref() const
Return whether the first element a DW_OP_deref.
static LLVM_ABI bool isEqualExpression(const DIExpression *FirstExpr, bool FirstIndirect, const DIExpression *SecondExpr, bool SecondIndirect)
Determines whether two debug values should produce equivalent DWARF expressions, using their DIExpres...
expr_op_iterator expr_op_end() const
Definition DebugInfoMetadata.h:3552
LLVM_ABI bool isImplicit() const
Return whether this is an implicit location description.
DEFINE_MDNODE_GET(DIExpression,(ArrayRef< uint64_t > Elements),(Elements)) TempDIExpression clone() const
Definition DebugInfoMetadata.h:3428
static bool fragmentsOverlap(const FragmentInfo &A, const FragmentInfo &B)
Check if fragments overlap between a pair of FragmentInfos.
Definition DebugInfoMetadata.h:3825
static LLVM_ABI bool calculateFragmentIntersect(const DataLayout &DL, const Value *SliceStart, uint64_t SliceOffsetInBits, uint64_t SliceSizeInBits, const Value *DbgPtr, int64_t DbgPtrOffsetInBits, int64_t DbgExtractOffsetInBits, DIExpression::FragmentInfo VarFrag, std::optional< DIExpression::FragmentInfo > &Result, int64_t &OffsetFromLocationInBits)
Computes a fragment, bit-extract operation if needed, and new constant offset to describe a part of a...
SignedOrUnsignedConstant
Definition DebugInfoMetadata.h:3441
@ SignedConstant
Definition DebugInfoMetadata.h:3441
@ UnsignedConstant
Definition DebugInfoMetadata.h:3441
element_iterator elements_begin() const
Definition DebugInfoMetadata.h:3458
LLVM_ABI bool hasAllLocationOps(unsigned N) const
Returns true iff this DIExpression contains at least one instance of DW_OP_LLVM_arg,...
std::optional< FragmentInfo > getFragmentInfo() const
Retrieve the details of this fragment expression.
Definition DebugInfoMetadata.h:3585
static LLVM_ABI DIExpression * appendOpsToArg(const DIExpression *Expr, ArrayRef< uint64_t > Ops, unsigned ArgNo, bool StackValue=false)
Create a copy of Expr by appending the given list of Ops to each instance of the operand DW_OP_LLVM_a...
PrependOps
Used for DIExpression::prepend.
Definition DebugInfoMetadata.h:3692
@ DerefBefore
Definition DebugInfoMetadata.h:3694
@ ApplyOffset
Definition DebugInfoMetadata.h:3693
@ EntryValue
Definition DebugInfoMetadata.h:3697
@ DerefAfter
Definition DebugInfoMetadata.h:3695
@ StackValue
Definition DebugInfoMetadata.h:3696
static int fragmentCmp(const FragmentInfo &A, const FragmentInfo &B)
Determine the relative position of the fragments passed in.
Definition DebugInfoMetadata.h:3762
LLVM_ABI bool isComplex() const
Return whether the location is computed on the expression stack, meaning it cannot be a simple regist...
bool fragmentsOverlap(const DIExpression *Other) const
Check if fragments overlap between this DIExpression and Other.
Definition DebugInfoMetadata.h:3838
LLVM_ABI DIExpression * foldConstantMath()
Try to shorten an expression with constant math operations that can be evaluated at compile time.
static LLVM_ABI std::optional< const DIExpression * > convertToNonVariadicExpression(const DIExpression *Expr)
If Expr is a valid single-location expression, i.e.
LLVM_ABI std::pair< DIExpression *, const ConstantInt * > constantFold(const ConstantInt *CI)
Try to shorten an expression with an initial constant operand.
LLVM_ABI bool isDeref() const
Return whether there is exactly one operator and it is a DW_OP_deref;.
static LLVM_ABI const DIExpression * convertToVariadicExpression(const DIExpression *Expr)
If Expr is a non-variadic expression (i.e.
LLVM_ABI uint64_t getNumLocationOperands() const
Return the number of unique location operands referred to (via DW_OP_LLVM_arg) in this expression; th...
ArrayRef< uint64_t > getElements() const
Definition DebugInfoMetadata.h:3432
static LLVM_ABI DIExpression * replaceArg(const DIExpression *Expr, uint64_t OldArg, uint64_t NewArg)
Create a copy of Expr with each instance of DW_OP_LLVM_arg, \p OldArg replaced with DW_OP_LLVM_arg,...
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:3562
LLVM_ABI std::optional< uint64_t > getActiveBits(DIVariable *Var)
Return the number of bits that have an active value, i.e.
static LLVM_ABI void canonicalizeExpressionOps(SmallVectorImpl< uint64_t > &Ops, const DIExpression *Expr, bool IsIndirect)
Inserts the elements of Expr into Ops modified to a canonical form, which uses DW_OP_LLVM_arg (i....
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:3408
uint64_t getElement(unsigned I) const
Definition DebugInfoMetadata.h:3436
static LLVM_ABI std::optional< DIExpression * > createFragmentExpression(const DIExpression *Expr, unsigned OffsetInBits, unsigned SizeInBits)
Create a DIExpression to describe one part of an aggregate variable that is fragmented across multipl...
static LLVM_ABI const DIExpression * convertToUndefExpression(const DIExpression *Expr)
Removes all elements from Expr that do not apply to an undef debug value, which includes every operat...
static LLVM_ABI DIExpression * prepend(const DIExpression *Expr, uint8_t Flags, int64_t Offset=0)
Prepend DIExpr with a deref and offset operation and optionally turn it into a stack value or/and an ...
static LLVM_ABI DIExpression * appendToStack(const DIExpression *Expr, ArrayRef< uint64_t > Ops)
Convert DIExpr into a stack value if it isn't one already by appending DW_OP_deref if needed,...
static LLVM_ABI DIExpression * appendExt(const DIExpression *Expr, unsigned FromSize, unsigned ToSize, bool Signed)
Append a zero- or sign-extension to Expr.
LLVM_ABI std::optional< ArrayRef< uint64_t > > getSingleLocationExpressionElements() const
Returns a reference to the elements contained in this expression, skipping past the leading DW_OP_LLV...
LLVM_ABI bool isSingleLocationExpression() const
Return whether the evaluated expression makes use of a single location at the start of the expression...
LLVM_ABI bool extractLeadingOffset(int64_t &OffsetInBytes, SmallVectorImpl< uint64_t > &RemainingOps) const
Assuming that the expression operates on an address, extract a constant offset and the successive ops...
LLVM_ABI std::optional< SignedOrUnsignedConstant > isConstant() const
Determine whether this represents a constant value, if so.
friend class MDNode
Definition DebugInfoMetadata.h:3409
LLVM_ABI bool isValid() const
static LLVM_ABI const DIExpression * extractAddressClass(const DIExpression *Expr, unsigned &AddrClass)
Checks if the last 4 elements of the expression are DW_OP_constu DW_OP_swap DW_O...
static LLVM_ABI DIExpression * prependOpcodes(const DIExpression *Expr, SmallVectorImpl< uint64_t > &Ops, bool StackValue=false, bool EntryValue=false)
Prepend DIExpr with the given opcodes and optionally turn it into a stack value.
File.
Definition DebugInfoMetadata.h:627
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:735
MDString MDString * Directory
Definition DebugInfoMetadata.h:704
MDString MDString std::optional< ChecksumInfo< MDString * > > MDString * Source
Definition DebugInfoMetadata.h:706
DEFINE_MDNODE_GET(DIFile,(StringRef Filename, StringRef Directory, std::optional< ChecksumInfo< StringRef > > CS=std::nullopt, std::optional< StringRef > Source=std::nullopt),(Filename, Directory, CS, Source)) DEFINE_MDNODE_GET(DIFile
MDString * Filename
Definition DebugInfoMetadata.h:704
static LLVM_ABI std::optional< ChecksumKind > getChecksumKind(StringRef CSKindStr)
ChecksumKind
Which algorithm (e.g.
Definition DebugInfoMetadata.h:636
@ CSK_SHA1
Definition DebugInfoMetadata.h:642
@ CSK_MD5
Definition DebugInfoMetadata.h:641
@ CSK_SHA256
Definition DebugInfoMetadata.h:643
@ CSK_Last
Definition DebugInfoMetadata.h:644
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:628
friend class MDNode
Definition DebugInfoMetadata.h:629
MDString MDString std::optional< ChecksumInfo< MDString * > > CS
Definition DebugInfoMetadata.h:705
Fixed-point type.
Definition DebugInfoMetadata.h:1015
unsigned StringRef uint64_t uint32_t unsigned DIFlags unsigned int Factor
Definition DebugInfoMetadata.h:1122
static LLVM_ABI std::optional< FixedPointKind > getFixedPointKind(StringRef Str)
static LLVM_ABI const char * fixedPointKindString(FixedPointKind)
unsigned Tag
Definition DebugInfoMetadata.h:1120
const APInt & getNumeratorRaw() const
Definition DebugInfoMetadata.h:1150
unsigned StringRef uint64_t uint32_t unsigned Encoding
Definition DebugInfoMetadata.h:1121
bool isBinary() const
Definition DebugInfoMetadata.h:1136
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:1162
const APInt & getDenominator() const
Definition DebugInfoMetadata.h:1157
int getFactor() const
Definition DebugInfoMetadata.h:1145
bool isDecimal() const
Definition DebugInfoMetadata.h:1137
unsigned StringRef Name
Definition DebugInfoMetadata.h:1120
unsigned StringRef uint64_t uint32_t AlignInBits
Definition DebugInfoMetadata.h:1121
LLVM_ABI bool isSigned() const
FixedPointKind
Definition DebugInfoMetadata.h:1098
@ FixedPointBinary
Scale factor 2^Factor.
Definition DebugInfoMetadata.h:1100
@ LastFixedPointKind
Definition DebugInfoMetadata.h:1105
@ FixedPointDecimal
Scale factor 10^Factor.
Definition DebugInfoMetadata.h:1102
@ FixedPointRational
Arbitrary rational scale factor.
Definition DebugInfoMetadata.h:1104
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:1016
bool isRational() const
Definition DebugInfoMetadata.h:1138
FixedPointKind getKind() const
Definition DebugInfoMetadata.h:1142
int getFactorRaw() const
Definition DebugInfoMetadata.h:1144
const APInt & getNumerator() const
Definition DebugInfoMetadata.h:1151
friend class MDNode
Definition DebugInfoMetadata.h:1017
DEFINE_MDNODE_GET(DIFixedPointType,(unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags, unsigned Kind, int Factor, APInt Numerator, APInt Denominator),(Tag, Name, SizeInBits, AlignInBits, Encoding, Flags, Kind, Factor, Numerator, Denominator)) DEFINE_MDNODE_GET(DIFixedPointType
unsigned StringRef uint64_t uint32_t unsigned DIFlags unsigned int APInt Numerator
Definition DebugInfoMetadata.h:1122
unsigned StringRef uint64_t uint32_t unsigned DIFlags unsigned int APInt APInt Denominator
Definition DebugInfoMetadata.h:1123
unsigned StringRef uint64_t uint32_t unsigned DIFlags Flags
Definition DebugInfoMetadata.h:1121
unsigned StringRef uint64_t SizeInBits
Definition DebugInfoMetadata.h:1120
const APInt & getDenominatorRaw() const
Definition DebugInfoMetadata.h:1156
Metadata * getRawLowerBound() const
Definition DebugInfoMetadata.h:490
Metadata * getRawCountNode() const
Definition DebugInfoMetadata.h:489
Metadata * getRawStride() const
Definition DebugInfoMetadata.h:492
LLVM_ABI BoundType getLowerBound() const
DEFINE_MDNODE_GET(DIGenericSubrange,(Metadata *CountNode, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride),(CountNode, LowerBound, UpperBound, Stride)) TempDIGenericSubrange clone() const
Definition DebugInfoMetadata.h:482
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:463
Metadata * getRawUpperBound() const
Definition DebugInfoMetadata.h:491
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:501
LLVM_ABI BoundType getCount() const
friend class MDNode
Definition DebugInfoMetadata.h:464
LLVM_ABI BoundType getUpperBound() const
PointerUnion< DIVariable *, DIExpression * > BoundType
Definition DebugInfoMetadata.h:494
LLVM_ABI BoundType getStride() const
A pair of DIGlobalVariable and DIExpression.
Definition DebugInfoMetadata.h:4431
DEFINE_MDNODE_GET(DIGlobalVariableExpression,(Metadata *Variable, Metadata *Expression),(Variable, Expression)) TempDIGlobalVariableExpression clone() const
Definition DebugInfoMetadata.h:4449
Metadata * getRawExpression() const
Definition DebugInfoMetadata.h:4461
DIGlobalVariable * getVariable() const
Definition DebugInfoMetadata.h:4457
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4467
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4432
Metadata * getRawVariable() const
Definition DebugInfoMetadata.h:4455
DIExpression * getExpression() const
Definition DebugInfoMetadata.h:4463
friend class MDNode
Definition DebugInfoMetadata.h:4433
Global variables.
Definition DebugInfoMetadata.h:3968
Metadata * getRawAnnotations() const
Definition DebugInfoMetadata.h:4046
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata Metadata * TemplateParams
Definition DebugInfoMetadata.h:4024
Metadata MDString MDString Metadata unsigned Metadata bool bool IsDefinition
Definition DebugInfoMetadata.h:4023
Metadata MDString MDString Metadata unsigned Line
Definition DebugInfoMetadata.h:4023
Metadata MDString MDString Metadata unsigned Metadata * Type
Definition DebugInfoMetadata.h:4023
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata Metadata uint32_t Metadata * Annotations
Definition DebugInfoMetadata.h:4025
DIDerivedType * getStaticDataMemberDeclaration() const
Definition DebugInfoMetadata.h:4035
DEFINE_MDNODE_GET(DIGlobalVariable,(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DIType *Type, bool IsLocalToUnit, bool IsDefinition, DIDerivedType *StaticDataMemberDeclaration, MDTuple *TemplateParams, uint32_t AlignInBits, DINodeArray Annotations),(Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, StaticDataMemberDeclaration, TemplateParams, AlignInBits, Annotations)) DEFINE_MDNODE_GET(DIGlobalVariable
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata Metadata uint32_t Metadata Annotations TempDIGlobalVariable clone() const
Definition DebugInfoMetadata.h:4029
Metadata MDString * Name
Definition DebugInfoMetadata.h:4022
MDTuple * getTemplateParams() const
Definition DebugInfoMetadata.h:4045
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata * StaticDataMemberDeclaration
Definition DebugInfoMetadata.h:4024
bool isLocalToUnit() const
Definition DebugInfoMetadata.h:4031
Metadata * getRawStaticDataMemberDeclaration() const
Definition DebugInfoMetadata.h:4043
Metadata MDString MDString * LinkageName
Definition DebugInfoMetadata.h:4022
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:3969
MDString * getRawLinkageName() const
Definition DebugInfoMetadata.h:4042
StringRef getLinkageName() const
Definition DebugInfoMetadata.h:4034
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4048
StringRef getDisplayName() const
Definition DebugInfoMetadata.h:4033
bool isDefinition() const
Definition DebugInfoMetadata.h:4032
Metadata MDString MDString Metadata * File
Definition DebugInfoMetadata.h:4022
friend class MDNode
Definition DebugInfoMetadata.h:3970
DINodeArray getAnnotations() const
Definition DebugInfoMetadata.h:4038
Metadata MDString MDString Metadata unsigned Metadata bool IsLocalToUnit
Definition DebugInfoMetadata.h:4023
Metadata * getRawTemplateParams() const
Definition DebugInfoMetadata.h:4044
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata Metadata uint32_t AlignInBits
Definition DebugInfoMetadata.h:4025
Metadata * Scope
Definition DebugInfoMetadata.h:4022
An imported module (C++ using directive or similar).
Definition DebugInfoMetadata.h:4366
unsigned Metadata Metadata * Entity
Definition DebugInfoMetadata.h:4403
DEFINE_MDNODE_GET(DIImportedEntity,(unsigned Tag, DIScope *Scope, DINode *Entity, DIFile *File, unsigned Line, StringRef Name="", DINodeArray Elements=nullptr),(Tag, Scope, Entity, File, Line, Name, Elements)) DEFINE_MDNODE_GET(DIImportedEntity
unsigned Metadata Metadata Metadata unsigned Line
Definition DebugInfoMetadata.h:4404
unsigned Metadata Metadata Metadata unsigned MDString * Name
Definition DebugInfoMetadata.h:4404
unsigned Tag
Definition DebugInfoMetadata.h:4403
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4367
unsigned Metadata Metadata Metadata * File
Definition DebugInfoMetadata.h:4404
friend class MDNode
Definition DebugInfoMetadata.h:4368
unsigned Metadata * Scope
Definition DebugInfoMetadata.h:4403
Label.
Definition DebugInfoMetadata.h:4204
Metadata MDString Metadata unsigned unsigned bool std::optional< unsigned > CoroSuspendIdx
Definition DebugInfoMetadata.h:4248
DIFile * getFile() const
Definition DebugInfoMetadata.h:4263
Metadata MDString Metadata unsigned unsigned bool std::optional< unsigned > CoroSuspendIdx TempDILabel clone() const
Definition DebugInfoMetadata.h:4252
StringRef getName() const
Definition DebugInfoMetadata.h:4262
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4280
Metadata MDString Metadata unsigned unsigned Column
Definition DebugInfoMetadata.h:4247
unsigned getLine() const
Definition DebugInfoMetadata.h:4260
bool isArtificial() const
Definition DebugInfoMetadata.h:4264
Metadata MDString Metadata unsigned unsigned bool IsArtificial
Definition DebugInfoMetadata.h:4247
Metadata * getRawFile() const
Definition DebugInfoMetadata.h:4269
unsigned getColumn() const
Definition DebugInfoMetadata.h:4261
DILocalScope * getScope() const
Get the local scope for this label.
Definition DebugInfoMetadata.h:4257
MDString * getRawName() const
Definition DebugInfoMetadata.h:4268
std::optional< unsigned > getCoroSuspendIdx() const
Definition DebugInfoMetadata.h:4265
Metadata MDString Metadata unsigned Line
Definition DebugInfoMetadata.h:4247
Metadata MDString * Name
Definition DebugInfoMetadata.h:4246
DEFINE_MDNODE_GET(DILabel,(DILocalScope *Scope, StringRef Name, DIFile *File, unsigned Line, unsigned Column, bool IsArtificial, std::optional< unsigned > CoroSuspendIdx),(Scope, Name, File, Line, Column, IsArtificial, CoroSuspendIdx)) DEFINE_MDNODE_GET(DILabel
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4205
bool isValidLocationForIntrinsic(const DILocation *DL) const
Check that a location is valid for this label.
Definition DebugInfoMetadata.h:4276
Metadata * Scope
Definition DebugInfoMetadata.h:4246
Metadata * getRawScope() const
Definition DebugInfoMetadata.h:4267
friend class MDNode
Definition DebugInfoMetadata.h:4206
Metadata MDString Metadata * File
Definition DebugInfoMetadata.h:4246
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:2915
void replaceScope(DIScope *Scope)
Definition DebugInfoMetadata.h:2910
~DILexicalBlockBase()=default
Metadata * getRawScope() const
Definition DebugInfoMetadata.h:2908
LLVM_ABI DILexicalBlockBase(LLVMContext &C, unsigned ID, StorageType Storage, ArrayRef< Metadata * > Ops)
DILocalScope * getScope() const
Definition DebugInfoMetadata.h:2906
Metadata Metadata unsigned Discriminator
Definition DebugInfoMetadata.h:3015
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:3021
unsigned getDiscriminator() const
Definition DebugInfoMetadata.h:3019
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:2979
Metadata * Scope
Definition DebugInfoMetadata.h:3015
friend class MDNode
Definition DebugInfoMetadata.h:2980
Metadata Metadata unsigned Discriminator TempDILexicalBlockFile clone() const
Definition DebugInfoMetadata.h:3018
Metadata Metadata * File
Definition DebugInfoMetadata.h:3015
DEFINE_MDNODE_GET(DILexicalBlockFile,(DILocalScope *Scope, DIFile *File, unsigned Discriminator),(Scope, File, Discriminator)) DEFINE_MDNODE_GET(DILexicalBlockFile
Debug lexical block.
Definition DebugInfoMetadata.h:2924
Metadata * Scope
Definition DebugInfoMetadata.h:2964
Metadata Metadata unsigned unsigned Column
Definition DebugInfoMetadata.h:2965
Metadata Metadata unsigned Line
Definition DebugInfoMetadata.h:2964
unsigned getLine() const
Definition DebugInfoMetadata.h:2970
DEFINE_MDNODE_GET(DILexicalBlock,(DILocalScope *Scope, DIFile *File, unsigned Line, unsigned Column),(Scope, File, Line, Column)) DEFINE_MDNODE_GET(DILexicalBlock
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:2973
Metadata Metadata * File
Definition DebugInfoMetadata.h:2964
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:2925
unsigned getColumn() const
Definition DebugInfoMetadata.h:2971
friend class MDNode
Definition DebugInfoMetadata.h:2926
Metadata Metadata unsigned unsigned Column TempDILexicalBlock clone() const
Definition DebugInfoMetadata.h:2968
A scope for locals.
Definition DebugInfoMetadata.h:2255
LLVM_ABI DISubprogram * getSubprogram() const
Get the subprogram for this scope.
LLVM_ABI DILocalScope * getNonLexicalBlockFileScope() const
Get the first non DILexicalBlockFile scope of this scope.
DILocalScope(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef< Metadata * > Ops)
Definition DebugInfoMetadata.h:2257
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:2282
static LLVM_ABI DILocalScope * cloneScopeForSubprogram(DILocalScope &RootScope, DISubprogram &NewSP, LLVMContext &Ctx, DenseMap< const MDNode *, MDNode * > &Cache)
Traverses the scope chain rooted at RootScope until it hits a Subprogram, recreating the chain with "...
Local variable.
Definition DebugInfoMetadata.h:4114
Metadata MDString Metadata unsigned Metadata * Type
Definition DebugInfoMetadata.h:4161
Metadata MDString Metadata * File
Definition DebugInfoMetadata.h:4160
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4196
Metadata MDString Metadata unsigned Metadata unsigned DIFlags uint32_t Metadata Annotations TempDILocalVariable clone() const
Definition DebugInfoMetadata.h:4166
DILocalScope * getScope() const
Get the local scope for this variable.
Definition DebugInfoMetadata.h:4171
Metadata MDString * Name
Definition DebugInfoMetadata.h:4160
bool isObjectPointer() const
Definition DebugInfoMetadata.h:4185
DIFlags getFlags() const
Definition DebugInfoMetadata.h:4177
bool isParameter() const
Definition DebugInfoMetadata.h:4175
Metadata MDString Metadata unsigned Metadata unsigned Arg
Definition DebugInfoMetadata.h:4161
DINodeArray getAnnotations() const
Definition DebugInfoMetadata.h:4179
DEFINE_MDNODE_GET(DILocalVariable,(DILocalScope *Scope, StringRef Name, DIFile *File, unsigned Line, DIType *Type, unsigned Arg, DIFlags Flags, uint32_t AlignInBits, DINodeArray Annotations),(Scope, Name, File, Line, Type, Arg, Flags, AlignInBits, Annotations)) DEFINE_MDNODE_GET(DILocalVariable
Metadata MDString Metadata unsigned Line
Definition DebugInfoMetadata.h:4161
unsigned getArg() const
Definition DebugInfoMetadata.h:4176
Metadata MDString Metadata unsigned Metadata unsigned DIFlags uint32_t Metadata * Annotations
Definition DebugInfoMetadata.h:4162
Metadata MDString Metadata unsigned Metadata unsigned DIFlags uint32_t AlignInBits
Definition DebugInfoMetadata.h:4162
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4115
bool isValidLocationForIntrinsic(const DILocation *DL) const
Check that a location is valid for this variable.
Definition DebugInfoMetadata.h:4192
Metadata * getRawAnnotations() const
Definition DebugInfoMetadata.h:4182
friend class MDNode
Definition DebugInfoMetadata.h:4116
Metadata * Scope
Definition DebugInfoMetadata.h:4160
bool isArtificial() const
Definition DebugInfoMetadata.h:4184
Debug location.
Definition DebugInfoMetadata.h:2609
unsigned unsigned DILocalScope * Scope
Definition DebugInfoMetadata.h:2663
const DILocation * getWithoutAtom() const
Definition DebugInfoMetadata.h:2646
static unsigned getDuplicationFactorFromDiscriminator(unsigned D)
Returns the duplication factor for a given encoded discriminator D, or 1 if no value or 0 is encoded.
Definition DebugInfoMetadata.h:2871
static bool isPseudoProbeDiscriminator(unsigned Discriminator)
Definition DebugInfoMetadata.h:2765
unsigned unsigned DILocalScope DILocation bool uint64_t AtomGroup
Definition DebugInfoMetadata.h:2665
unsigned getDuplicationFactor() const
Returns the duplication factor stored in the discriminator, or 1 if no duplication factor (or 0) is e...
Definition DebugInfoMetadata.h:3055
uint64_t getAtomGroup() const
Definition DebugInfoMetadata.h:2643
static LLVM_ABI DILocation * getMergedLocations(ArrayRef< DILocation * > Locs)
Try to combine the vector of locations passed as input in a single one.
static unsigned getBaseDiscriminatorBits()
Return the bits used for base discriminators.
Definition DebugInfoMetadata.h:2823
static LLVM_ABI std::optional< unsigned > encodeDiscriminator(unsigned BD, unsigned DF, unsigned CI)
Raw encoding of the discriminator.
unsigned unsigned DILocalScope DILocation bool ImplicitCode
Definition DebugInfoMetadata.h:2664
Metadata * getRawScope() const
Definition DebugInfoMetadata.h:2887
static LLVM_ABI void decodeDiscriminator(unsigned D, unsigned &BD, unsigned &DF, unsigned &CI)
Raw decoder for values in an encoded discriminator D.
unsigned Line
Definition DebugInfoMetadata.h:2663
static LLVM_ABI DILocation * getMergedLocation(DILocation *LocA, DILocation *LocB)
Attempts to merge LocA and LocB into a single location; see DebugLoc::getMergedLocation for more deta...
std::optional< const DILocation * > cloneWithBaseDiscriminator(unsigned BD) const
Returns a new DILocation with updated base discriminator BD.
Definition DebugInfoMetadata.h:3064
unsigned getBaseDiscriminator() const
Returns the base discriminator stored in the discriminator.
Definition DebugInfoMetadata.h:3050
static unsigned getBaseDiscriminatorFromDiscriminator(unsigned D, bool IsFSDiscriminator=false)
Returns the base discriminator for a given encoded discriminator D.
Definition DebugInfoMetadata.h:2827
unsigned unsigned Column
Definition DebugInfoMetadata.h:2663
Metadata * getRawInlinedAt() const
Definition DebugInfoMetadata.h:2888
unsigned unsigned DILocalScope DILocation * InlinedAt
Definition DebugInfoMetadata.h:2664
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:2610
static unsigned getMaskedDiscriminator(unsigned D, unsigned B)
Return the masked discriminator value for an input discrimnator value D (i.e.
Definition DebugInfoMetadata.h:2818
const DILocation * cloneWithDiscriminator(unsigned Discriminator) const
Returns a new DILocation with updated Discriminator.
Definition DebugInfoMetadata.h:3033
static unsigned getCopyIdentifierFromDiscriminator(unsigned D)
Returns the copy identifier for a given encoded discriminator D.
Definition DebugInfoMetadata.h:2882
uint8_t getAtomRank() const
Definition DebugInfoMetadata.h:2644
friend class MDNode
Definition DebugInfoMetadata.h:2611
DEFINE_MDNODE_GET(DILocation,(unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt=nullptr, bool ImplicitCode=false, uint64_t AtomGroup=0, uint8_t AtomRank=0),(Line, Column, Scope, InlinedAt, ImplicitCode, AtomGroup, AtomRank)) DEFINE_MDNODE_GET(DILocation
void replaceOperandWith(unsigned I, Metadata *New)=delete
std::optional< const DILocation * > cloneByMultiplyingDuplicationFactor(unsigned DF) const
Returns a new DILocation with duplication factor DF * current duplication factor encoded in the discr...
Definition DebugInfoMetadata.h:3083
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:2894
unsigned getCopyIdentifier() const
Returns the copy identifier stored in the discriminator.
Definition DebugInfoMetadata.h:3059
unsigned unsigned DILocalScope DILocation bool uint64_t uint8_t AtomRank
Definition DebugInfoMetadata.h:2665
Macro file.
Definition DebugInfoMetadata.h:4581
unsigned unsigned Metadata * File
Definition DebugInfoMetadata.h:4616
Metadata * getRawElements() const
Definition DebugInfoMetadata.h:4639
DEFINE_MDNODE_GET(DIMacroFile,(unsigned MIType, unsigned Line, DIFile *File, DIMacroNodeArray Elements),(MIType, Line, File, Elements)) DEFINE_MDNODE_GET(DIMacroFile
unsigned unsigned Line
Definition DebugInfoMetadata.h:4616
DIFile * getFile() const
Definition DebugInfoMetadata.h:4632
unsigned getLine() const
Definition DebugInfoMetadata.h:4631
unsigned MIType
Definition DebugInfoMetadata.h:4616
unsigned unsigned Metadata Metadata * Elements
Definition DebugInfoMetadata.h:4617
Metadata * getRawFile() const
Definition DebugInfoMetadata.h:4638
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4641
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4582
void replaceElements(DIMacroNodeArray Elements)
Definition DebugInfoMetadata.h:4622
friend class MDNode
Definition DebugInfoMetadata.h:4583
unsigned unsigned Metadata Metadata Elements TempDIMacroFile clone() const
Definition DebugInfoMetadata.h:4620
DIMacroNodeArray getElements() const
Definition DebugInfoMetadata.h:4634
DIMacroNode(LLVMContext &C, unsigned ID, StorageType Storage, unsigned MIType, ArrayRef< Metadata * > Ops1, ArrayRef< Metadata * > Ops2={})
Definition DebugInfoMetadata.h:4485
unsigned getMacinfoType() const
Definition DebugInfoMetadata.h:4510
StringRef getStringOperand(unsigned I) const
Definition DebugInfoMetadata.h:4497
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4512
static MDString * getCanonicalMDString(LLVMContext &Context, StringRef S)
Definition DebugInfoMetadata.h:4503
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4481
Ty * getOperandAs(unsigned I) const
Definition DebugInfoMetadata.h:4493
friend class MDNode
Definition DebugInfoMetadata.h:4482
Macro.
Definition DebugInfoMetadata.h:4526
unsigned MIType
Definition DebugInfoMetadata.h:4559
unsigned getLine() const
Definition DebugInfoMetadata.h:4565
MDString * getRawName() const
Definition DebugInfoMetadata.h:4570
unsigned unsigned MDString MDString Value TempDIMacro clone() const
Definition DebugInfoMetadata.h:4563
unsigned unsigned MDString MDString * Value
Definition DebugInfoMetadata.h:4560
unsigned unsigned MDString * Name
Definition DebugInfoMetadata.h:4559
StringRef getName() const
Definition DebugInfoMetadata.h:4567
MDString * getRawValue() const
Definition DebugInfoMetadata.h:4571
unsigned unsigned Line
Definition DebugInfoMetadata.h:4559
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4527
DEFINE_MDNODE_GET(DIMacro,(unsigned MIType, unsigned Line, StringRef Name, StringRef Value=""),(MIType, Line, Name, Value)) DEFINE_MDNODE_GET(DIMacro
friend class MDNode
Definition DebugInfoMetadata.h:4528
StringRef getValue() const
Definition DebugInfoMetadata.h:4568
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4573
Represents a module in the programming language, for example, a Clang module, or a Fortran module.
Definition DebugInfoMetadata.h:3156
Metadata Metadata * Scope
Definition DebugInfoMetadata.h:3196
Metadata Metadata MDString * Name
Definition DebugInfoMetadata.h:3196
Metadata Metadata MDString MDString MDString MDString * APINotesFile
Definition DebugInfoMetadata.h:3198
Metadata * File
Definition DebugInfoMetadata.h:3196
Metadata Metadata MDString MDString MDString * IncludePath
Definition DebugInfoMetadata.h:3197
Metadata Metadata MDString MDString * ConfigurationMacros
Definition DebugInfoMetadata.h:3197
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:3157
DEFINE_MDNODE_GET(DIModule,(DIFile *File, DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef APINotesFile, unsigned LineNo, bool IsDecl=false),(File, Scope, Name, ConfigurationMacros, IncludePath, APINotesFile, LineNo, IsDecl)) DEFINE_MDNODE_GET(DIModule
Metadata Metadata MDString MDString MDString MDString unsigned LineNo
Definition DebugInfoMetadata.h:3198
friend class MDNode
Definition DebugInfoMetadata.h:3158
Debug lexical block.
Definition DebugInfoMetadata.h:3106
Metadata MDString bool ExportSymbols TempDINamespace clone() const
Definition DebugInfoMetadata.h:3138
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:3147
DEFINE_MDNODE_GET(DINamespace,(DIScope *Scope, StringRef Name, bool ExportSymbols),(Scope, Name, ExportSymbols)) DEFINE_MDNODE_GET(DINamespace
DIScope * getScope() const
Definition DebugInfoMetadata.h:3141
Metadata MDString bool ExportSymbols
Definition DebugInfoMetadata.h:3135
StringRef getName() const
Definition DebugInfoMetadata.h:3142
MDString * getRawName() const
Definition DebugInfoMetadata.h:3145
Metadata MDString * Name
Definition DebugInfoMetadata.h:3135
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:3107
Metadata * Scope
Definition DebugInfoMetadata.h:3135
bool getExportSymbols() const
Definition DebugInfoMetadata.h:3140
friend class MDNode
Definition DebugInfoMetadata.h:3108
Metadata * getRawScope() const
Definition DebugInfoMetadata.h:3144
Tagged DWARF-like metadata node.
Definition DebugInfoMetadata.h:184
LLVM_ABI dwarf::Tag getTag() const
static MDString * getCanonicalMDString(LLVMContext &Context, StringRef S)
Definition DebugInfoMetadata.h:207
static LLVM_ABI DIFlags getFlag(StringRef Flag)
static LLVM_ABI DIFlags splitFlags(DIFlags Flags, SmallVectorImpl< DIFlags > &SplitFlags)
Split up a flags bitfield.
void setTag(unsigned Tag)
Allow subclasses to mutate the tag.
Definition DebugInfoMetadata.h:214
DINode(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef< Metadata * > Ops1, ArrayRef< Metadata * > Ops2={})
Definition DebugInfoMetadata.h:189
StringRef getStringOperand(unsigned I) const
Definition DebugInfoMetadata.h:201
Ty * getOperandAs(unsigned I) const
Definition DebugInfoMetadata.h:197
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:185
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:243
static LLVM_ABI StringRef getFlagString(DIFlags Flag)
friend class MDNode
Definition DebugInfoMetadata.h:186
DIFlags
Debug info flags.
Definition DebugInfoMetadata.h:223
@ FlagPtrToMemberRep
Definition DebugInfoMetadata.h:228
@ FlagAccessibility
Definition DebugInfoMetadata.h:227
MDString Metadata unsigned MDString MDString unsigned Metadata Type TempDIObjCProperty clone() const
Definition DebugInfoMetadata.h:4330
DIType * getType() const
Definition DebugInfoMetadata.h:4338
unsigned getAttributes() const
Definition DebugInfoMetadata.h:4333
StringRef getFilename() const
Definition DebugInfoMetadata.h:4340
MDString * getRawName() const
Definition DebugInfoMetadata.h:4352
unsigned getLine() const
Definition DebugInfoMetadata.h:4332
StringRef getDirectory() const
Definition DebugInfoMetadata.h:4346
MDString * getRawSetterName() const
Definition DebugInfoMetadata.h:4355
Metadata * getRawType() const
Definition DebugInfoMetadata.h:4356
StringRef getGetterName() const
Definition DebugInfoMetadata.h:4336
MDString Metadata * File
Definition DebugInfoMetadata.h:4324
DIFile * getFile() const
Definition DebugInfoMetadata.h:4335
MDString Metadata unsigned MDString MDString unsigned Metadata * Type
Definition DebugInfoMetadata.h:4326
MDString * Name
Definition DebugInfoMetadata.h:4324
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:4358
MDString * getRawGetterName() const
Definition DebugInfoMetadata.h:4354
Metadata * getRawFile() const
Definition DebugInfoMetadata.h:4353
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:4286
MDString Metadata unsigned MDString * GetterName
Definition DebugInfoMetadata.h:4325
friend class MDNode
Definition DebugInfoMetadata.h:4287
MDString Metadata unsigned MDString MDString * SetterName
Definition DebugInfoMetadata.h:4325
StringRef getName() const
Definition DebugInfoMetadata.h:4334
DEFINE_MDNODE_GET(DIObjCProperty,(StringRef Name, DIFile *File, unsigned Line, StringRef GetterName, StringRef SetterName, unsigned Attributes, DIType *Type),(Name, File, Line, GetterName, SetterName, Attributes, Type)) DEFINE_MDNODE_GET(DIObjCProperty
StringRef getSetterName() const
Definition DebugInfoMetadata.h:4337
Base class for scope-like contexts.
Definition DebugInfoMetadata.h:571
StringRef getFilename() const
Definition DebugInfoMetadata.h:740
LLVM_ABI StringRef getName() const
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:599
DIFile * getFile() const
Definition DebugInfoMetadata.h:579
StringRef getDirectory() const
Definition DebugInfoMetadata.h:746
std::optional< StringRef > getSource() const
Definition DebugInfoMetadata.h:752
LLVM_ABI DIScope * getScope() const
Metadata * getRawFile() const
Return the raw underlying file.
Definition DebugInfoMetadata.h:594
DIScope(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef< Metadata * > Ops)
Definition DebugInfoMetadata.h:573
Wrapper structure that holds a language name and its version.
Definition DebugInfoMetadata.h:75
uint16_t getUnversionedName() const
Transitional API for cases where we do not yet support versioned source language names.
Definition DebugInfoMetadata.h:101
uint32_t getVersion() const
Returns language version. Only valid for versioned language names.
Definition DebugInfoMetadata.h:107
DISourceLanguageName(uint16_t Lang, uint32_t Version)
Definition DebugInfoMetadata.h:112
bool hasVersionedName() const
Definition DebugInfoMetadata.h:91
uint16_t getName() const
Returns a versioned or unversioned language name.
Definition DebugInfoMetadata.h:94
DISourceLanguageName(uint16_t Lang)
Definition DebugInfoMetadata.h:114
String type, Fortran CHARACTER(n)
Definition DebugInfoMetadata.h:1168
unsigned MDString * Name
Definition DebugInfoMetadata.h:1228
unsigned MDString Metadata Metadata Metadata uint64_t SizeInBits
Definition DebugInfoMetadata.h:1230
unsigned getEncoding() const
Definition DebugInfoMetadata.h:1267
unsigned MDString Metadata Metadata Metadata uint64_t uint32_t AlignInBits
Definition DebugInfoMetadata.h:1230
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:1251
unsigned MDString Metadata Metadata Metadata * StringLocationExp
Definition DebugInfoMetadata.h:1229
unsigned MDString Metadata Metadata Metadata uint64_t uint32_t unsigned Encoding unsigned MDString Metadata Metadata Metadata Metadata uint32_t unsigned Encoding TempDIStringType clone() const
Definition DebugInfoMetadata.h:1249
unsigned Tag
Definition DebugInfoMetadata.h:1228
DIExpression * getStringLengthExp() const
Definition DebugInfoMetadata.h:1259
unsigned MDString Metadata Metadata * StringLengthExp
Definition DebugInfoMetadata.h:1229
Metadata * getRawStringLengthExp() const
Definition DebugInfoMetadata.h:1271
unsigned MDString Metadata Metadata Metadata uint64_t uint32_t unsigned Encoding
Definition DebugInfoMetadata.h:1231
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:1169
Metadata * getRawStringLength() const
Definition DebugInfoMetadata.h:1269
DIVariable * getStringLength() const
Definition DebugInfoMetadata.h:1255
DIExpression * getStringLocationExp() const
Definition DebugInfoMetadata.h:1263
friend class MDNode
Definition DebugInfoMetadata.h:1170
unsigned MDString Metadata * StringLength
Definition DebugInfoMetadata.h:1228
Metadata * getRawStringLocationExp() const
Definition DebugInfoMetadata.h:1275
DEFINE_MDNODE_GET(DIStringType,(unsigned Tag, StringRef Name, uint64_t SizeInBits, uint32_t AlignInBits),(Tag, Name, nullptr, nullptr, nullptr, SizeInBits, AlignInBits, 0)) DEFINE_MDNODE_GET(DIStringType
Subprogram description. Uses SubclassData1.
Definition DebugInfoMetadata.h:2290
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata * Unit
Definition DebugInfoMetadata.h:2401
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata Metadata Metadata MDString bool UsesKeyInstructions
Definition DebugInfoMetadata.h:2405
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata Metadata Metadata * Annotations
Definition DebugInfoMetadata.h:2404
Metadata MDString MDString Metadata unsigned Metadata unsigned ScopeLine
Definition DebugInfoMetadata.h:2399
Metadata * Scope
Definition DebugInfoMetadata.h:2398
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags SPFlags
Definition DebugInfoMetadata.h:2401
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata * ContainingType
Definition DebugInfoMetadata.h:2400
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata * TemplateParams
Definition DebugInfoMetadata.h:2402
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata * Declaration
Definition DebugInfoMetadata.h:2402
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata Metadata Metadata MDString * TargetFuncName
Definition DebugInfoMetadata.h:2404
void forEachRetainedNode(FuncLVT &&FuncLV, FuncLabelT &&FuncLabel, FuncImportedEntityT &&FuncIE) const
For each retained node, applies one of the given functions depending on the type of a node.
Definition DebugInfoMetadata.h:2583
static LLVM_ABI DISPFlags toSPFlags(bool IsLocalToUnit, bool IsDefinition, bool IsOptimized, unsigned Virtuality=SPFlagNonvirtual, bool IsMainSubprogram=false)
static const DIScope * getRawRetainedNodeScope(const MDNode *N)
Metadata MDString * Name
Definition DebugInfoMetadata.h:2398
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata Metadata * ThrownTypes
Definition DebugInfoMetadata.h:2403
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:2291
DEFINE_MDNODE_GET(DISubprogram,(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DISubroutineType *Type, unsigned ScopeLine, DIType *ContainingType, unsigned VirtualIndex, int ThisAdjustment, DIFlags Flags, DISPFlags SPFlags, DICompileUnit *Unit, DITemplateParameterArray TemplateParams=nullptr, DISubprogram *Declaration=nullptr, DINodeArray RetainedNodes=nullptr, DITypeArray ThrownTypes=nullptr, DINodeArray Annotations=nullptr, StringRef TargetFuncName="", bool UsesKeyInstructions=false),(Scope, Name, LinkageName, File, Line, Type, ScopeLine, ContainingType, VirtualIndex, ThisAdjustment, Flags, SPFlags, Unit, TemplateParams, Declaration, RetainedNodes, ThrownTypes, Annotations, TargetFuncName, UsesKeyInstructions)) DEFINE_MDNODE_GET(DISubprogram
static LLVM_ABI DISPFlags getFlag(StringRef Flag)
Metadata MDString MDString Metadata * File
Definition DebugInfoMetadata.h:2398
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned VirtualIndex
Definition DebugInfoMetadata.h:2400
static LLVM_ABI DISPFlags splitFlags(DISPFlags Flags, SmallVectorImpl< DISPFlags > &SplitFlags)
Split up a flags bitfield for easier printing.
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:2597
Metadata MDString MDString * LinkageName
Definition DebugInfoMetadata.h:2398
friend class MDNode
Definition DebugInfoMetadata.h:2292
static LLVM_ABI StringRef getFlagString(DISPFlags Flag)
Metadata MDString MDString Metadata unsigned Metadata * Type
Definition DebugInfoMetadata.h:2399
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata * RetainedNodes
Definition DebugInfoMetadata.h:2403
DISPFlags
Debug info subprogram flags.
Definition DebugInfoMetadata.h:2305
@ SPFlagVirtuality
Definition DebugInfoMetadata.h:2310
@ SPFlagNonvirtual
Definition DebugInfoMetadata.h:2309
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int ThisAdjustment
Definition DebugInfoMetadata.h:2400
LLVM_ABI bool describes(const Function *F) const
Check if this subprogram describes the given function.
Subrange type.
Definition DebugInfoMetadata.h:1521
StringRef DIFile unsigned Line
Definition DebugInfoMetadata.h:1577
Metadata * getRawUpperBound() const
Definition DebugInfoMetadata.h:1594
BoundType getLowerBound() const
Definition DebugInfoMetadata.h:1606
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata Metadata * UpperBound
Definition DebugInfoMetadata.h:1580
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType * BaseType
Definition DebugInfoMetadata.h:1579
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata Metadata Metadata Metadata * Bias
Definition DebugInfoMetadata.h:1580
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata Metadata Metadata * Stride
Definition DebugInfoMetadata.h:1580
StringRef DIFile unsigned DIScope uint64_t SizeInBits
Definition DebugInfoMetadata.h:1578
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:1618
BoundType getBias() const
Definition DebugInfoMetadata.h:1616
DEFINE_MDNODE_GET(DISubrangeType,(MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *SizeInBits, uint32_t AlignInBits, DIFlags Flags, Metadata *BaseType, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride, Metadata *Bias),(Name, File, Line, Scope, SizeInBits, AlignInBits, Flags, BaseType, LowerBound, UpperBound, Stride, Bias)) DEFINE_MDNODE_GET(DISubrangeType
Metadata * getRawBias() const
Definition DebugInfoMetadata.h:1602
Metadata * getRawBaseType() const
Definition DebugInfoMetadata.h:1588
StringRef DIFile * File
Definition DebugInfoMetadata.h:1577
PointerUnion< ConstantInt *, DIVariable *, DIExpression *, DIDerivedType * > BoundType
Definition DebugInfoMetadata.h:1525
StringRef Name
Definition DebugInfoMetadata.h:1577
StringRef DIFile unsigned DIScope * Scope
Definition DebugInfoMetadata.h:1578
BoundType getUpperBound() const
Definition DebugInfoMetadata.h:1610
DIType * getBaseType() const
Get the base type this is derived from.
Definition DebugInfoMetadata.h:1587
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:1528
BoundType getStride() const
Definition DebugInfoMetadata.h:1614
Metadata * getRawLowerBound() const
Definition DebugInfoMetadata.h:1590
StringRef DIFile unsigned DIScope uint64_t uint32_t AlignInBits
Definition DebugInfoMetadata.h:1578
friend class MDNode
Definition DebugInfoMetadata.h:1529
Metadata * getRawStride() const
Definition DebugInfoMetadata.h:1598
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata * LowerBound
Definition DebugInfoMetadata.h:1579
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags Flags
Definition DebugInfoMetadata.h:1579
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata Metadata Metadata Metadata Bias TempDISubrangeType clone() const
Definition DebugInfoMetadata.h:1584
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:457
LLVM_ABI BoundType getUpperBound() const
LLVM_ABI BoundType getStride() const
LLVM_ABI BoundType getLowerBound() const
Metadata * CountNode
Definition DebugInfoMetadata.h:429
DEFINE_MDNODE_GET(DISubrange,(int64_t Count, int64_t LowerBound=0),(Count, LowerBound)) DEFINE_MDNODE_GET(DISubrange
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:399
friend class MDNode
Definition DebugInfoMetadata.h:400
LLVM_ABI BoundType getCount() const
Metadata int64_t LowerBound
Definition DebugInfoMetadata.h:429
Type array for a subprogram.
Definition DebugInfoMetadata.h:1987
uint8_t getCC() const
Definition DebugInfoMetadata.h:2032
TempDISubroutineType cloneWithCC(uint8_t CC) const
Definition DebugInfoMetadata.h:2026
DIFlags Flags
Definition DebugInfoMetadata.h:2021
DEFINE_MDNODE_GET(DISubroutineType,(DIFlags Flags, uint8_t CC, DITypeRefArray TypeArray),(Flags, CC, TypeArray)) DEFINE_MDNODE_GET(DISubroutineType
DIFlags uint8_t Metadata * TypeArray
Definition DebugInfoMetadata.h:2021
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:2040
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:1988
Metadata * getRawTypeArray() const
Definition DebugInfoMetadata.h:2038
DIFlags uint8_t CC
Definition DebugInfoMetadata.h:2021
friend class MDNode
Definition DebugInfoMetadata.h:1989
DITypeRefArray getTypeArray() const
Definition DebugInfoMetadata.h:2034
DIFlags uint8_t Metadata TypeArray TempDISubroutineType clone() const
Definition DebugInfoMetadata.h:2024
Metadata * getRawType() const
Definition DebugInfoMetadata.h:3243
bool isDefault() const
Definition DebugInfoMetadata.h:3244
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:3246
DITemplateParameter(LLVMContext &Context, unsigned ID, StorageType Storage, unsigned Tag, bool IsDefault, ArrayRef< Metadata * > Ops)
Definition DebugInfoMetadata.h:3231
DIType * getType() const
Definition DebugInfoMetadata.h:3240
StringRef getName() const
Definition DebugInfoMetadata.h:3239
MDString * getRawName() const
Definition DebugInfoMetadata.h:3242
~DITemplateParameter()=default
MDString Metadata bool IsDefault
Definition DebugInfoMetadata.h:3280
MDString Metadata * Type
Definition DebugInfoMetadata.h:3280
DEFINE_MDNODE_GET(DITemplateTypeParameter,(StringRef Name, DIType *Type, bool IsDefault),(Name, Type, IsDefault)) DEFINE_MDNODE_GET(DITemplateTypeParameter
MDString Metadata bool IsDefault TempDITemplateTypeParameter clone() const
Definition DebugInfoMetadata.h:3283
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:3285
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:3253
MDString * Name
Definition DebugInfoMetadata.h:3280
friend class MDNode
Definition DebugInfoMetadata.h:3254
unsigned MDString Metadata bool Metadata Value TempDITemplateValueParameter clone() const
Definition DebugInfoMetadata.h:3329
unsigned MDString Metadata * Type
Definition DebugInfoMetadata.h:3325
unsigned Tag
Definition DebugInfoMetadata.h:3325
unsigned MDString * Name
Definition DebugInfoMetadata.h:3325
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:3333
DEFINE_MDNODE_GET(DITemplateValueParameter,(unsigned Tag, StringRef Name, DIType *Type, bool IsDefault, Metadata *Value),(Tag, Name, Type, IsDefault, Value)) DEFINE_MDNODE_GET(DITemplateValueParameter
Metadata * getValue() const
Definition DebugInfoMetadata.h:3331
unsigned MDString Metadata bool IsDefault
Definition DebugInfoMetadata.h:3326
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:3291
friend class MDNode
Definition DebugInfoMetadata.h:3292
unsigned MDString Metadata bool Metadata * Value
Definition DebugInfoMetadata.h:3326
bool operator!=(const iterator &X) const
Definition DebugInfoMetadata.h:169
DIType * value_type
Definition DebugInfoMetadata.h:147
DIType * operator*() const
Definition DebugInfoMetadata.h:155
bool operator==(const iterator &X) const
Definition DebugInfoMetadata.h:168
std::input_iterator_tag iterator_category
Definition DebugInfoMetadata.h:146
std::ptrdiff_t difference_type
Definition DebugInfoMetadata.h:148
DIType * reference
Definition DebugInfoMetadata.h:150
iterator & operator++()
Definition DebugInfoMetadata.h:157
iterator(MDNode::op_iterator I)
Definition DebugInfoMetadata.h:153
iterator operator++(int)
Definition DebugInfoMetadata.h:162
void pointer
Definition DebugInfoMetadata.h:149
DIType * operator[](unsigned I) const
Definition DebugInfoMetadata.h:138
MDTuple & operator*() const
Definition DebugInfoMetadata.h:134
MDTuple * operator->() const
Definition DebugInfoMetadata.h:133
iterator end() const
Definition DebugInfoMetadata.h:174
MDTuple * get() const
Definition DebugInfoMetadata.h:132
iterator begin() const
Definition DebugInfoMetadata.h:173
DITypeRefArray(const MDTuple *N)
Definition DebugInfoMetadata.h:127
unsigned size() const
Definition DebugInfoMetadata.h:137
Base class for types.
Definition DebugInfoMetadata.h:765
bool isLittleEndian() const
Definition DebugInfoMetadata.h:866
static constexpr unsigned N_OPERANDS
Definition DebugInfoMetadata.h:771
bool isPublic() const
Definition DebugInfoMetadata.h:845
bool isPrivate() const
Definition DebugInfoMetadata.h:839
uint32_t getNumExtraInhabitants() const
Definition DebugInfoMetadata.h:805
bool isBigEndian() const
Definition DebugInfoMetadata.h:865
bool isLValueReference() const
Definition DebugInfoMetadata.h:859
bool isBitField() const
Definition DebugInfoMetadata.h:857
bool isStaticMember() const
Definition DebugInfoMetadata.h:858
bool isVirtual() const
Definition DebugInfoMetadata.h:850
TempDIType cloneWithFlags(DIFlags NewFlags) const
Returns a new temporary DIType with updated Flags.
Definition DebugInfoMetadata.h:833
bool isObjcClassComplete() const
Definition DebugInfoMetadata.h:853
MDString * getRawName() const
Definition DebugInfoMetadata.h:812
bool isAppleBlockExtension() const
Definition DebugInfoMetadata.h:849
uint64_t getOffsetInBits() const
Definition DebugInfoMetadata.h:824
bool isVector() const
Definition DebugInfoMetadata.h:856
bool isProtected() const
Definition DebugInfoMetadata.h:842
bool isObjectPointer() const
Definition DebugInfoMetadata.h:852
DIFlags getFlags() const
Definition DebugInfoMetadata.h:806
Metadata * getRawScope() const
Definition DebugInfoMetadata.h:811
StringRef getName() const
Definition DebugInfoMetadata.h:809
bool isForwardDecl() const
Definition DebugInfoMetadata.h:848
bool isTypePassByValue() const
Definition DebugInfoMetadata.h:861
uint64_t getSizeInBits() const
Definition DebugInfoMetadata.h:815
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:869
DIType(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, unsigned Line, uint32_t AlignInBits, uint32_t NumExtraInhabitants, DIFlags Flags, ArrayRef< Metadata * > Ops)
Definition DebugInfoMetadata.h:773
uint32_t getAlignInBytes() const
Definition DebugInfoMetadata.h:804
void mutate(unsigned Tag, unsigned Line, uint32_t AlignInBits, uint32_t NumExtraInhabitants, DIFlags Flags)
Change fields in place.
Definition DebugInfoMetadata.h:790
void init(unsigned Line, uint32_t AlignInBits, uint32_t NumExtraInhabitants, DIFlags Flags)
Definition DebugInfoMetadata.h:781
LLVM_ABI uint32_t getAlignInBits() const
Metadata * getRawSizeInBits() const
Definition DebugInfoMetadata.h:814
unsigned getLine() const
Definition DebugInfoMetadata.h:802
bool isRValueReference() const
Definition DebugInfoMetadata.h:860
bool isArtificial() const
Definition DebugInfoMetadata.h:851
bool getExportSymbols() const
Definition DebugInfoMetadata.h:867
TempDIType clone() const
Definition DebugInfoMetadata.h:798
DIScope * getScope() const
Definition DebugInfoMetadata.h:808
bool isTypePassByReference() const
Definition DebugInfoMetadata.h:862
Metadata * getRawOffsetInBits() const
Definition DebugInfoMetadata.h:823
Base class for variables.
Definition DebugInfoMetadata.h:3341
std::optional< DIBasicType::Signedness > getSignedness() const
Return the signedness of this variable's type, or std::nullopt if this type is neither signed nor uns...
Definition DebugInfoMetadata.h:3363
uint32_t getAlignInBits() const
Definition DebugInfoMetadata.h:3356
DIFile * getFile() const
Definition DebugInfoMetadata.h:3354
MDString * getRawName() const
Definition DebugInfoMetadata.h:3388
uint32_t getAlignInBytes() const
Definition DebugInfoMetadata.h:3357
DIScope * getScope() const
Definition DebugInfoMetadata.h:3352
StringRef getDirectory() const
Definition DebugInfoMetadata.h:3375
LLVM_ABI std::optional< uint64_t > getSizeInBits() const
Determines the size of the variable's type.
Metadata * getRawFile() const
Definition DebugInfoMetadata.h:3389
std::optional< StringRef > getSource() const
Definition DebugInfoMetadata.h:3381
StringRef getFilename() const
Definition DebugInfoMetadata.h:3369
Metadata * getRawType() const
Definition DebugInfoMetadata.h:3390
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:3392
LLVM_ABI DIVariable(LLVMContext &C, unsigned ID, StorageType Storage, signed Line, ArrayRef< Metadata * > Ops, uint32_t AlignInBits=0)
DIType * getType() const
Definition DebugInfoMetadata.h:3355
unsigned getLine() const
Definition DebugInfoMetadata.h:3351
StringRef getName() const
Definition DebugInfoMetadata.h:3353
Metadata * getRawScope() const
Definition DebugInfoMetadata.h:3387
A parsed version of the target data layout string in and methods for querying it.
Record of a variable value-assignment, aka a non instruction representation of the dbg....
Identifies a unique instance of a whole variable (discards/ignores fragment information).
Definition DebugInfoMetadata.h:4774
LLVM_ABI DebugVariableAggregate(const DbgVariableRecord *DVR)
DebugVariableAggregate(const DebugVariable &V)
Definition DebugInfoMetadata.h:4777
Identifies a unique instance of a variable.
Definition DebugInfoMetadata.h:4697
static bool isDefaultFragment(const FragmentInfo F)
Definition DebugInfoMetadata.h:4730
DebugVariable(const DILocalVariable *Var, const DIExpression *DIExpr, const DILocation *InlinedAt)
Definition DebugInfoMetadata.h:4716
const DILocation * getInlinedAt() const
Definition DebugInfoMetadata.h:4724
bool operator<(const DebugVariable &Other) const
Definition DebugInfoMetadata.h:4739
DebugVariable(const DILocalVariable *Var, std::optional< FragmentInfo > FragmentInfo, const DILocation *InlinedAt)
Definition DebugInfoMetadata.h:4711
bool operator==(const DebugVariable &Other) const
Definition DebugInfoMetadata.h:4734
FragmentInfo getFragmentOrDefault() const
Definition DebugInfoMetadata.h:4726
std::optional< FragmentInfo > getFragment() const
Definition DebugInfoMetadata.h:4723
const DILocalVariable * getVariable() const
Definition DebugInfoMetadata.h:4722
LLVM_ABI DebugVariable(const DbgVariableRecord *DVR)
Class representing an expression and its matching format.
Generic tagged DWARF-like metadata node.
Definition DebugInfoMetadata.h:287
unsigned Tag
Definition DebugInfoMetadata.h:328
static bool classof(const Metadata *MD)
Definition DebugInfoMetadata.h:353
unsigned MDString ArrayRef< Metadata * > DwarfOps TempGenericDINode clone() const
Return a (temporary) clone of this.
Definition DebugInfoMetadata.h:333
LLVM_ABI dwarf::Tag getTag() const
StringRef getHeader() const
Definition DebugInfoMetadata.h:336
MDString * getRawHeader() const
Definition DebugInfoMetadata.h:337
const MDOperand & getDwarfOperand(unsigned I) const
Definition DebugInfoMetadata.h:346
unsigned getHash() const
Definition DebugInfoMetadata.h:321
unsigned getNumDwarfOperands() const
Definition DebugInfoMetadata.h:345
op_iterator dwarf_op_end() const
Definition DebugInfoMetadata.h:340
op_iterator dwarf_op_begin() const
Definition DebugInfoMetadata.h:339
friend class LLVMContextImpl
Definition DebugInfoMetadata.h:288
unsigned MDString * Header
Definition DebugInfoMetadata.h:328
op_range dwarf_operands() const
Definition DebugInfoMetadata.h:341
friend class MDNode
Definition DebugInfoMetadata.h:289
DEFINE_MDNODE_GET(GenericDINode,(unsigned Tag, StringRef Header, ArrayRef< Metadata * > DwarfOps),(Tag, Header, DwarfOps)) DEFINE_MDNODE_GET(GenericDINode
void replaceDwarfOperandWith(unsigned I, Metadata *New)
Definition DebugInfoMetadata.h:349
unsigned MDString ArrayRef< Metadata * > DwarfOps
Definition DebugInfoMetadata.h:329
This is an important class for using LLVM in a threaded context.
LLVM_ABI void replaceOperandWith(unsigned I, Metadata *New)
Replace a specific operand.
const MDOperand & getOperand(unsigned I) const
static TempMDTuple getTemporary(LLVMContext &Context, ArrayRef< Metadata * > MDs)
op_iterator op_end() const
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
unsigned getNumOperands() const
Return number of MDNode operands.
iterator_range< op_iterator > op_range
LLVM_ABI TempMDNode clone() const
Create a (temporary) clone of this.
LLVM_ABI void setOperand(unsigned I, Metadata *New)
Set an operand.
op_iterator op_begin() const
LLVMContext & getContext() const
LLVM_ABI void dropAllReferences()
const MDOperand * op_iterator
Tracking metadata reference owned by Metadata.
static LLVM_ABI MDString * get(LLVMContext &Context, StringRef Str)
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...
typename SuperClass::iterator iterator
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.
constexpr bool empty() const
empty - Check if the string is empty.
The instances of the Type class are immutable: once they are created, they are never changed.
static LLVM_ABI IntegerType * getInt64Ty(LLVMContext &C)
LLVM Value Representation.
A range adaptor for a pair of iterators.
LLVM_ABI unsigned getVirtuality(StringRef VirtualityString)
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
@ C
The default llvm calling convention, compatible with C.
template class LLVM_TEMPLATE_ABI opt< bool >
This is an optimization pass for GlobalISel generic memory operations.
bool operator<(int64_t V1, const APSInt &V2)
decltype(auto) dyn_cast(const From &Val)
dyn_cast - Return the argument parameter cast to the specified type.
LLVM_ABI cl::opt< bool > EnableFSDiscriminator
bool operator!=(uint64_t V1, const APInt &V2)
auto cast_or_null(const Y &Val)
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
auto dyn_cast_or_null(const Y &Val)
FunctionAddr VTableAddr Count
static unsigned getBaseFSBitEnd()
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
bool isa(const From &Val)
isa - Return true if the parameter to the template is an instance of one of the template type argu...
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
@ Ref
The access may reference the value stored in memory.
@ LLVM_MARK_AS_BITMASK_ENUM
static unsigned getN1Bits(int N)
FunctionAddr VTableAddr Next
DWARFExpression::Operation Op
ArrayRef(const T &OneElt) -> ArrayRef< T >
decltype(auto) cast(const From &Val)
cast - Return the argument parameter cast to the specified type.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
Implement std::hash so that hash_code can be used in STL containers.
Pointer authentication (__ptrauth) metadata.
Definition DebugInfoMetadata.h:1289
unsigned key()
Definition DebugInfoMetadata.h:1308
bool isaPointer()
Definition DebugInfoMetadata.h:1311
bool authenticatesNullValues()
Definition DebugInfoMetadata.h:1312
unsigned RawData
Definition DebugInfoMetadata.h:1296
PtrAuthData(unsigned FromRawData)
Definition DebugInfoMetadata.h:1298
bool isAddressDiscriminated()
Definition DebugInfoMetadata.h:1309
PtrAuthData(unsigned Key, bool IsDiscr, unsigned Discriminator, bool IsaPointer, bool AuthenticatesNullValues)
Definition DebugInfoMetadata.h:1299
unsigned extraDiscriminator()
Definition DebugInfoMetadata.h:1310
A single checksum, represented by a Kind and a Value (a string).
Definition DebugInfoMetadata.h:648
bool operator==(const ChecksumInfo< T > &X) const
Definition DebugInfoMetadata.h:656
T Value
The string value of the checksum.
Definition DebugInfoMetadata.h:652
ChecksumKind Kind
The kind of checksum which Value encodes.
Definition DebugInfoMetadata.h:650
ChecksumInfo(ChecksumKind Kind, T Value)
Definition DebugInfoMetadata.h:654
bool operator!=(const ChecksumInfo< T > &X) const
Definition DebugInfoMetadata.h:659
StringRef getKindAsString() const
Definition DebugInfoMetadata.h:660
DIExpression::FragmentInfo FragInfo
Definition DebugInfoMetadata.h:3873
static bool isEqual(const FragInfo &A, const FragInfo &B)
Definition DebugInfoMetadata.h:3884
static const uint64_t MaxVal
Definition DebugInfoMetadata.h:3874
static FragInfo getTombstoneKey()
Definition DebugInfoMetadata.h:3878
static unsigned getHashValue(const FragInfo &Frag)
Definition DebugInfoMetadata.h:3880
static FragInfo getEmptyKey()
Definition DebugInfoMetadata.h:3876
static unsigned getHashValue(const DebugVariable &D)
Definition DebugInfoMetadata.h:4758
static DebugVariable getEmptyKey()
Empty key: no key should be generated that has no DILocalVariable.
Definition DebugInfoMetadata.h:4749
DIExpression::FragmentInfo FragmentInfo
Definition DebugInfoMetadata.h:4746
static DebugVariable getTombstoneKey()
Difference in tombstone is that the Optional is meaningful.
Definition DebugInfoMetadata.h:4754
static bool isEqual(const DebugVariable &A, const DebugVariable &B)
Definition DebugInfoMetadata.h:4767
An information struct used to provide DenseMap with the various necessary components for a given valu...
static uint32_t extractProbeIndex(uint32_t Value)
static std::optional< uint32_t > extractDwarfBaseDiscriminator(uint32_t Value)