13#ifndef LLVM_IR_DEBUGINFOMETADATA_H
14#define LLVM_IR_DEBUGINFOMETADATA_H
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)
67class DbgVariableIntrinsic;
79 explicit operator bool()
const {
return get(); }
87 unsigned size()
const {
return N ?
N->getNumOperands() : 0u; }
89 return cast_or_null<DIType>(
N->getOperand(
I));
152 if (
auto *S = getOperandAs<MDString>(
I))
153 return S->getString();
174#define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = ID,
175#define DI_FLAG_LARGEST_NEEDED
176#include "llvm/IR/DebugInfoFlags.def"
179 FlagVirtualInheritance,
197 case GenericDINodeKind:
199 case DIEnumeratorKind:
200 case DIBasicTypeKind:
201 case DIStringTypeKind:
202 case DIDerivedTypeKind:
203 case DICompositeTypeKind:
204 case DISubroutineTypeKind:
206 case DICompileUnitKind:
207 case DISubprogramKind:
208 case DILexicalBlockKind:
209 case DILexicalBlockFileKind:
210 case DINamespaceKind:
211 case DICommonBlockKind:
212 case DITemplateTypeParameterKind:
213 case DITemplateValueParameterKind:
214 case DIGlobalVariableKind:
215 case DILocalVariableKind:
217 case DIObjCPropertyKind:
218 case DIImportedEntityKind:
220 case DIGenericSubrangeKind:
248 void recalculateHash();
250 static GenericDINode *getImpl(LLVMContext &Context,
unsigned Tag,
257 static GenericDINode *getImpl(LLVMContext &Context,
unsigned Tag,
261 TempGenericDINode cloneImpl()
const {
279 TempGenericDINode
clone()
const {
return cloneImpl(); }
318 bool ShouldCreate =
true);
353 bool ShouldCreate =
true);
357 bool ShouldCreate =
true);
362 bool ShouldCreate =
true);
364 TempDISubrange cloneImpl()
const {
366 getRawUpperBound(), getRawStride());
381 TempDISubrange
clone()
const {
return cloneImpl(); }
391 typedef PointerUnion<ConstantInt *, DIVariable *, DIExpression *> BoundType;
418 bool ShouldCreate =
true);
420 TempDIGenericSubrange cloneImpl()
const {
429 (CountNode, LowerBound, UpperBound, Stride))
431 TempDIGenericSubrange
clone()
const {
return cloneImpl(); }
473 static DIEnumerator *getImpl(LLVMContext &Context,
const APInt &Value,
477 TempDIEnumerator cloneImpl()
const {
495 TempDIEnumerator
clone()
const {
return cloneImpl(); }
526 inline std::optional<StringRef>
getSource()
const;
538 return isa<DIFile>(
this) ?
const_cast<DIScope *
>(
this)
546 case DIBasicTypeKind:
547 case DIStringTypeKind:
548 case DIDerivedTypeKind:
549 case DICompositeTypeKind:
550 case DISubroutineTypeKind:
552 case DICompileUnitKind:
553 case DISubprogramKind:
554 case DILexicalBlockKind:
555 case DILexicalBlockFileKind:
556 case DINamespaceKind:
557 case DICommonBlockKind:
605 std::optional<ChecksumInfo<MDString *>> Checksum;
610 std::optional<ChecksumInfo<MDString *>>
CS,
MDString *Src,
616 std::optional<ChecksumInfo<StringRef>>
CS,
618 bool ShouldCreate =
true) {
619 std::optional<ChecksumInfo<MDString *>> MDChecksum;
627 static DIFile *getImpl(LLVMContext &Context, MDString *
Filename,
629 std::optional<ChecksumInfo<MDString *>>
CS,
631 bool ShouldCreate =
true);
633 TempDIFile cloneImpl()
const {
642 std::optional<StringRef> Source = std::nullopt),
650 TempDIFile
clone()
const {
return cloneImpl(); }
654 std::optional<ChecksumInfo<StringRef>> getChecksum()
const {
655 std::optional<ChecksumInfo<StringRef>> StringRefChecksum;
657 StringRefChecksum.emplace(Checksum->Kind, Checksum->Value->getString());
658 return StringRefChecksum;
660 std::optional<StringRef>
getSource()
const {
661 return Source ? std::optional<StringRef>(
Source->getString())
665 MDString *getRawFilename()
const {
return getOperandAs<MDString>(0); }
666 MDString *getRawDirectory()
const {
return getOperandAs<MDString>(1); }
667 std::optional<ChecksumInfo<MDString *>> getRawChecksum()
const {
670 MDString *getRawSource()
const {
return Source; }
672 static StringRef getChecksumKindAsString(
ChecksumKind CSKind);
673 static std::optional<ChecksumKind>
getChecksumKind(StringRef CSKindStr);
682 return F->getFilename();
688 return F->getDirectory();
694 return F->getSource();
716 init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags);
724 this->SizeInBits = SizeInBits;
726 this->OffsetInBits = OffsetInBits;
734 init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags);
757 auto NewTy =
clone();
758 NewTy->Flags = NewFlags;
777 return getFlags() & FlagObjcClassComplete;
786 return getFlags() & FlagTypePassByReference;
796 case DIBasicTypeKind:
797 case DIStringTypeKind:
798 case DIDerivedTypeKind:
799 case DICompositeTypeKind:
800 case DISubroutineTypeKind:
821 Encoding(Encoding) {}
828 bool ShouldCreate =
true) {
833 static DIBasicType *getImpl(LLVMContext &Context,
unsigned Tag,
837 bool ShouldCreate =
true);
839 TempDIBasicType cloneImpl()
const {
846 (
Tag,
Name, 0, 0, 0, FlagZero))
862 TempDIBasicType
clone()
const {
return cloneImpl(); }
889 Encoding(Encoding) {}
897 bool ShouldCreate =
true) {
902 static DIStringType *getImpl(LLVMContext &Context,
unsigned Tag,
907 bool ShouldCreate =
true);
909 TempDIStringType cloneImpl()
const {
937 TempDIStringType
clone()
const {
return cloneImpl(); }
976 std::optional<unsigned> DWARFAddressSpace;
981 std::optional<unsigned> DWARFAddressSpace,
DIFlags Flags,
985 DWARFAddressSpace(DWARFAddressSpace) {}
991 std::optional<unsigned> DWARFAddressSpace,
DIFlags Flags,
993 bool ShouldCreate =
true) {
999 static DIDerivedType *
1003 std::optional<unsigned> DWARFAddressSpace,
DIFlags Flags,
1005 bool ShouldCreate =
true);
1007 TempDIDerivedType cloneImpl()
const {
1011 getDWARFAddressSpace(),
getFlags(), getExtraData(), getAnnotations());
1020 std::optional<unsigned> DWARFAddressSpace,
DIFlags Flags,
1035 TempDIDerivedType
clone()
const {
return cloneImpl(); }
1043 std::optional<unsigned> getDWARFAddressSpace()
const {
1044 return DWARFAddressSpace;
1055 Metadata *getExtraData()
const {
return getRawExtraData(); }
1059 DINodeArray getAnnotations()
const {
1060 return cast_or_null<MDTuple>(getRawAnnotations());
1066 DIType *getClassType()
const;
1069 return dyn_cast_or_null<DIObjCProperty>(getExtraData());
1094 unsigned RuntimeLang;
1102 RuntimeLang(RuntimeLang) {}
1106 void mutate(
unsigned Tag,
unsigned Line,
unsigned RuntimeLang,
1111 this->RuntimeLang = RuntimeLang;
1115 static DICompositeType *
1124 bool ShouldCreate =
true) {
1132 static DICompositeType *
1142 TempDICompositeType cloneImpl()
const {
1183 TempDICompositeType
clone()
const {
return cloneImpl(); }
1243 return getOperandAs<DIDerivedType>(8);
1268 if (
auto *MD = dyn_cast_or_null<ConstantAsMetadata>(
getRawRank()))
1269 return dyn_cast_or_null<ConstantInt>(MD->getValue());
1273 return dyn_cast_or_null<DIExpression>(
getRawRank());
1291 "Lost a member during member list replacement");
1328 bool ShouldCreate =
true) {
1334 bool ShouldCreate =
true);
1336 TempDISubroutineType cloneImpl()
const {
1348 TempDISubroutineType
clone()
const {
return cloneImpl(); }
1351 auto NewTy =
clone();
1398 unsigned RuntimeVersion;
1400 unsigned EmissionKind;
1401 unsigned NameTableKind;
1403 bool SplitDebugInlining;
1404 bool DebugInfoForProfiling;
1405 bool RangesBaseAddress;
1408 bool IsOptimized,
unsigned RuntimeVersion,
1409 unsigned EmissionKind,
uint64_t DWOId,
bool SplitDebugInlining,
1410 bool DebugInfoForProfiling,
unsigned NameTableKind,
1418 unsigned EmissionKind, DICompositeTypeArray
EnumTypes,
1422 uint64_t DWOId,
bool SplitDebugInlining,
bool DebugInfoForProfiling,
1431 DebugInfoForProfiling, NameTableKind, RangesBaseAddress,
1435 static DICompileUnit *
1436 getImpl(LLVMContext &Context,
unsigned SourceLanguage,
Metadata *
File,
1442 bool DebugInfoForProfiling,
unsigned NameTableKind,
1443 bool RangesBaseAddress, MDString *
SysRoot, MDString *
SDK,
1446 TempDICompileUnit cloneImpl()
const {
1468 uint64_t DWOId,
bool SplitDebugInlining,
bool DebugInfoForProfiling,
1474 DebugInfoForProfiling, (
unsigned)NameTableKind, RangesBaseAddress,
1483 bool SplitDebugInlining,
bool DebugInfoForProfiling,
1489 DebugInfoForProfiling, NameTableKind, RangesBaseAddress,
SysRoot,
SDK))
1491 TempDICompileUnit
clone()
const {
return cloneImpl(); }
1529 this->SplitDebugInlining = SplitDebugInlining;
1537 return getOperandAs<MDString>(3);
1617 unsigned VirtualIndex;
1627#define HANDLE_DISP_FLAG(ID, NAME) SPFlag##NAME = ID,
1628#define DISP_FLAG_LARGEST_NEEDED
1629#include "llvm/IR/DebugInfoFlags.def"
1649 bool IsMainSubprogram =
false);
1656 unsigned ScopeLine,
unsigned VirtualIndex,
int ThisAdjustment,
1664 unsigned VirtualIndex,
int ThisAdjustment,
DIFlags Flags,
1678 static DISubprogram *
1686 bool ShouldCreate =
true);
1688 TempDISubprogram cloneImpl()
const {
1691 getContainingType(), getVirtualIndex(),
1692 getThisAdjustment(),
getFlags(), getSPFlags(),
1693 getUnit(), getTemplateParams(), getDeclaration(),
1694 getRetainedNodes(), getThrownTypes(), getAnnotations(),
1695 getTargetFuncName());
1726 TempDISubprogram
clone()
const {
return cloneImpl(); }
1729 TempDISubprogram cloneWithFlags(
DIFlags NewFlags)
const {
1730 auto NewSP =
clone();
1731 NewSP->Flags = NewFlags;
1736 unsigned getLine()
const {
return Line; }
1738 unsigned getVirtualIndex()
const {
return VirtualIndex; }
1739 int getThisAdjustment()
const {
return ThisAdjustment; }
1740 unsigned getScopeLine()
const {
return ScopeLine; }
1741 void setScopeLine(
unsigned L) {
1746 DISPFlags getSPFlags()
const {
return SPFlags; }
1747 bool isLocalToUnit()
const {
return getSPFlags() & SPFlagLocalToUnit; }
1748 bool isDefinition()
const {
return getSPFlags() & SPFlagDefinition; }
1749 bool isOptimized()
const {
return getSPFlags() & SPFlagOptimized; }
1750 bool isMainSubprogram()
const {
return getSPFlags() & SPFlagMainSubprogram; }
1752 bool isArtificial()
const {
return getFlags() & FlagArtificial; }
1753 bool isPrivate()
const {
1756 bool isProtected()
const {
1759 bool isPublic()
const {
1762 bool isExplicit()
const {
return getFlags() & FlagExplicit; }
1763 bool isPrototyped()
const {
return getFlags() & FlagPrototyped; }
1764 bool areAllCallsDescribed()
const {
1765 return getFlags() & FlagAllCallsDescribed;
1767 bool isPure()
const {
return getSPFlags() & SPFlagPure; }
1768 bool isElemental()
const {
return getSPFlags() & SPFlagElemental; }
1769 bool isRecursive()
const {
return getSPFlags() & SPFlagRecursive; }
1770 bool isObjCDirect()
const {
return getSPFlags() & SPFlagObjCDirect; }
1776 bool isDeleted()
const {
return getSPFlags() & SPFlagDeleted; }
1782 bool isLValueReference()
const {
return getFlags() & FlagLValueReference; }
1788 bool isRValueReference()
const {
return getFlags() & FlagRValueReference; }
1793 bool isNoReturn()
const {
return getFlags() & FlagNoReturn; }
1798 bool isThunk()
const {
return getFlags() & FlagThunk; }
1800 DIScope *
getScope()
const {
return cast_or_null<DIScope>(getRawScope()); }
1807 DISubroutineType *
getType()
const {
1808 return cast_or_null<DISubroutineType>(getRawType());
1810 DIType *getContainingType()
const {
1811 return cast_or_null<DIType>(getRawContainingType());
1813 void replaceType(DISubroutineType *Ty) {
1818 DICompileUnit *getUnit()
const {
1819 return cast_or_null<DICompileUnit>(getRawUnit());
1822 DITemplateParameterArray getTemplateParams()
const {
1823 return cast_or_null<MDTuple>(getRawTemplateParams());
1826 return cast_or_null<DISubprogram>(getRawDeclaration());
1829 DINodeArray getRetainedNodes()
const {
1830 return cast_or_null<MDTuple>(getRawRetainedNodes());
1832 DITypeArray getThrownTypes()
const {
1833 return cast_or_null<MDTuple>(getRawThrownTypes());
1835 DINodeArray getAnnotations()
const {
1836 return cast_or_null<MDTuple>(getRawAnnotations());
1838 StringRef getTargetFuncName()
const {
1843 MDString *getRawName()
const {
return getOperandAs<MDString>(2); }
1844 MDString *getRawLinkageName()
const {
return getOperandAs<MDString>(3); }
1849 Metadata *getRawContainingType()
const {
1850 return getNumOperands() > 8 ? getOperandAs<Metadata>(8) : nullptr;
1852 Metadata *getRawTemplateParams()
const {
1853 return getNumOperands() > 9 ? getOperandAs<Metadata>(9) : nullptr;
1855 Metadata *getRawThrownTypes()
const {
1856 return getNumOperands() > 10 ? getOperandAs<Metadata>(10) : nullptr;
1858 Metadata *getRawAnnotations()
const {
1859 return getNumOperands() > 11 ? getOperandAs<Metadata>(11) : nullptr;
1861 MDString *getRawTargetFuncName()
const {
1862 return getNumOperands() > 12 ? getOperandAs<MDString>(12) : nullptr;
1865 void replaceRawLinkageName(MDString *
LinkageName) {
1868 void replaceRetainedNodes(DINodeArray
N) {
1875 bool describes(
const Function *
F)
const;
1910 TempDILocation cloneImpl()
const {
1932 TempDILocation
clone()
const {
return cloneImpl(); }
1940 StringRef getSubprogramLinkageName()
const {
1941 DISubprogram *SP =
getScope()->getSubprogram();
1944 auto Name = SP->getLinkageName();
1947 return SP->getName();
1950 DILocation *getInlinedAt()
const {
1963 DIFile *getFile()
const {
return getScope()->getFile(); }
1965 StringRef getDirectory()
const {
return getScope()->getDirectory(); }
1966 std::optional<StringRef> getSource()
const {
return getScope()->getSource(); }
1972 DILocalScope *getInlinedAtScope()
const {
1973 if (
auto *IA = getInlinedAt())
1974 return IA->getInlinedAtScope();
2012 inline unsigned getDiscriminator()
const;
2023 return ((Discriminator & 0x7) == 0x7) && (Discriminator & 0xFFFFFFF8);
2033 inline std::optional<const DILocation *>
2050 inline std::optional<const DILocation *>
2088 bool IsFSDiscriminator =
false) {
2097 if (IsFSDiscriminator)
2188 assert(Column < (1u << 16) &&
"Expected 16-bit column");
2195 bool ShouldCreate =
true) {
2201 static DILexicalBlock *getImpl(LLVMContext &Context,
Metadata *
Scope,
2205 TempDILexicalBlock cloneImpl()
const {
2220 TempDILexicalBlock
clone()
const {
return cloneImpl(); }
2244 bool ShouldCreate =
true) {
2250 static DILexicalBlockFile *getImpl(LLVMContext &Context,
Metadata *
Scope,
2253 bool ShouldCreate =
true);
2255 TempDILexicalBlockFile cloneImpl()
const {
2269 TempDILexicalBlockFile
clone()
const {
return cloneImpl(); }
2277unsigned DILocation::getDiscriminator()
const {
2278 if (
auto *
F = dyn_cast<DILexicalBlockFile>(
getScope()))
2279 return F->getDiscriminator();
2290 for (
auto *LBF = dyn_cast<DILexicalBlockFile>(
Scope);
2291 LBF && LBF->getDiscriminator() != 0;
2292 LBF = dyn_cast<DILexicalBlockFile>(
Scope))
2293 Scope = LBF->getScope();
2313std::optional<const DILocation *>
2315 unsigned BD,
DF, CI;
2329 return std::nullopt;
2332std::optional<const DILocation *>
2350 return std::nullopt;
2374 TempDINamespace cloneImpl()
const {
2387 TempDINamespace
clone()
const {
return cloneImpl(); }
2417 bool ShouldCreate =
true) {
2430 TempDIModule cloneImpl()
const {
2432 getConfigurationMacros(), getIncludePath(),
2433 getAPINotesFile(), getLineNo(), getIsDecl());
2441 bool IsDecl =
false),
2448 bool IsDecl =
false),
2452 TempDIModule
clone()
const {
return cloneImpl(); }
2454 DIScope *
getScope()
const {
return cast_or_null<DIScope>(getRawScope()); }
2463 MDString *getRawName()
const {
return getOperandAs<MDString>(2); }
2464 MDString *getRawConfigurationMacros()
const {
2465 return getOperandAs<MDString>(3);
2467 MDString *getRawIncludePath()
const {
return getOperandAs<MDString>(4); }
2468 MDString *getRawAPINotesFile()
const {
return getOperandAs<MDString>(5); }
2471 return MD->getMetadataID() == DIModuleKind;
2496 return MD->
getMetadataID() == DITemplateTypeParameterKind ||
2512 bool ShouldCreate =
true) {
2519 bool ShouldCreate =
true);
2521 TempDITemplateTypeParameter cloneImpl()
const {
2533 TempDITemplateTypeParameter
clone()
const {
return cloneImpl(); }
2555 bool ShouldCreate =
true) {
2559 static DITemplateValueParameter *getImpl(LLVMContext &Context,
unsigned Tag,
2563 bool ShouldCreate =
true);
2565 TempDITemplateValueParameter cloneImpl()
const {
2580 TempDITemplateValueParameter
clone()
const {
return cloneImpl(); }
2614 if (
auto *
BT = dyn_cast<DIBasicType>(
getType()))
2615 return BT->getSignedness();
2616 return std::nullopt;
2621 return F->getFilename();
2627 return F->getDirectory();
2633 return F->getSource();
2634 return std::nullopt;
2661 std::vector<uint64_t> Elements;
2665 Elements(Elements.begin(), Elements.end()) {}
2670 bool ShouldCreate =
true);
2672 TempDIExpression cloneImpl()
const {
2679 TempDIExpression
clone()
const {
return cloneImpl(); }
2686 assert(
I < Elements.size() &&
"Index out of range");
2693 std::optional<SignedOrUnsignedConstant>
isConstant()
const;
2837 uint64_t StartInBits = std::max(
A.OffsetInBits,
B.OffsetInBits);
2838 uint64_t EndInBits = std::min(
A.endInBits(),
B.endInBits());
2839 if (EndInBits <= StartInBits)
2846 static std::optional<FragmentInfo>
getFragmentInfo(expr_op_iterator Start,
2847 expr_op_iterator
End);
2897 static std::optional<const DIExpression *>
2923 bool SecondIndirect);
2940 unsigned &AddrClass);
3004 static std::optional<DIExpression *>
3006 unsigned SizeInBits);
3032 unsigned ToSize,
bool Signed);
3043 auto Fragment2 = *
Other->getFragmentInfo();
3061 std::pair<DIExpression *, const ConstantInt *>
3067 return std::tie(
A.SizeInBits,
A.OffsetInBits) ==
3068 std::tie(
B.SizeInBits,
B.OffsetInBits);
3073 return std::tie(
A.SizeInBits,
A.OffsetInBits) <
3074 std::tie(
B.SizeInBits,
B.OffsetInBits);
3079 static const uint64_t MaxVal = std::numeric_limits<uint64_t>::max();
3106 IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition) {}
3112 bool IsLocalToUnit,
bool IsDefinition,
3115 bool ShouldCreate =
true) {
3122 static DIGlobalVariable *
3125 bool IsLocalToUnit,
bool IsDefinition,
3128 bool ShouldCreate =
true);
3130 TempDIGlobalVariable cloneImpl()
const {
3142 unsigned Line,
DIType *
Type,
bool IsLocalToUnit,
bool IsDefinition,
3156 TempDIGlobalVariable
clone()
const {
return cloneImpl(); }
3200 bool ShouldCreate =
true);
3202 TempDICommonBlock cloneImpl()
const {
3217 TempDICommonBlock
clone()
const {
return cloneImpl(); }
3221 return cast_or_null<DIGlobalVariable>(
getRawDecl());
3251 Arg(Arg), Flags(Flags) {
3252 assert(Arg < (1 << 16) &&
"DILocalVariable: Arg out of range");
3261 bool ShouldCreate =
true) {
3266 static DILocalVariable *getImpl(LLVMContext &Context,
Metadata *
Scope,
3271 bool ShouldCreate =
true);
3273 TempDILocalVariable cloneImpl()
const {
3293 TempDILocalVariable
clone()
const {
return cloneImpl(); }
3341 bool ShouldCreate =
true) {
3347 bool ShouldCreate =
true);
3349 TempDILabel cloneImpl()
const {
3364 TempDILabel
clone()
const {
return cloneImpl(); }
3399 unsigned Attributes;
3420 TempDIObjCProperty cloneImpl()
const {
3440 TempDIObjCProperty
clone()
const {
return cloneImpl(); }
3452 return F->getFilename();
3458 return F->getDirectory();
3491 bool ShouldCreate =
true) {
3496 static DIImportedEntity *
3501 TempDIImportedEntity cloneImpl()
const {
3503 getFile(), getLine(),
getName(), getElements());
3510 DINodeArray Elements =
nullptr),
3518 TempDIImportedEntity
clone()
const {
return cloneImpl(); }
3521 DIScope *
getScope()
const {
return cast_or_null<DIScope>(getRawScope()); }
3522 DINode *getEntity()
const {
return cast_or_null<DINode>(getRawEntity()); }
3524 DIFile *getFile()
const {
return cast_or_null<DIFile>(getRawFile()); }
3525 DINodeArray getElements()
const {
3526 return cast_or_null<MDTuple>(getRawElements());
3531 MDString *getRawName()
const {
return getOperandAs<MDString>(2); }
3536 return MD->getMetadataID() == DIImportedEntityKind;
3554 TempDIGlobalVariableExpression cloneImpl()
const {
3563 TempDIGlobalVariableExpression
clone()
const {
return cloneImpl(); }
3578 return MD->
getMetadataID() == DIGlobalVariableExpressionKind;
3599 assert(MIType < 1u << 16);