13 #ifndef LLVM_IR_DEBUGINFOMETADATA_H
14 #define LLVM_IR_DEBUGINFOMETADATA_H
34 #include <type_traits>
38 #define DEFINE_MDNODE_GET_UNPACK_IMPL(...) __VA_ARGS__
39 #define DEFINE_MDNODE_GET_UNPACK(ARGS) DEFINE_MDNODE_GET_UNPACK_IMPL ARGS
40 #define DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS) \
41 static CLASS *getDistinct(LLVMContext &Context, \
42 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
43 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Distinct); \
45 static Temp##CLASS getTemporary(LLVMContext &Context, \
46 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
48 getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Temporary)); \
50 #define DEFINE_MDNODE_GET(CLASS, FORMAL, ARGS) \
51 static CLASS *get(LLVMContext &Context, DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
52 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued); \
54 static CLASS *getIfExists(LLVMContext &Context, \
55 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
56 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued, \
59 DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS)
70 explicit operator bool()
const {
return get(); }
78 unsigned size()
const {
return N ?
N->getNumOperands() : 0u; }
80 return cast_or_null<DIType>(
N->getOperand(
I));
141 if (
auto *
S = getOperandAs<MDString>(
I))
142 return S->getString();
163 #define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = ID,
164 #define DI_FLAG_LARGEST_NEEDED
165 #include "llvm/IR/DebugInfoFlags.def"
168 FlagVirtualInheritance,
186 case GenericDINodeKind:
188 case DIEnumeratorKind:
189 case DIBasicTypeKind:
190 case DIStringTypeKind:
191 case DIDerivedTypeKind:
192 case DICompositeTypeKind:
193 case DISubroutineTypeKind:
195 case DICompileUnitKind:
196 case DISubprogramKind:
197 case DILexicalBlockKind:
198 case DILexicalBlockFileKind:
199 case DINamespaceKind:
200 case DICommonBlockKind:
201 case DITemplateTypeParameterKind:
202 case DITemplateValueParameterKind:
203 case DIGlobalVariableKind:
204 case DILocalVariableKind:
206 case DIObjCPropertyKind:
207 case DIImportedEntityKind:
209 case DIGenericSubrangeKind:
234 void recalculateHash();
247 TempGenericDINode cloneImpl()
const {
263 TempGenericDINode
clone()
const {
return cloneImpl(); }
297 :
DINode(
C, DISubrangeKind,
Storage, dwarf::DW_TAG_subrange_type, Ops) {}
303 bool ShouldCreate =
true);
307 bool ShouldCreate =
true);
312 bool ShouldCreate =
true);
314 TempDISubrange cloneImpl()
const {
316 getRawUpperBound(), getRawStride());
331 TempDISubrange
clone()
const {
return cloneImpl(); }
343 typedef PointerUnion<ConstantInt *, DIVariable *, DIExpression *> BoundType;
365 dwarf::DW_TAG_generic_subrange, Ops) {}
372 bool ShouldCreate =
true);
374 TempDIGenericSubrange cloneImpl()
const {
383 (CountNode, LowerBound, UpperBound, Stride))
385 TempDIGenericSubrange
clone()
const {
return cloneImpl(); }
415 :
DINode(
C, DIEnumeratorKind,
Storage, dwarf::DW_TAG_enumerator, Ops),
423 ~DIEnumerator() =
default;
435 TempDIEnumerator cloneImpl()
const {
453 TempDIEnumerator
clone()
const {
return cloneImpl(); }
496 return isa<DIFile>(
this) ?
const_cast<DIScope *
>(
this)
504 case DIBasicTypeKind:
505 case DIStringTypeKind:
506 case DIDerivedTypeKind:
507 case DICompositeTypeKind:
508 case DISubroutineTypeKind:
510 case DICompileUnitKind:
511 case DISubprogramKind:
512 case DILexicalBlockKind:
513 case DILexicalBlockFileKind:
514 case DINamespaceKind:
515 case DICommonBlockKind:
547 template <
typename T>
571 Checksum(
CS), Source(Src) {}
574 static DIFile *getImpl(LLVMContext &Context, StringRef
Filename,
577 Optional<StringRef> Source,
579 Optional<ChecksumInfo<MDString *>> MDChecksum;
587 static DIFile *getImpl(LLVMContext &Context, MDString *
Filename,
591 bool ShouldCreate =
true);
593 TempDIFile cloneImpl()
const {
601 Optional<StringRef> Source =
None),
608 TempDIFile
clone()
const {
return cloneImpl(); }
612 Optional<ChecksumInfo<StringRef>> getChecksum()
const {
613 Optional<ChecksumInfo<StringRef>> StringRefChecksum;
615 StringRefChecksum.emplace(Checksum->Kind, Checksum->Value->getString());
616 return StringRefChecksum;
619 return Source ? Optional<StringRef>((*Source)->getString()) :
None;
622 MDString *getRawFilename()
const {
return getOperandAs<MDString>(0); }
623 MDString *getRawDirectory()
const {
return getOperandAs<MDString>(1); }
624 Optional<ChecksumInfo<MDString *>> getRawChecksum()
const {
return Checksum; }
625 Optional<MDString *> getRawSource()
const {
return Source; }
627 static StringRef getChecksumKindAsString(
ChecksumKind CSKind);
637 return F->getFilename();
643 return F->getDirectory();
649 return F->getSource();
662 uint64_t OffsetInBits;
667 unsigned Line, uint64_t SizeInBits,
uint32_t AlignInBits,
670 init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags);
675 uint64_t OffsetInBits,
DIFlags Flags) {
678 this->SizeInBits = SizeInBits;
679 this->AlignInBits = AlignInBits;
680 this->OffsetInBits = OffsetInBits;
684 void mutate(
unsigned Tag,
unsigned Line, uint64_t SizeInBits,
688 init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags);
712 auto NewTy =
clone();
713 NewTy->Flags = NewFlags;
732 return getFlags() & FlagObjcClassComplete;
741 return getFlags() & FlagTypePassByReference;
751 case DIBasicTypeKind:
752 case DIStringTypeKind:
753 case DIDerivedTypeKind:
754 case DICompositeTypeKind:
755 case DISubroutineTypeKind:
776 Encoding(Encoding) {}
783 bool ShouldCreate =
true) {
792 bool ShouldCreate =
true);
794 TempDIBasicType cloneImpl()
const {
801 (
Tag,
Name, 0, 0, 0, FlagZero))
817 TempDIBasicType
clone()
const {
return cloneImpl(); }
844 Encoding(Encoding) {}
862 TempDIStringType cloneImpl()
const {
886 TempDIStringType
clone()
const {
return cloneImpl(); }
927 DWARFAddressSpace(DWARFAddressSpace) {}
938 DWARFAddressSpace,
Flags, ExtraData,
Storage, ShouldCreate);
945 Optional<unsigned> DWARFAddressSpace,
949 TempDIDerivedType cloneImpl()
const {
953 getDWARFAddressSpace(),
getFlags(), getExtraData());
977 TempDIDerivedType
clone()
const {
return cloneImpl(); }
985 Optional<unsigned> getDWARFAddressSpace()
const {
return DWARFAddressSpace; }
995 Metadata *getExtraData()
const {
return getRawExtraData(); }
1000 DIType *getClassType()
const {
1002 return cast_or_null<DIType>(getExtraData());
1005 DIObjCProperty *getObjCProperty()
const {
1006 return dyn_cast_or_null<DIObjCProperty>(getExtraData());
1011 if (
auto *CM = cast_or_null<ConstantAsMetadata>(getExtraData()))
1012 if (
auto *CI = dyn_cast_or_null<ConstantInt>(CM->getValue()))
1013 return static_cast<uint32_t>(CI->getZExtValue());
1017 Constant *getStorageOffsetInBits()
const {
1019 if (
auto *
C = cast_or_null<ConstantAsMetadata>(getExtraData()))
1020 return C->getValue();
1026 if (
auto *
C = cast_or_null<ConstantAsMetadata>(getExtraData()))
1027 return C->getValue();
1030 Constant *getDiscriminantValue()
const {
1032 if (
auto *
C = cast_or_null<ConstantAsMetadata>(getExtraData()))
1033 return C->getValue();
1039 return MD->getMetadataID() == DIDerivedTypeKind;
1051 unsigned RuntimeLang;
1059 RuntimeLang(RuntimeLang) {}
1063 void mutate(
unsigned Tag,
unsigned Line,
unsigned RuntimeLang,
1068 this->RuntimeLang = RuntimeLang;
1072 static DICompositeType *
1088 static DICompositeType *
1098 TempDICompositeType cloneImpl()
const {
1136 TempDICompositeType
clone()
const {
return cloneImpl(); }
1219 if (
auto *MD = dyn_cast_or_null<ConstantAsMetadata>(
getRawRank()))
1220 return dyn_cast_or_null<ConstantInt>(MD->getValue());
1224 return dyn_cast_or_null<DIExpression>(
getRawRank());
1237 "Lost a member during member list replacement");
1269 :
DIType(
C, DISubroutineTypeKind,
Storage, dwarf::DW_TAG_subroutine_type,
1270 0, 0, 0, 0,
Flags, Ops),
1277 bool ShouldCreate =
true) {
1283 bool ShouldCreate =
true);
1285 TempDISubroutineType cloneImpl()
const {
1297 TempDISubroutineType
clone()
const {
return cloneImpl(); }
1339 unsigned SourceLanguage;
1341 unsigned RuntimeVersion;
1342 unsigned EmissionKind;
1344 bool SplitDebugInlining;
1345 bool DebugInfoForProfiling;
1346 unsigned NameTableKind;
1347 bool RangesBaseAddress;
1350 bool IsOptimized,
unsigned RuntimeVersion,
1351 unsigned EmissionKind, uint64_t DWOId,
bool SplitDebugInlining,
1352 bool DebugInfoForProfiling,
unsigned NameTableKind,
1354 :
DIScope(
C, DICompileUnitKind,
Storage, dwarf::DW_TAG_compile_unit, Ops),
1355 SourceLanguage(SourceLanguage), IsOptimized(IsOptimized),
1356 RuntimeVersion(RuntimeVersion), EmissionKind(EmissionKind),
1357 DWOId(DWOId), SplitDebugInlining(SplitDebugInlining),
1358 DebugInfoForProfiling(DebugInfoForProfiling),
1359 NameTableKind(NameTableKind), RangesBaseAddress(RangesBaseAddress) {
1362 ~DICompileUnit() =
default;
1364 static DICompileUnit *
1365 getImpl(LLVMContext &Context,
unsigned SourceLanguage, DIFile *
File,
1368 unsigned EmissionKind, DICompositeTypeArray
EnumTypes,
1372 uint64_t DWOId,
bool SplitDebugInlining,
bool DebugInfoForProfiling,
1373 unsigned NameTableKind,
bool RangesBaseAddress, StringRef
SysRoot,
1381 DebugInfoForProfiling, NameTableKind, RangesBaseAddress,
1385 static DICompileUnit *
1386 getImpl(LLVMContext &Context,
unsigned SourceLanguage,
Metadata *
File,
1392 bool DebugInfoForProfiling,
unsigned NameTableKind,
1393 bool RangesBaseAddress, MDString *
SysRoot, MDString *
SDK,
1396 TempDICompileUnit cloneImpl()
const {
1407 static void get() =
delete;
1412 (
unsigned SourceLanguage, DIFile *
File, StringRef
Producer,
1413 bool IsOptimized, StringRef
Flags,
unsigned RuntimeVersion,
1418 uint64_t DWOId,
bool SplitDebugInlining,
bool DebugInfoForProfiling,
1424 DebugInfoForProfiling, (
unsigned)NameTableKind, RangesBaseAddress,
1433 bool SplitDebugInlining,
bool DebugInfoForProfiling,
1439 DebugInfoForProfiling, NameTableKind, RangesBaseAddress,
SysRoot,
SDK))
1441 TempDICompileUnit
clone()
const {
return cloneImpl(); }
1479 this->SplitDebugInlining = SplitDebugInlining;
1487 return getOperandAs<MDString>(3);
1583 static unsigned getPrefixEncodingFromUnsigned(
unsigned U) {
1585 return U > 0x1f ? (((U & 0xfe0) << 1) | (U & 0x1f) | 0x20) : U;
1589 static unsigned getUnsignedFromPrefixEncoding(
unsigned U) {
1593 return (U & 0x20) ? (((U >> 1) & 0xfe0) | (U & 0x1f)) : (U & 0x1f);
1597 static unsigned getNextComponentInDiscriminator(
unsigned D) {
1599 return D >> ((
D & 0x40) ? 14 : 7);
1604 TempDILocation cloneImpl()
const {
1611 static unsigned encodeComponent(
unsigned C) {
1612 return (
C == 0) ? 1U : (getPrefixEncodingFromUnsigned(
C) << 1);
1615 static unsigned encodingBits(
unsigned C) {
1616 return (
C == 0) ? 1 : (
C > 0x1f ? 14 : 7);
1634 TempDILocation
clone()
const {
return cloneImpl(); }
1638 DILocalScope *getScope()
const {
return cast<DILocalScope>(
getRawScope()); }
1640 DILocation *getInlinedAt()
const {
1653 DIFile *getFile()
const {
return getScope()->
getFile(); }
1654 StringRef
getFilename()
const {
return getScope()->getFilename(); }
1655 StringRef getDirectory()
const {
return getScope()->getDirectory(); }
1656 Optional<StringRef> getSource()
const {
return getScope()->getSource(); }
1662 DILocalScope *getInlinedAtScope()
const {
1663 if (
auto *IA = getInlinedAt())
1664 return IA->getInlinedAtScope();
1702 inline unsigned getDiscriminator()
const;
1713 return ((Discriminator & 0x7) == 0x7) && (Discriminator & 0xFFFFFFF8);
1767 return getUnsignedFromPrefixEncoding(
D);
1788 D = getNextComponentInDiscriminator(
D);
1789 unsigned Ret = getUnsignedFromPrefixEncoding(
D);
1797 return getUnsignedFromPrefixEncoding(getNextComponentInDiscriminator(
1798 getNextComponentInDiscriminator(
D)));
1821 unsigned VirtualIndex;
1831 #define HANDLE_DISP_FLAG(ID, NAME) SPFlag##NAME = ID,
1832 #define DISP_FLAG_LARGEST_NEEDED
1833 #include "llvm/IR/DebugInfoFlags.def"
1853 bool IsMainSubprogram =
false) {
1856 int(SPFlagVirtual) ==
int(dwarf::DW_VIRTUALITY_virtual) &&
1857 int(SPFlagPureVirtual) ==
int(dwarf::DW_VIRTUALITY_pure_virtual),
1858 "Virtuality constant mismatch");
1861 (IsLocalToUnit ? SPFlagLocalToUnit : SPFlagZero) |
1862 (IsDefinition ? SPFlagDefinition : SPFlagZero) |
1863 (IsOptimized ? SPFlagOptimized : SPFlagZero) |
1864 (IsMainSubprogram ? SPFlagMainSubprogram : SPFlagZero));
1872 unsigned ScopeLine,
unsigned VirtualIndex,
int ThisAdjustment,
1876 Line(Line), ScopeLine(ScopeLine), VirtualIndex(VirtualIndex),
1877 ThisAdjustment(ThisAdjustment), Flags(Flags), SPFlags(SPFlags) {
1880 ~DISubprogram() =
default;
1882 static DISubprogram *
1886 unsigned VirtualIndex,
int ThisAdjustment,
DIFlags Flags,
1902 unsigned VirtualIndex,
int ThisAdjustment,
1908 TempDISubprogram cloneImpl()
const {
1911 getContainingType(), getVirtualIndex(),
1912 getThisAdjustment(),
getFlags(), getSPFlags(),
1914 getRetainedNodes(), getThrownTypes());
1921 unsigned Line, DISubroutineType *
Type,
unsigned ScopeLine,
1922 DIType *
ContainingType,
unsigned VirtualIndex,
int ThisAdjustment,
1943 TempDISubprogram
clone()
const {
return cloneImpl(); }
1946 TempDISubprogram cloneWithFlags(
DIFlags NewFlags)
const {
1947 auto NewSP =
clone();
1948 NewSP->Flags = NewFlags;
1953 unsigned getLine()
const {
return Line; }
1955 unsigned getVirtualIndex()
const {
return VirtualIndex; }
1956 int getThisAdjustment()
const {
return ThisAdjustment; }
1957 unsigned getScopeLine()
const {
return ScopeLine; }
1960 DISPFlags getSPFlags()
const {
return SPFlags; }
1961 bool isLocalToUnit()
const {
return getSPFlags() & SPFlagLocalToUnit; }
1962 bool isDefinition()
const {
return getSPFlags() & SPFlagDefinition; }
1963 bool isOptimized()
const {
return getSPFlags() & SPFlagOptimized; }
1964 bool isMainSubprogram()
const {
return getSPFlags() & SPFlagMainSubprogram; }
1966 bool isArtificial()
const {
return getFlags() & FlagArtificial; }
1967 bool isPrivate()
const {
1970 bool isProtected()
const {
1973 bool isPublic()
const {
1976 bool isExplicit()
const {
return getFlags() & FlagExplicit; }
1977 bool isPrototyped()
const {
return getFlags() & FlagPrototyped; }
1978 bool areAllCallsDescribed()
const {
1979 return getFlags() & FlagAllCallsDescribed;
1981 bool isPure()
const {
return getSPFlags() & SPFlagPure; }
1982 bool isElemental()
const {
return getSPFlags() & SPFlagElemental; }
1983 bool isRecursive()
const {
return getSPFlags() & SPFlagRecursive; }
1984 bool isObjCDirect()
const {
return getSPFlags() & SPFlagObjCDirect; }
1990 bool isDeleted()
const {
return getSPFlags() & SPFlagDeleted; }
1996 bool isLValueReference()
const {
return getFlags() & FlagLValueReference; }
2002 bool isRValueReference()
const {
return getFlags() & FlagRValueReference; }
2007 bool isNoReturn()
const {
return getFlags() & FlagNoReturn; }
2012 bool isThunk()
const {
return getFlags() & FlagThunk; }
2014 DIScope *
getScope()
const {
return cast_or_null<DIScope>(getRawScope()); }
2021 DISubroutineType *
getType()
const {
2022 return cast_or_null<DISubroutineType>(getRawType());
2024 DIType *getContainingType()
const {
2025 return cast_or_null<DIType>(getRawContainingType());
2028 DICompileUnit *getUnit()
const {
2029 return cast_or_null<DICompileUnit>(getRawUnit());
2032 DITemplateParameterArray getTemplateParams()
const {
2033 return cast_or_null<MDTuple>(getRawTemplateParams());
2036 return cast_or_null<DISubprogram>(getRawDeclaration());
2038 DINodeArray getRetainedNodes()
const {
2039 return cast_or_null<MDTuple>(getRawRetainedNodes());
2041 DITypeArray getThrownTypes()
const {
2042 return cast_or_null<MDTuple>(getRawThrownTypes());
2046 MDString *getRawName()
const {
return getOperandAs<MDString>(2); }
2047 MDString *getRawLinkageName()
const {
return getOperandAs<MDString>(3); }
2052 Metadata *getRawContainingType()
const {
2053 return getNumOperands() > 8 ? getOperandAs<Metadata>(8) : nullptr;
2055 Metadata *getRawTemplateParams()
const {
2056 return getNumOperands() > 9 ? getOperandAs<Metadata>(9) : nullptr;
2058 Metadata *getRawThrownTypes()
const {
2059 return getNumOperands() > 10 ? getOperandAs<Metadata>(10) : nullptr;
2062 void replaceRawLinkageName(MDString *
LinkageName) {
2069 bool describes(
const Function *
F)
const;
2105 assert(Column < (1u << 16) &&
"Expected 16-bit column");
2110 DIFile *
File,
unsigned Line,
unsigned Column,
2112 bool ShouldCreate =
true) {
2122 TempDILexicalBlock cloneImpl()
const {
2129 unsigned Line,
unsigned Column),
2132 unsigned Line,
unsigned Column),
2135 TempDILexicalBlock
clone()
const {
return cloneImpl(); }
2149 unsigned Discriminator;
2154 Discriminator(Discriminator) {}
2160 bool ShouldCreate =
true) {
2169 bool ShouldCreate =
true);
2171 TempDILexicalBlockFile cloneImpl()
const {
2178 unsigned Discriminator),
2184 TempDILexicalBlockFile
clone()
const {
return cloneImpl(); }
2192 unsigned DILocation::getDiscriminator()
const {
2193 if (
auto *
F = dyn_cast<DILexicalBlockFile>(getScope()))
2194 return F->getDiscriminator();
2205 for (
auto *LBF = dyn_cast<DILexicalBlockFile>(
Scope);
2206 LBF && LBF->getDiscriminator() != 0;
2207 LBF = dyn_cast<DILexicalBlockFile>(
Scope))
2228 unsigned BD,
DF, CI;
2253 unsigned ExportSymbols : 1;
2259 ExportSymbols(ExportSymbols) {}
2266 ExportSymbols,
Storage, ShouldCreate);
2269 MDString *
Name,
bool ExportSymbols,
2272 TempDINamespace cloneImpl()
const {
2285 TempDINamespace
clone()
const {
return cloneImpl(); }
2310 LineNo(LineNo), IsDecl(IsDecl) {}
2317 bool ShouldCreate =
true) {
2330 TempDIModule cloneImpl()
const {
2332 getConfigurationMacros(), getIncludePath(),
2333 getAPINotesFile(), getLineNo(), getIsDecl());
2341 bool IsDecl =
false),
2348 bool IsDecl =
false),
2352 TempDIModule
clone()
const {
return cloneImpl(); }
2354 DIScope *
getScope()
const {
return cast_or_null<DIScope>(getRawScope()); }
2359 unsigned getLineNo()
const {
return LineNo; }
2360 bool getIsDecl()
const {
return IsDecl; }
2363 MDString *getRawName()
const {
return getOperandAs<MDString>(2); }
2364 MDString *getRawConfigurationMacros()
const {
2365 return getOperandAs<MDString>(3);
2367 MDString *getRawIncludePath()
const {
return getOperandAs<MDString>(4); }
2368 MDString *getRawAPINotesFile()
const {
return getOperandAs<MDString>(5); }
2371 return MD->getMetadataID() == DIModuleKind;
2394 return MD->
getMetadataID() == DITemplateTypeParameterKind ||
2406 dwarf::DW_TAG_template_type_parameter,
IsDefault,
2413 bool ShouldCreate =
true) {
2420 bool ShouldCreate =
true);
2422 TempDITemplateTypeParameter cloneImpl()
const {
2434 TempDITemplateTypeParameter
clone()
const {
return cloneImpl(); }
2456 bool ShouldCreate =
true) {
2464 bool ShouldCreate =
true);
2466 TempDITemplateValueParameter cloneImpl()
const {
2481 TempDITemplateValueParameter
clone()
const {
return cloneImpl(); }
2499 AlignInBits(AlignInBits) {}
2516 if (
auto *
BT = dyn_cast<DIBasicType>(
getType()))
2517 return BT->getSignedness();
2523 return F->getFilename();
2529 return F->getDirectory();
2535 return F->getSource();
2563 std::vector<uint64_t> Elements;
2567 Elements(Elements.
begin(), Elements.
end()) {}
2572 bool ShouldCreate =
true);
2574 TempDIExpression cloneImpl()
const {
2581 TempDIExpression
clone()
const {
return cloneImpl(); }
2588 assert(
I < Elements.
size() &&
"Index out of range");
2607 const uint64_t *Op =
nullptr;
2613 const uint64_t *
get()
const {
return Op; }
2621 uint64_t
getArg(
unsigned I)
const {
return Op[
I + 1]; }
2748 unsigned &AddrClass);
2813 unsigned SizeInBits);
2819 uint64_t l1 = A.OffsetInBits;
2820 uint64_t l2 =
B.OffsetInBits;
2821 uint64_t
r1 = l1 + A.SizeInBits;
2822 uint64_t
r2 = l2 +
B.SizeInBits;
2839 unsigned ToSize,
bool Signed);
2850 auto Fragment2 = *
Other->getFragmentInfo();
2871 return std::tie(A.SizeInBits, A.OffsetInBits) ==
2872 std::tie(
B.SizeInBits,
B.OffsetInBits);
2877 return std::tie(A.SizeInBits, A.OffsetInBits) <
2878 std::tie(
B.SizeInBits,
B.OffsetInBits);
2910 IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition) {}
2916 bool IsLocalToUnit,
bool IsDefinition,
2925 static DIGlobalVariable *
2928 bool IsLocalToUnit,
bool IsDefinition,
2932 TempDIGlobalVariable cloneImpl()
const {
2943 bool IsLocalToUnit,
bool IsDefinition,
2952 bool IsLocalToUnit,
bool IsDefinition,
2959 TempDIGlobalVariable
clone()
const {
return cloneImpl(); }
2988 Ops), LineNo(LineNo) {}
2994 bool ShouldCreate =
true) {
3003 TempDICommonBlock cloneImpl()
const {
3011 DIFile *
File,
unsigned LineNo),
3018 TempDICommonBlock
clone()
const {
return cloneImpl(); }
3022 return cast_or_null<DIGlobalVariable>(
getRawDecl());
3053 assert(
Arg < (1 << 16) &&
"DILocalVariable: Arg out of range");
3061 bool ShouldCreate =
true) {
3069 bool ShouldCreate =
true);
3071 TempDILocalVariable cloneImpl()
const {
3089 TempDILocalVariable
clone()
const {
return cloneImpl(); }
3129 :
DINode(
C, DILabelKind,
Storage, dwarf::DW_TAG_label, Ops), Line(Line) {}
3135 bool ShouldCreate =
true) {
3142 bool ShouldCreate =
true);
3144 TempDILabel cloneImpl()
const {
3159 TempDILabel
clone()
const {
return cloneImpl(); }
3194 unsigned Attributes;
3198 :
DINode(
C, DIObjCPropertyKind,
Storage, dwarf::DW_TAG_APPLE_property,
3200 Line(Line), Attributes(Attributes) {}
3218 TempDIObjCProperty cloneImpl()
const {
3226 (StringRef
Name, DIFile *
File,
unsigned Line,
3228 unsigned Attributes, DIType *
Type),
3238 TempDIObjCProperty
clone()
const {
return cloneImpl(); }
3250 return F->getFilename();
3256 return F->getDirectory();
3287 bool ShouldCreate =
true) {
3295 bool ShouldCreate =
true);
3297 TempDIImportedEntity cloneImpl()
const {
3305 unsigned Line, StringRef
Name =
""),
3312 TempDIImportedEntity
clone()
const {
return cloneImpl(); }
3344 TempDIGlobalVariableExpression cloneImpl()
const {
3353 TempDIGlobalVariableExpression
clone()
const {
return cloneImpl(); }
3368 return MD->
getMetadataID() == DIGlobalVariableExpressionKind;
3386 assert(MIType < 1u << 16);
3396 if (
auto *
S = getOperandAs<MDString>(
I))
3397 return S->getString();
3415 case DIMacroFileKind:
3434 bool ShouldCreate =
true) {
3440 bool ShouldCreate =
true);
3442 TempDIMacro cloneImpl()
const {
3449 StringRef
Value =
""),
3455 TempDIMacro
clone()
const {
return cloneImpl(); }
3484 bool ShouldCreate =
true) {
3493 TempDIMacroFile cloneImpl()
const {
3506 TempDIMacroFile
clone()
const {
return cloneImpl(); }
3512 "Lost a macro node during macro node list replacement");
3550 ArrayRef<ValueAsMetadata *>
Args,
3553 TempDIArgList cloneImpl()
const {
3559 void dropAllReferences();
3564 TempDIArgList
clone()
const {
return cloneImpl(); }
3603 : Variable(Var), Fragment(
FragmentInfo), InlinedAt(InlinedAt) {}
3608 Fragment(DIExpr ? DIExpr->getFragmentInfo() :
NoneType()),
3609 InlinedAt(InlinedAt) {}
3620 return F == DefaultFragment;
3624 return std::tie(Variable, Fragment, InlinedAt) ==
3629 return std::tie(Variable, Fragment, InlinedAt) <
3663 #undef DEFINE_MDNODE_GET_UNPACK_IMPL
3664 #undef DEFINE_MDNODE_GET_UNPACK
3665 #undef DEFINE_MDNODE_GET
3667 #endif // LLVM_IR_DEBUGINFOMETADATA_H