13#ifndef LLVM_IR_DEBUGINFOMETADATA_H
14#define LLVM_IR_DEBUGINFOMETADATA_H
37#define DEFINE_MDNODE_GET_UNPACK_IMPL(...) __VA_ARGS__
38#define DEFINE_MDNODE_GET_UNPACK(ARGS) DEFINE_MDNODE_GET_UNPACK_IMPL ARGS
39#define DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS) \
40 static CLASS *getDistinct(LLVMContext &Context, \
41 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
42 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Distinct); \
44 static Temp##CLASS getTemporary(LLVMContext &Context, \
45 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
47 getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Temporary)); \
49#define DEFINE_MDNODE_GET(CLASS, FORMAL, ARGS) \
50 static CLASS *get(LLVMContext &Context, DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
51 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued); \
53 static CLASS *getIfExists(LLVMContext &Context, \
54 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
55 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued, \
58 DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS)
66class DbgVariableIntrinsic;
77 explicit operator bool()
const {
return get(); }
85 unsigned size()
const {
return N ?
N->getNumOperands() : 0u; }
87 return cast_or_null<DIType>(
N->getOperand(
I));
148 if (
auto *S = getOperandAs<MDString>(
I))
149 return S->getString();
170#define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = ID,
171#define DI_FLAG_LARGEST_NEEDED
172#include "llvm/IR/DebugInfoFlags.def"
175 FlagVirtualInheritance,
193 case GenericDINodeKind:
195 case DIEnumeratorKind:
196 case DIBasicTypeKind:
197 case DIStringTypeKind:
198 case DIDerivedTypeKind:
199 case DICompositeTypeKind:
200 case DISubroutineTypeKind:
202 case DICompileUnitKind:
203 case DISubprogramKind:
204 case DILexicalBlockKind:
205 case DILexicalBlockFileKind:
206 case DINamespaceKind:
207 case DICommonBlockKind:
208 case DITemplateTypeParameterKind:
209 case DITemplateValueParameterKind:
210 case DIGlobalVariableKind:
211 case DILocalVariableKind:
213 case DIObjCPropertyKind:
214 case DIImportedEntityKind:
216 case DIGenericSubrangeKind:
242 void recalculateHash();
244 static GenericDINode *
getImpl(LLVMContext &Context,
unsigned Tag,
251 static GenericDINode *
getImpl(LLVMContext &Context,
unsigned Tag,
255 TempGenericDINode cloneImpl()
const {
273 TempGenericDINode
clone()
const {
return cloneImpl(); }
312 bool ShouldCreate =
true);
347 bool ShouldCreate =
true);
351 bool ShouldCreate =
true);
356 bool ShouldCreate =
true);
358 TempDISubrange cloneImpl()
const {
360 getRawUpperBound(), getRawStride());
375 TempDISubrange
clone()
const {
return cloneImpl(); }
385 typedef PointerUnion<ConstantInt *, DIVariable *, DIExpression *> BoundType;
412 bool ShouldCreate =
true);
414 TempDIGenericSubrange cloneImpl()
const {
423 (CountNode, LowerBound, UpperBound, Stride))
425 TempDIGenericSubrange
clone()
const {
return cloneImpl(); }
467 static DIEnumerator *
getImpl(LLVMContext &Context,
const APInt &Value,
471 TempDIEnumerator cloneImpl()
const {
489 TempDIEnumerator
clone()
const {
return cloneImpl(); }
520 inline std::optional<StringRef>
getSource()
const;
532 return isa<DIFile>(
this) ?
const_cast<DIScope *
>(
this)
540 case DIBasicTypeKind:
541 case DIStringTypeKind:
542 case DIDerivedTypeKind:
543 case DICompositeTypeKind:
544 case DISubroutineTypeKind:
546 case DICompileUnitKind:
547 case DISubprogramKind:
548 case DILexicalBlockKind:
549 case DILexicalBlockFileKind:
550 case DINamespaceKind:
551 case DICommonBlockKind:
599 std::optional<ChecksumInfo<MDString *>> Checksum;
604 std::optional<ChecksumInfo<MDString *>>
CS,
MDString *Src,
610 std::optional<ChecksumInfo<StringRef>>
CS,
612 bool ShouldCreate =
true) {
613 std::optional<ChecksumInfo<MDString *>> MDChecksum;
621 static DIFile *getImpl(LLVMContext &Context, MDString *
Filename,
623 std::optional<ChecksumInfo<MDString *>>
CS,
625 bool ShouldCreate =
true);
627 TempDIFile cloneImpl()
const {
636 std::optional<StringRef> Source = std::nullopt),
644 TempDIFile
clone()
const {
return cloneImpl(); }
648 std::optional<ChecksumInfo<StringRef>> getChecksum()
const {
649 std::optional<ChecksumInfo<StringRef>> StringRefChecksum;
651 StringRefChecksum.emplace(Checksum->Kind, Checksum->Value->getString());
652 return StringRefChecksum;
654 std::optional<StringRef>
getSource()
const {
655 return Source ? std::optional<StringRef>(
Source->getString())
659 MDString *getRawFilename()
const {
return getOperandAs<MDString>(0); }
660 MDString *getRawDirectory()
const {
return getOperandAs<MDString>(1); }
661 std::optional<ChecksumInfo<MDString *>> getRawChecksum()
const {
664 MDString *getRawSource()
const {
return Source; }
666 static StringRef getChecksumKindAsString(
ChecksumKind CSKind);
667 static std::optional<ChecksumKind>
getChecksumKind(StringRef CSKindStr);
676 return F->getFilename();
682 return F->getDirectory();
688 return F->getSource();
709 init(Line, SizeInBits, AlignInBits, OffsetInBits,
Flags);
717 this->SizeInBits = SizeInBits;
718 this->AlignInBits = AlignInBits;
719 this->OffsetInBits = OffsetInBits;
727 init(Line, SizeInBits, AlignInBits, OffsetInBits,
Flags);
750 auto NewTy =
clone();
751 NewTy->Flags = NewFlags;
770 return getFlags() & FlagObjcClassComplete;
779 return getFlags() & FlagTypePassByReference;
789 case DIBasicTypeKind:
790 case DIStringTypeKind:
791 case DIDerivedTypeKind:
792 case DICompositeTypeKind:
793 case DISubroutineTypeKind:
814 Encoding(Encoding) {}
821 bool ShouldCreate =
true) {
826 static DIBasicType *
getImpl(LLVMContext &Context,
unsigned Tag,
830 bool ShouldCreate =
true);
832 TempDIBasicType cloneImpl()
const {
839 (
Tag,
Name, 0, 0, 0, FlagZero))
855 TempDIBasicType
clone()
const {
return cloneImpl(); }
882 Encoding(Encoding) {}
890 bool ShouldCreate =
true) {
895 static DIStringType *
getImpl(LLVMContext &Context,
unsigned Tag,
900 bool ShouldCreate =
true);
902 TempDIStringType cloneImpl()
const {
930 TempDIStringType
clone()
const {
return cloneImpl(); }
969 std::optional<unsigned> DWARFAddressSpace;
974 std::optional<unsigned> DWARFAddressSpace,
DIFlags Flags,
978 DWARFAddressSpace(DWARFAddressSpace) {}
984 std::optional<unsigned> DWARFAddressSpace,
DIFlags Flags,
986 bool ShouldCreate =
true) {
992 static DIDerivedType *
996 std::optional<unsigned> DWARFAddressSpace,
DIFlags Flags,
998 bool ShouldCreate =
true);
1000 TempDIDerivedType cloneImpl()
const {
1004 getDWARFAddressSpace(),
getFlags(), getExtraData(), getAnnotations());
1013 std::optional<unsigned> DWARFAddressSpace,
DIFlags Flags,
1028 TempDIDerivedType
clone()
const {
return cloneImpl(); }
1036 std::optional<unsigned> getDWARFAddressSpace()
const {
1037 return DWARFAddressSpace;
1048 Metadata *getExtraData()
const {
return getRawExtraData(); }
1052 DINodeArray getAnnotations()
const {
1053 return cast_or_null<MDTuple>(getRawAnnotations());
1059 DIType *getClassType()
const;
1062 return dyn_cast_or_null<DIObjCProperty>(getExtraData());
1087 unsigned RuntimeLang;
1095 RuntimeLang(RuntimeLang) {}
1099 void mutate(
unsigned Tag,
unsigned Line,
unsigned RuntimeLang,
1104 this->RuntimeLang = RuntimeLang;
1108 static DICompositeType *
1117 bool ShouldCreate =
true) {
1125 static DICompositeType *
1135 TempDICompositeType cloneImpl()
const {
1176 TempDICompositeType
clone()
const {
return cloneImpl(); }
1236 return getOperandAs<DIDerivedType>(8);
1261 if (
auto *MD = dyn_cast_or_null<ConstantAsMetadata>(
getRawRank()))
1262 return dyn_cast_or_null<ConstantInt>(MD->getValue());
1266 return dyn_cast_or_null<DIExpression>(
getRawRank());
1284 "Lost a member during member list replacement");
1321 bool ShouldCreate =
true) {
1327 bool ShouldCreate =
true);
1329 TempDISubroutineType cloneImpl()
const {
1341 TempDISubroutineType
clone()
const {
return cloneImpl(); }
1344 auto NewTy =
clone();
1391 unsigned RuntimeVersion;
1392 unsigned EmissionKind;
1394 bool SplitDebugInlining;
1395 bool DebugInfoForProfiling;
1396 unsigned NameTableKind;
1397 bool RangesBaseAddress;
1400 bool IsOptimized,
unsigned RuntimeVersion,
1401 unsigned EmissionKind,
uint64_t DWOId,
bool SplitDebugInlining,
1402 bool DebugInfoForProfiling,
unsigned NameTableKind,
1410 unsigned EmissionKind, DICompositeTypeArray
EnumTypes,
1414 uint64_t DWOId,
bool SplitDebugInlining,
bool DebugInfoForProfiling,
1423 DebugInfoForProfiling, NameTableKind, RangesBaseAddress,
1427 static DICompileUnit *
1434 bool DebugInfoForProfiling,
unsigned NameTableKind,
1435 bool RangesBaseAddress, MDString *
SysRoot, MDString *
SDK,
1438 TempDICompileUnit cloneImpl()
const {
1460 uint64_t DWOId,
bool SplitDebugInlining,
bool DebugInfoForProfiling,
1466 DebugInfoForProfiling, (
unsigned)NameTableKind, RangesBaseAddress,
1475 bool SplitDebugInlining,
bool DebugInfoForProfiling,
1481 DebugInfoForProfiling, NameTableKind, RangesBaseAddress,
SysRoot,
SDK))
1483 TempDICompileUnit
clone()
const {
return cloneImpl(); }
1521 this->SplitDebugInlining = SplitDebugInlining;
1529 return getOperandAs<MDString>(3);
1609 unsigned VirtualIndex;
1619#define HANDLE_DISP_FLAG(ID, NAME) SPFlag##NAME = ID,
1620#define DISP_FLAG_LARGEST_NEEDED
1621#include "llvm/IR/DebugInfoFlags.def"
1641 bool IsMainSubprogram =
false);
1648 unsigned ScopeLine,
unsigned VirtualIndex,
int ThisAdjustment,
1656 unsigned VirtualIndex,
int ThisAdjustment,
DIFlags Flags,
1670 static DISubprogram *
1678 bool ShouldCreate =
true);
1680 TempDISubprogram cloneImpl()
const {
1683 getContainingType(), getVirtualIndex(),
1684 getThisAdjustment(),
getFlags(), getSPFlags(),
1685 getUnit(), getTemplateParams(), getDeclaration(),
1686 getRetainedNodes(), getThrownTypes(), getAnnotations(),
1687 getTargetFuncName());
1718 TempDISubprogram
clone()
const {
return cloneImpl(); }
1721 TempDISubprogram cloneWithFlags(
DIFlags NewFlags)
const {
1722 auto NewSP =
clone();
1723 NewSP->Flags = NewFlags;
1728 unsigned getLine()
const {
return Line; }
1730 unsigned getVirtualIndex()
const {
return VirtualIndex; }
1731 int getThisAdjustment()
const {
return ThisAdjustment; }
1732 unsigned getScopeLine()
const {
return ScopeLine; }
1733 void setScopeLine(
unsigned L) {
1738 DISPFlags getSPFlags()
const {
return SPFlags; }
1739 bool isLocalToUnit()
const {
return getSPFlags() & SPFlagLocalToUnit; }
1740 bool isDefinition()
const {
return getSPFlags() & SPFlagDefinition; }
1741 bool isOptimized()
const {
return getSPFlags() & SPFlagOptimized; }
1742 bool isMainSubprogram()
const {
return getSPFlags() & SPFlagMainSubprogram; }
1744 bool isArtificial()
const {
return getFlags() & FlagArtificial; }
1745 bool isPrivate()
const {
1748 bool isProtected()
const {
1751 bool isPublic()
const {
1754 bool isExplicit()
const {
return getFlags() & FlagExplicit; }
1755 bool isPrototyped()
const {
return getFlags() & FlagPrototyped; }
1756 bool areAllCallsDescribed()
const {
1757 return getFlags() & FlagAllCallsDescribed;
1759 bool isPure()
const {
return getSPFlags() & SPFlagPure; }
1760 bool isElemental()
const {
return getSPFlags() & SPFlagElemental; }
1761 bool isRecursive()
const {
return getSPFlags() & SPFlagRecursive; }
1762 bool isObjCDirect()
const {
return getSPFlags() & SPFlagObjCDirect; }
1768 bool isDeleted()
const {
return getSPFlags() & SPFlagDeleted; }
1774 bool isLValueReference()
const {
return getFlags() & FlagLValueReference; }
1780 bool isRValueReference()
const {
return getFlags() & FlagRValueReference; }
1785 bool isNoReturn()
const {
return getFlags() & FlagNoReturn; }
1790 bool isThunk()
const {
return getFlags() & FlagThunk; }
1792 DIScope *
getScope()
const {
return cast_or_null<DIScope>(getRawScope()); }
1799 DISubroutineType *
getType()
const {
1800 return cast_or_null<DISubroutineType>(getRawType());
1802 DIType *getContainingType()
const {
1803 return cast_or_null<DIType>(getRawContainingType());
1805 void replaceType(DISubroutineType *Ty) {
1810 DICompileUnit *getUnit()
const {
1811 return cast_or_null<DICompileUnit>(getRawUnit());
1814 DITemplateParameterArray getTemplateParams()
const {
1815 return cast_or_null<MDTuple>(getRawTemplateParams());
1818 return cast_or_null<DISubprogram>(getRawDeclaration());
1820 DINodeArray getRetainedNodes()
const {
1821 return cast_or_null<MDTuple>(getRawRetainedNodes());
1823 DITypeArray getThrownTypes()
const {
1824 return cast_or_null<MDTuple>(getRawThrownTypes());
1826 DINodeArray getAnnotations()
const {
1827 return cast_or_null<MDTuple>(getRawAnnotations());
1829 StringRef getTargetFuncName()
const {
1834 MDString *getRawName()
const {
return getOperandAs<MDString>(2); }
1835 MDString *getRawLinkageName()
const {
return getOperandAs<MDString>(3); }
1840 Metadata *getRawContainingType()
const {
1841 return getNumOperands() > 8 ? getOperandAs<Metadata>(8) : nullptr;
1843 Metadata *getRawTemplateParams()
const {
1844 return getNumOperands() > 9 ? getOperandAs<Metadata>(9) : nullptr;
1846 Metadata *getRawThrownTypes()
const {
1847 return getNumOperands() > 10 ? getOperandAs<Metadata>(10) : nullptr;
1849 Metadata *getRawAnnotations()
const {
1850 return getNumOperands() > 11 ? getOperandAs<Metadata>(11) : nullptr;
1852 MDString *getRawTargetFuncName()
const {
1853 return getNumOperands() > 12 ? getOperandAs<MDString>(12) : nullptr;
1856 void replaceRawLinkageName(MDString *
LinkageName) {
1863 bool describes(
const Function *
F)
const;
1894 TempDILocation cloneImpl()
const {
1916 TempDILocation
clone()
const {
return cloneImpl(); }
1924 StringRef getSubprogramLinkageName()
const {
1925 DISubprogram *SP =
getScope()->getSubprogram();
1928 auto Name = SP->getLinkageName();
1931 return SP->getName();
1934 DILocation *getInlinedAt()
const {
1947 DIFile *getFile()
const {
return getScope()->getFile(); }
1949 StringRef getDirectory()
const {
return getScope()->getDirectory(); }
1950 std::optional<StringRef> getSource()
const {
return getScope()->getSource(); }
1956 DILocalScope *getInlinedAtScope()
const {
1957 if (
auto *IA = getInlinedAt())
1958 return IA->getInlinedAtScope();
1996 inline unsigned getDiscriminator()
const;
2007 return ((Discriminator & 0x7) == 0x7) && (Discriminator & 0xFFFFFFF8);
2017 inline std::optional<const DILocation *>
2034 inline std::optional<const DILocation *>
2072 bool IsFSDiscriminator =
false) {
2073 if (IsFSDiscriminator)
2161 assert(Column < (1u << 16) &&
"Expected 16-bit column");
2166 DIFile *
File,
unsigned Line,
unsigned Column,
2168 bool ShouldCreate =
true) {
2178 TempDILexicalBlock cloneImpl()
const {
2193 TempDILexicalBlock
clone()
const {
return cloneImpl(); }
2207 unsigned Discriminator;
2212 Discriminator(Discriminator) {}
2218 bool ShouldCreate =
true) {
2227 bool ShouldCreate =
true);
2229 TempDILexicalBlockFile cloneImpl()
const {
2237 unsigned Discriminator),
2243 TempDILexicalBlockFile
clone()
const {
return cloneImpl(); }
2251unsigned DILocation::getDiscriminator()
const {
2252 if (
auto *
F = dyn_cast<DILexicalBlockFile>(
getScope()))
2253 return F->getDiscriminator();
2264 for (
auto *LBF = dyn_cast<DILexicalBlockFile>(
Scope);
2265 LBF && LBF->getDiscriminator() != 0;
2266 LBF = dyn_cast<DILexicalBlockFile>(
Scope))
2267 Scope = LBF->getScope();
2287std::optional<const DILocation *>
2289 unsigned BD,
DF, CI;
2303 return std::nullopt;
2306std::optional<const DILocation *>
2324 return std::nullopt;
2331 unsigned ExportSymbols : 1;
2341 ExportSymbols,
Storage, ShouldCreate);
2347 TempDINamespace cloneImpl()
const {
2360 TempDINamespace
clone()
const {
return cloneImpl(); }
2390 bool ShouldCreate =
true) {
2403 TempDIModule cloneImpl()
const {
2405 getConfigurationMacros(), getIncludePath(),
2406 getAPINotesFile(), getLineNo(), getIsDecl());
2414 bool IsDecl =
false),
2421 bool IsDecl =
false),
2425 TempDIModule
clone()
const {
return cloneImpl(); }
2427 DIScope *
getScope()
const {
return cast_or_null<DIScope>(getRawScope()); }
2432 unsigned getLineNo()
const {
return LineNo; }
2433 bool getIsDecl()
const {
return IsDecl; }
2436 MDString *getRawName()
const {
return getOperandAs<MDString>(2); }
2437 MDString *getRawConfigurationMacros()
const {
2438 return getOperandAs<MDString>(3);
2440 MDString *getRawIncludePath()
const {
return getOperandAs<MDString>(4); }
2441 MDString *getRawAPINotesFile()
const {
return getOperandAs<MDString>(5); }
2444 return MD->getMetadataID() == DIModuleKind;
2467 return MD->
getMetadataID() == DITemplateTypeParameterKind ||
2483 bool ShouldCreate =
true) {
2490 bool ShouldCreate =
true);
2492 TempDITemplateTypeParameter cloneImpl()
const {
2504 TempDITemplateTypeParameter
clone()
const {
return cloneImpl(); }
2526 bool ShouldCreate =
true) {
2530 static DITemplateValueParameter *
getImpl(LLVMContext &Context,
unsigned Tag,
2534 bool ShouldCreate =
true);
2536 TempDITemplateValueParameter cloneImpl()
const {
2551 TempDITemplateValueParameter
clone()
const {
return cloneImpl(); }
2584 if (
auto *
BT = dyn_cast<DIBasicType>(
getType()))
2585 return BT->getSignedness();
2586 return std::nullopt;
2591 return F->getFilename();
2597 return F->getDirectory();
2603 return F->getSource();
2604 return std::nullopt;
2631 std::vector<uint64_t> Elements;
2635 Elements(Elements.begin(), Elements.end()) {}
2640 bool ShouldCreate =
true);
2642 TempDIExpression cloneImpl()
const {
2649 TempDIExpression
clone()
const {
return cloneImpl(); }
2656 assert(
I < Elements.size() &&
"Index out of range");
2663 std::optional<SignedOrUnsignedConstant>
isConstant()
const;
2807 uint64_t StartInBits = std::max(
A.OffsetInBits,
B.OffsetInBits);
2808 uint64_t EndInBits = std::min(
A.endInBits(),
B.endInBits());
2809 if (EndInBits <= StartInBits)
2816 static std::optional<FragmentInfo>
getFragmentInfo(expr_op_iterator Start,
2817 expr_op_iterator
End);
2857 static std::optional<const DIExpression *>
2883 bool SecondIndirect);
2900 unsigned &AddrClass);
2964 static std::optional<DIExpression *>
2966 unsigned SizeInBits);
2992 unsigned ToSize,
bool Signed);
3003 auto Fragment2 = *
Other->getFragmentInfo();
3021 std::pair<DIExpression *, const ConstantInt *>
3027 return std::tie(
A.SizeInBits,
A.OffsetInBits) ==
3028 std::tie(
B.SizeInBits,
B.OffsetInBits);
3033 return std::tie(
A.SizeInBits,
A.OffsetInBits) <
3034 std::tie(
B.SizeInBits,
B.OffsetInBits);
3039 static const uint64_t MaxVal = std::numeric_limits<uint64_t>::max();
3066 IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition) {}
3072 bool IsLocalToUnit,
bool IsDefinition,
3075 bool ShouldCreate =
true) {
3082 static DIGlobalVariable *
3085 bool IsLocalToUnit,
bool IsDefinition,
3088 bool ShouldCreate =
true);
3090 TempDIGlobalVariable cloneImpl()
const {
3102 unsigned Line,
DIType *
Type,
bool IsLocalToUnit,
bool IsDefinition,
3116 TempDIGlobalVariable
clone()
const {
return cloneImpl(); }
3159 bool ShouldCreate =
true);
3161 TempDICommonBlock cloneImpl()
const {
3176 TempDICommonBlock
clone()
const {
return cloneImpl(); }
3180 return cast_or_null<DIGlobalVariable>(
getRawDecl());
3211 assert(
Arg < (1 << 16) &&
"DILocalVariable: Arg out of range");
3220 bool ShouldCreate =
true) {
3230 bool ShouldCreate =
true);
3232 TempDILocalVariable cloneImpl()
const {
3252 TempDILocalVariable
clone()
const {
return cloneImpl(); }
3301 bool ShouldCreate =
true) {
3307 bool ShouldCreate =
true);
3309 TempDILabel cloneImpl()
const {
3324 TempDILabel
clone()
const {
return cloneImpl(); }
3359 unsigned Attributes;
3380 TempDIObjCProperty cloneImpl()
const {
3400 TempDIObjCProperty
clone()
const {
return cloneImpl(); }
3412 return F->getFilename();
3418 return F->getDirectory();
3449 bool ShouldCreate =
true) {
3454 static DIImportedEntity *
3459 TempDIImportedEntity cloneImpl()
const {
3461 getFile(), getLine(),
getName(), getElements());
3468 DINodeArray Elements =
nullptr),
3476 TempDIImportedEntity
clone()
const {
return cloneImpl(); }
3478 unsigned getLine()
const {
return Line; }
3479 DIScope *
getScope()
const {
return cast_or_null<DIScope>(getRawScope()); }
3480 DINode *getEntity()
const {
return cast_or_null<DINode>(getRawEntity()); }
3482 DIFile *getFile()
const {
return cast_or_null<DIFile>(getRawFile()); }
3483 DINodeArray getElements()
const {
3484 return cast_or_null<MDTuple>(getRawElements());
3489 MDString *getRawName()
const {
return getOperandAs<MDString>(2); }
3494 return MD->getMetadataID() == DIImportedEntityKind;
3512 TempDIGlobalVariableExpression cloneImpl()
const {
3521 TempDIGlobalVariableExpression
clone()
const {
return cloneImpl(); }
3536 return MD->
getMetadataID() == DIGlobalVariableExpressionKind;
3555 assert(MIType < 1u << 16);
3565 if (
auto *S = getOperandAs<MDString>(
I))
3566 return S->getString();