13#ifndef LLVM_IR_DEBUGINFOMETADATA_H
14#define LLVM_IR_DEBUGINFOMETADATA_H
41#define DEFINE_MDNODE_GET_UNPACK_IMPL(...) __VA_ARGS__
42#define DEFINE_MDNODE_GET_UNPACK(ARGS) DEFINE_MDNODE_GET_UNPACK_IMPL ARGS
43#define DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS) \
44 static CLASS *getDistinct(LLVMContext &Context, \
45 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
46 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Distinct); \
48 static Temp##CLASS getTemporary(LLVMContext &Context, \
49 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
51 getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Temporary)); \
53#define DEFINE_MDNODE_GET(CLASS, FORMAL, ARGS) \
54 static CLASS *get(LLVMContext &Context, DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
55 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued); \
57 static CLASS *getIfExists(LLVMContext &Context, \
58 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
59 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued, \
62 DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS)
125 : Version(Version), Name(Lang), HasVersion(
true), Dialect(Dialect) {}
127 : Version(0), Name(Lang), HasVersion(
false), Dialect(Dialect) {}
130class DbgVariableRecord;
160 return S->getString();
181#define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = ID,
182#define DI_FLAG_LARGEST_NEEDED
183#include "llvm/IR/DebugInfoFlags.def"
186 FlagVirtualInheritance,
204 case GenericDINodeKind:
206 case DIEnumeratorKind:
207 case DIBasicTypeKind:
208 case DIFixedPointTypeKind:
209 case DIStringTypeKind:
210 case DISubrangeTypeKind:
211 case DIDerivedTypeKind:
212 case DICompositeTypeKind:
213 case DISubroutineTypeKind:
215 case DICompileUnitKind:
216 case DISubprogramKind:
217 case DILexicalBlockKind:
218 case DILexicalBlockFileKind:
219 case DINamespaceKind:
220 case DICommonBlockKind:
221 case DITemplateTypeParameterKind:
222 case DITemplateValueParameterKind:
223 case DIGlobalVariableKind:
224 case DILocalVariableKind:
226 case DIObjCPropertyKind:
228 case DIImportedEntityKind:
230 case DIGenericSubrangeKind:
258 void recalculateHash();
260 static GenericDINode *getImpl(LLVMContext &Context,
unsigned Tag,
267 LLVM_ABI static GenericDINode *getImpl(LLVMContext &Context,
unsigned Tag,
271 bool ShouldCreate =
true);
273 TempGenericDINode cloneImpl()
const {
291 TempGenericDINode
clone()
const {
return cloneImpl(); }
330 bool ShouldCreate =
true);
339 return Context.getReplaceableUses()->getAllDbgVariableRecordUsers();
346 return TempDIAssignID(getImpl(Context,
Temporary));
362 ~DISubrange() =
default;
366 bool ShouldCreate =
true);
370 bool ShouldCreate =
true);
376 bool ShouldCreate =
true);
378 TempDISubrange cloneImpl()
const {
380 getRawUpperBound(), getRawStride());
395 TempDISubrange
clone()
const {
return cloneImpl(); }
405 typedef PointerUnion<ConstantInt *, DIVariable *, DIExpression *> BoundType;
427 ~DIGenericSubrange() =
default;
432 bool ShouldCreate =
true);
434 TempDIGenericSubrange cloneImpl()
const {
443 (CountNode, LowerBound, UpperBound, Stride))
445 TempDIGenericSubrange
clone()
const {
return cloneImpl(); }
487 LLVM_ABI static DIEnumerator *getImpl(LLVMContext &Context,
490 bool ShouldCreate =
true);
492 TempDIEnumerator cloneImpl()
const {
510 TempDIEnumerator
clone()
const {
return cloneImpl(); }
541 inline std::optional<StringRef>
getSource()
const;
561 case DIBasicTypeKind:
562 case DIFixedPointTypeKind:
563 case DIStringTypeKind:
564 case DISubrangeTypeKind:
565 case DIDerivedTypeKind:
566 case DICompositeTypeKind:
567 case DISubroutineTypeKind:
569 case DICompileUnitKind:
570 case DISubprogramKind:
571 case DILexicalBlockKind:
572 case DILexicalBlockFileKind:
573 case DINamespaceKind:
574 case DICommonBlockKind:
622 std::optional<ChecksumInfo<MDString *>> Checksum;
627 std::optional<ChecksumInfo<MDString *>>
CS,
MDString *Src,
633 std::optional<ChecksumInfo<StringRef>>
CS,
635 bool ShouldCreate =
true) {
636 std::optional<ChecksumInfo<MDString *>> MDChecksum;
646 std::optional<ChecksumInfo<MDString *>>
CS,
648 bool ShouldCreate =
true);
650 TempDIFile cloneImpl()
const {
659 std::optional<StringRef> Source = std::nullopt),
667 TempDIFile
clone()
const {
return cloneImpl(); }
671 std::optional<ChecksumInfo<StringRef>> getChecksum()
const {
672 std::optional<ChecksumInfo<StringRef>> StringRefChecksum;
674 StringRefChecksum.emplace(Checksum->Kind, Checksum->Value->getString());
675 return StringRefChecksum;
677 std::optional<StringRef>
getSource()
const {
678 return Source ? std::optional<StringRef>(Source->getString())
684 std::optional<ChecksumInfo<MDString *>> getRawChecksum()
const {
687 MDString *getRawSource()
const {
return Source; }
690 LLVM_ABI static std::optional<ChecksumKind>
700 return F->getFilename();
706 return F->getDirectory();
712 return F->getSource();
735 init(Line, AlignInBits, NumExtraInhabitants, Flags);
744 this->NumExtraInhabitants = NumExtraInhabitants;
752 init(Line, AlignInBits, NumExtraInhabitants, Flags);
776 return CI->getZExtValue();
785 return CI->getZExtValue();
792 auto NewTy =
clone();
793 NewTy->Flags = NewFlags;
812 return getFlags() & FlagObjcClassComplete;
821 return getFlags() & FlagTypePassByReference;
831 case DIBasicTypeKind:
832 case DIFixedPointTypeKind:
833 case DIStringTypeKind:
834 case DISubrangeTypeKind:
835 case DIDerivedTypeKind:
836 case DICompositeTypeKind:
837 case DISubroutineTypeKind:
864 Encoding(Encoding), DataSizeInBits(DataSizeInBits) {}
871 Encoding(Encoding), DataSizeInBits(DataSizeInBits) {}
904 bool ShouldCreate =
true);
915 (
Tag,
Name,
nullptr, 0,
nullptr, 0, 0, 0, 0, 0, FlagZero))
918 (
Tag,
Name,
nullptr, 0,
nullptr,
SizeInBits, 0, 0, 0, 0,
922 (
Tag,
Name,
nullptr, 0,
nullptr,
SizeInBits, 0, 0, 0, 0,
933 Encoding, 0, 0,
Flags))
1015 Kind(Kind), Factor(Factor) {
1035 ~DIFixedPointType() =
default;
1037 static DIFixedPointType *
1038 getImpl(LLVMContext &Context,
unsigned Tag, StringRef
Name, DIFile *
File,
1042 bool ShouldCreate =
true) {
1047 Kind, Factor, Numerator, Denominator,
Storage, ShouldCreate);
1049 static DIFixedPointType *
1050 getImpl(LLVMContext &Context,
unsigned Tag, StringRef
Name, DIFile *
File,
1054 bool ShouldCreate =
true) {
1057 Kind, Factor, Numerator, Denominator,
Storage, ShouldCreate);
1059 static DIFixedPointType *
1060 getImpl(LLVMContext &Context,
unsigned Tag, MDString *
Name, DIFile *
File,
1064 bool ShouldCreate =
true) {
1069 Denominator,
Storage, ShouldCreate);
1076 bool ShouldCreate =
true);
1078 TempDIFixedPointType
cloneImpl()
const {
1082 Factor, Numerator, Denominator);
1096 LLVM_ABI static std::optional<FixedPointKind>
1104 unsigned Kind,
int Factor,
APInt Numerator,
1112 unsigned Kind,
int Factor,
APInt Numerator,
1120 unsigned Kind,
int Factor,
APInt Numerator,
1172 Encoding(Encoding) {}
1180 bool ShouldCreate =
true) {
1184 StringLength, StrLenExp, StrLocationExp, SizeInBitsNode,
1187 static DIStringType *getImpl(LLVMContext &Context,
unsigned Tag,
1192 bool ShouldCreate =
true) {
1195 return getImpl(Context, Tag,
Name,
StringLength, StrLenExp, StrLocationExp,
1200 getImpl(LLVMContext &Context,
unsigned Tag, MDString *
Name,
1205 TempDIStringType cloneImpl()
const {
1240 TempDIStringType
clone()
const {
return cloneImpl(); }
1291 bool IsaPointer,
bool AuthenticatesNullValues) {
1293 assert(Discriminator <= 0xffff);
1294 RawData = (
Key << 0) | (IsDiscr ? (1 << 4) : 0) | (Discriminator << 5) |
1295 (IsaPointer ? (1 << 21) : 0) |
1296 (AuthenticatesNullValues ? (1 << 22) : 0);
1314 std::optional<unsigned> DWARFAddressSpace;
1318 std::optional<unsigned> DWARFAddressSpace,
1323 DWARFAddressSpace(DWARFAddressSpace) {
1333 std::optional<PtrAuthData>
PtrAuthData, DIFlags Flags,
1335 bool ShouldCreate =
true) {
1345 static DIDerivedType *
1346 getImpl(LLVMContext &Context,
unsigned Tag, MDString *
Name, DIFile *
File,
1350 std::optional<PtrAuthData>
PtrAuthData, DIFlags Flags,
1352 bool ShouldCreate =
true) {
1362 static DIDerivedType *
1363 getImpl(LLVMContext &Context,
unsigned Tag, StringRef
Name, DIFile *
File,
1366 std::optional<unsigned> DWARFAddressSpace,
1369 bool ShouldCreate =
true) {
1379 std::optional<unsigned> DWARFAddressSpace,
1382 bool ShouldCreate =
true);
1384 TempDIDerivedType cloneImpl()
const {
1398 std::optional<unsigned> DWARFAddressSpace,
1409 std::optional<unsigned> DWARFAddressSpace,
1420 std::optional<unsigned> DWARFAddressSpace,
1431 std::optional<unsigned> DWARFAddressSpace,
1439 TempDIDerivedType
clone()
const {
return cloneImpl(); }
1447 std::optional<unsigned> getDWARFAddressSpace()
const {
1448 return DWARFAddressSpace;
1451 LLVM_ABI std::optional<PtrAuthData> getPtrAuthData()
const;
1507 return !(Lhs == Rhs);
1527 ~DISubrangeType() =
default;
1529 static DISubrangeType *
1549 TempDISubrangeType cloneImpl()
const {
1575 TempDISubrangeType
clone()
const {
return cloneImpl(); }
1624 unsigned RuntimeLang;
1625 std::optional<uint32_t> EnumKind;
1634 RuntimeLang(RuntimeLang), EnumKind(EnumKind) {}
1640 std::optional<uint32_t>
EnumKind, DIFlags Flags) {
1648 static DICompositeType *
1649 getImpl(LLVMContext &Context,
unsigned Tag, StringRef
Name,
Metadata *
File,
1672 static DICompositeType *
1694 static DICompositeType *
1699 unsigned RuntimeLang, std::optional<uint32_t> EnumKind,
1725 TempDICompositeType cloneImpl()
const {
1743 DINodeArray
Elements,
unsigned RuntimeLang,
1779 DINodeArray
Elements,
unsigned RuntimeLang,
1811 TempDICompositeType
clone()
const {
return cloneImpl(); }
1958 "Lost a member during member list replacement");
1992 ~DISubroutineType() =
default;
1997 bool ShouldCreate =
true) {
2003 bool ShouldCreate =
true);
2005 TempDISubroutineType cloneImpl()
const {
2017 TempDISubroutineType
clone()
const {
return cloneImpl(); }
2020 auto NewTy =
clone();
2060 LLVM_ABI static std::optional<DebugEmissionKind>
2063 LLVM_ABI static std::optional<DebugNameTableKind>
2108 getImpl(LLVMContext &Context, DISourceLanguageName SourceLanguage,
2118 TempDICompileUnit cloneImpl()
const {
2140 uint64_t DWOId,
bool SplitDebugInlining,
bool DebugInfoForProfiling,
2146 DebugInfoForProfiling, (
unsigned)NameTableKind, RangesBaseAddress,
2155 bool SplitDebugInlining,
bool DebugInfoForProfiling,
2161 DebugInfoForProfiling, NameTableKind, RangesBaseAddress,
SysRoot,
SDK))
2163 TempDICompileUnit
clone()
const {
return cloneImpl(); }
2204 this->SplitDebugInlining = SplitDebugInlining;
2293 unsigned VirtualIndex;
2303#define HANDLE_DISP_FLAG(ID, NAME) SPFlag##NAME = ID,
2304#define DISP_FLAG_LARGEST_NEEDED
2305#include "llvm/IR/DebugInfoFlags.def"
2325 bool IsMainSubprogram =
false);
2347 bool ShouldCreate =
true) {
2358 getImpl(LLVMContext &Context,
Metadata *Scope, MDString *
Name,
2367 TempDISubprogram cloneImpl()
const {
2370 getContainingType(), getVirtualIndex(),
2371 getThisAdjustment(),
getFlags(), getSPFlags(),
2372 getUnit(), getTemplateParams(), getDeclaration(),
2373 getRetainedNodes(), getThrownTypes(), getAnnotations(),
2374 getTargetFuncName(), getKeyInstructionsEnabled());
2408 TempDISubprogram
clone()
const {
return cloneImpl(); }
2411 TempDISubprogram cloneWithFlags(DIFlags NewFlags)
const {
2412 auto NewSP =
clone();
2413 NewSP->Flags = NewFlags;
2417 bool getKeyInstructionsEnabled()
const {
return SubclassData1; }
2420 unsigned getLine()
const {
return Line; }
2422 unsigned getVirtualIndex()
const {
return VirtualIndex; }
2423 int getThisAdjustment()
const {
return ThisAdjustment; }
2424 unsigned getScopeLine()
const {
return ScopeLine; }
2425 void setScopeLine(
unsigned L) {
2430 DISPFlags getSPFlags()
const {
return SPFlags; }
2431 bool isLocalToUnit()
const {
return getSPFlags() & SPFlagLocalToUnit; }
2432 bool isDefinition()
const {
return getSPFlags() & SPFlagDefinition; }
2433 bool isOptimized()
const {
return getSPFlags() & SPFlagOptimized; }
2434 bool isMainSubprogram()
const {
return getSPFlags() & SPFlagMainSubprogram; }
2436 bool isArtificial()
const {
return getFlags() & FlagArtificial; }
2437 bool isPrivate()
const {
2440 bool isProtected()
const {
2443 bool isPublic()
const {
2446 bool isExplicit()
const {
return getFlags() & FlagExplicit; }
2447 bool isPrototyped()
const {
return getFlags() & FlagPrototyped; }
2448 bool isNameSimplified()
const {
return getFlags() & FlagNameIsSimplified; }
2449 bool areAllCallsDescribed()
const {
2450 return getFlags() & FlagAllCallsDescribed;
2452 bool isPure()
const {
return getSPFlags() & SPFlagPure; }
2453 bool isElemental()
const {
return getSPFlags() & SPFlagElemental; }
2454 bool isRecursive()
const {
return getSPFlags() & SPFlagRecursive; }
2455 bool isObjCDirect()
const {
return getSPFlags() & SPFlagObjCDirect; }
2461 bool isDeleted()
const {
return getSPFlags() & SPFlagDeleted; }
2467 bool isLValueReference()
const {
return getFlags() & FlagLValueReference; }
2473 bool isRValueReference()
const {
return getFlags() & FlagRValueReference; }
2478 bool isNoReturn()
const {
return getFlags() & FlagNoReturn; }
2483 bool isThunk()
const {
return getFlags() & FlagThunk; }
2492 DISubroutineType *
getType()
const {
2495 DIType *getContainingType()
const {
2498 void replaceType(DISubroutineType *Ty) {
2503 DICompileUnit *getUnit()
const {
2507 DITemplateParameterArray getTemplateParams()
const {
2510 DISubprogram *getDeclaration()
const {
2514 MDNodeArray getRetainedNodes()
const {
2517 DITypeArray getThrownTypes()
const {
2520 DINodeArray getAnnotations()
const {
2523 StringRef getTargetFuncName()
const {
2534 Metadata *getRawContainingType()
const {
2537 Metadata *getRawTemplateParams()
const {
2540 Metadata *getRawThrownTypes()
const {
2543 Metadata *getRawAnnotations()
const {
2546 MDString *getRawTargetFuncName()
const {
2550 void replaceRawLinkageName(MDString *
LinkageName) {
2555 template <
typename IterT>
void retainNodes(IterT NodesBegin, IterT NodesEnd) {
2558 MDs.append(NodesBegin, NodesEnd);
2564 template <
typename T,
typename MetadataT,
typename FuncLVT,
2565 typename FuncLabelT,
typename FuncImportedEntityT,
2566 typename FuncTypeT,
typename FuncGVET,
typename FuncUnknownT>
2567 static T visitRetainedNode(MetadataT *
N, FuncLVT &&FuncLV,
2568 FuncLabelT &&FuncLabel,
2569 FuncImportedEntityT &&FuncIE, FuncTypeT &&FuncType,
2570 FuncGVET &&FuncGVE, FuncUnknownT &&FuncUnknown) {
2571 static_assert(std::is_base_of_v<Metadata, MetadataT>,
2572 "N must point to Metadata or const Metadata");
2577 return FuncLabel(L);
2581 return FuncType(Ty);
2583 return FuncGVE(GVE);
2584 return FuncUnknown(
N);
2596 template <
typename FuncLVT,
typename FuncLabelT,
typename FuncImportedEntityT,
2597 typename FuncTypeT,
typename FuncGVET>
2599 FuncImportedEntityT &&FuncIE, FuncTypeT &&FuncType,
2600 FuncGVET &&FuncGVE) {
2601 for (
MDNode *
N : getRetainedNodes())
2602 visitRetainedNode<void>(
2603 N, FuncLV, FuncLabel, FuncIE, FuncType, FuncGVE,
2647 template <
typename RangeT>
2649 for (DISubprogram *SP : NewDistinctSPs)
2650 SP->cleanupRetainedNodes();
2690 return getImpl(Context, Line,
Column,
static_cast<Metadata *
>(Scope),
2695 TempDILocation cloneImpl()
const {
2731 TempDILocation
clone()
const {
return cloneImpl(); }
2739 StringRef getSubprogramLinkageName()
const {
2740 DISubprogram *
SP =
getScope()->getSubprogram();
2743 auto Name =
SP->getLinkageName();
2746 return SP->getName();
2749 DILocation *getInlinedAt()
const {
2769 const DILocation *getInlinedAtLocation()
const {
2770 const DILocation *Current =
this;
2771 while (
const DILocation *
Next = Current->getInlinedAt())
2778 DILocalScope *getInlinedAtScope()
const {
2779 return getInlinedAtLocation()->getScope();
2816 inline unsigned getDiscriminator()
const;
2827 return ((Discriminator & 0x7) == 0x7) && (Discriminator & 0xFFFFFFF8);
2837 inline std::optional<const DILocation *>
2854 inline std::optional<const DILocation *>
2889 bool IsFSDiscriminator =
false) {
2893 auto DwarfBaseDiscriminator =
2895 if (DwarfBaseDiscriminator)
2896 return *DwarfBaseDiscriminator;
2905 if (IsFSDiscriminator)
2923 LLVM_ABI static std::optional<unsigned>
2928 unsigned &
DF,
unsigned &CI);
2996 assert(Column < (1u << 16) &&
"Expected 16-bit column");
3003 bool ShouldCreate =
true) {
3004 return getImpl(Context,
static_cast<Metadata *
>(Scope),
3009 LLVM_ABI static DILexicalBlock *getImpl(LLVMContext &Context,
Metadata *Scope,
3012 bool ShouldCreate =
true);
3014 TempDILexicalBlock cloneImpl()
const {
3029 TempDILexicalBlock
clone()
const {
return cloneImpl(); }
3053 bool ShouldCreate =
true) {
3054 return getImpl(Context,
static_cast<Metadata *
>(Scope),
3059 LLVM_ABI static DILexicalBlockFile *getImpl(LLVMContext &Context,
3063 bool ShouldCreate =
true);
3065 TempDILexicalBlockFile cloneImpl()
const {
3079 TempDILexicalBlockFile
clone()
const {
return cloneImpl(); }
3087unsigned DILocation::getDiscriminator()
const {
3089 return F->getDiscriminator();
3101 LBF && LBF->getDiscriminator() != 0;
3103 Scope = LBF->getScope();
3124std::optional<const DILocation *>
3132 unsigned BD,
DF, CI;
3146 return std::nullopt;
3149std::optional<const DILocation *>
3167 return std::nullopt;
3179 ~DINamespace() =
default;
3190 bool ShouldCreate =
true);
3192 TempDINamespace cloneImpl()
const {
3205 TempDINamespace
clone()
const {
return cloneImpl(); }
3229 ~DIModule() =
default;
3235 bool ShouldCreate =
true) {
3248 TempDIModule cloneImpl()
const {
3250 getConfigurationMacros(), getIncludePath(),
3251 getAPINotesFile(), getLineNo(), getIsDecl());
3259 bool IsDecl =
false),
3266 bool IsDecl =
false),
3270 TempDIModule
clone()
const {
return cloneImpl(); }
3282 MDString *getRawConfigurationMacros()
const {
3289 return MD->getMetadataID() == DIModuleKind;
3314 return MD->
getMetadataID() == DITemplateTypeParameterKind ||
3325 ~DITemplateTypeParameter() =
default;
3330 bool ShouldCreate =
true) {
3338 TempDITemplateTypeParameter cloneImpl()
const {
3350 TempDITemplateTypeParameter
clone()
const {
return cloneImpl(); }
3372 bool ShouldCreate =
true) {
3376 LLVM_ABI static DITemplateValueParameter *
3377 getImpl(LLVMContext &Context,
unsigned Tag, MDString *
Name,
Metadata *Type,
3379 bool ShouldCreate =
true);
3381 TempDITemplateValueParameter cloneImpl()
const {
3396 TempDITemplateValueParameter
clone()
const {
return cloneImpl(); }
3432 return BT->getSignedness();
3433 return std::nullopt;
3438 return F->getFilename();
3444 return F->getDirectory();
3450 return F->getSource();
3451 return std::nullopt;
3478 std::vector<uint64_t> Elements;
3482 Elements(Elements.begin(), Elements.end()) {}
3483 ~DIExpression() =
default;
3485 LLVM_ABI static DIExpression *getImpl(LLVMContext &Context,
3486 ArrayRef<uint64_t> Elements,
3488 bool ShouldCreate =
true);
3490 TempDIExpression cloneImpl()
const {
3497 TempDIExpression
clone()
const {
return cloneImpl(); }
3504 assert(
I < Elements.size() &&
"Index out of range");
3539 explicit operator bool()
const {
return Op !=
nullptr; }
3547 assert(Op &&
"operand is not present");
3559 assert(Op &&
"operand is not present");
3595 template <
typename To,
typename From,
typename Enable>
3609 template <
typename To,
typename From,
typename Enable>
3626 template <
typename To,
typename From,
typename Enable>
3646 template <
typename To,
typename From,
typename Enable>
3663 template <
typename To,
typename From,
typename Enable>
3679 template <
typename To,
typename From,
typename Enable>
3694 template <
typename To,
typename From,
typename Enable>
3708 template <
typename To,
typename From,
typename Enable>
3806 LLVM_ABI static std::optional<FragmentInfo>
3834 LLVM_ABI std::optional<ArrayRef<uint64_t>>
3859 LLVM_ABI static std::optional<const DIExpression *>
3885 bool SecondIndirect);
3984 LLVM_ABI static std::optional<DIExpression *>
3986 unsigned SizeInBits);
4036 uint64_t SliceSizeInBits,
const Value *DbgPtr, int64_t DbgPtrOffsetInBits,
4038 std::optional<DIExpression::FragmentInfo> &Result,
4039 int64_t &OffsetFromLocationInBits);
4050 unsigned FromSize,
unsigned ToSize,
4062 auto Fragment2 = *
Other->getFragmentInfo();
4080 LLVM_ABI std::pair<DIExpression *, const ConstantInt *>
4089template <
typename To,
typename From>
4093 std::is_same_v<std::remove_const_t<From>, DIExpression::ExprOperand> &&
4094 !std::is_same_v<std::remove_const_t<To>, DIExpression::ExprOperand>>>
4116 return std::tie(
A.SizeInBits,
A.OffsetInBits) ==
4117 std::tie(
B.SizeInBits,
B.OffsetInBits);
4122 return std::tie(
A.SizeInBits,
A.OffsetInBits) <
4123 std::tie(
B.SizeInBits,
B.OffsetInBits);
4153 : Start(Expr.
begin()), End(Expr.
end()) {}
4158 std::optional<DIExpression::ExprOperand>
take() {
4160 return std::nullopt;
4168 std::optional<DIExpression::ExprOperand>
peek()
const {
4170 return std::nullopt;
4175 std::optional<DIExpression::ExprOperand>
peekNext()
const {
4177 return std::nullopt;
4179 auto Next = Start.getNext();
4181 return std::nullopt;
4186 std::optional<DIExpression::ExprOperand>
peekNextN(
unsigned N)
const {
4188 return std::nullopt;
4190 for (
unsigned I = 0;
I <
N;
I++) {
4193 return std::nullopt;
4204 operator bool()
const {
return Start != End; }
4229 IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition) {}
4238 bool ShouldCreate =
true) {
4246 getImpl(LLVMContext &Context,
Metadata *Scope, MDString *
Name,
4251 bool ShouldCreate =
true);
4253 TempDIGlobalVariable cloneImpl()
const {
4265 unsigned Line,
DIType *
Type,
bool IsLocalToUnit,
bool IsDefinition,
4279 TempDIGlobalVariable
clone()
const {
return cloneImpl(); }
4324 bool ShouldCreate =
true);
4326 TempDICommonBlock cloneImpl()
const {
4341 TempDICommonBlock
clone()
const {
return cloneImpl(); }
4375 Arg(Arg), Flags(Flags) {
4376 assert(Arg < (1 << 16) &&
"DILocalVariable: Arg out of range");
4385 bool ShouldCreate =
true) {
4392 unsigned Line,
Metadata *Type,
unsigned Arg, DIFlags Flags,
4394 bool ShouldCreate =
true);
4396 TempDILocalVariable cloneImpl()
const {
4416 TempDILocalVariable
clone()
const {
return cloneImpl(); }
4459 std::optional<unsigned> CoroSuspendIdx;
4463 bool IsArtificial, std::optional<unsigned> CoroSuspendIdx,
4465 ~DILabel() =
default;
4470 std::optional<unsigned> CoroSuspendIdx,
4473 Line, Column, IsArtificial, CoroSuspendIdx,
Storage,
4480 bool ShouldCreate =
true);
4482 TempDILabel cloneImpl()
const {
4491 unsigned Line,
unsigned Column,
bool IsArtificial,
4492 std::optional<unsigned> CoroSuspendIdx),
4497 unsigned Line,
unsigned Column,
bool IsArtificial,
4498 std::optional<unsigned> CoroSuspendIdx),
4502 TempDILabel
clone()
const {
return cloneImpl(); }
4540 unsigned Attributes;
4544 ~DIObjCProperty() =
default;
4546 static DIObjCProperty *
4560 TempDIObjCProperty cloneImpl()
const {
4580 TempDIObjCProperty
clone()
const {
return cloneImpl(); }
4592 return F->getFilename();
4598 return F->getDirectory();
4629 ~DIProperty() =
default;
4634 bool ShouldCreate =
true) {
4642 bool ShouldCreate =
true);
4644 TempDIProperty cloneImpl()
const {
4659 TempDIProperty
clone()
const {
return cloneImpl(); }
4675 return F->getFilename();
4681 return F->getDirectory();
4713 bool ShouldCreate =
true) {
4723 TempDIImportedEntity cloneImpl()
const {
4725 getFile(), getLine(),
getName(), getElements());
4732 DINodeArray Elements =
nullptr),
4740 TempDIImportedEntity
clone()
const {
return cloneImpl(); }
4747 DINodeArray getElements()
const {
4758 return MD->getMetadataID() == DIImportedEntityKind;
4763class DIGlobalVariableExpression :
public MDNode {
4776 TempDIGlobalVariableExpression cloneImpl()
const {
4785 TempDIGlobalVariableExpression
clone()
const {
return cloneImpl(); }
4800 return MD->
getMetadataID() == DIGlobalVariableExpressionKind;
4820 assert(MIType < 1u << 16);
4831 return S->getString();
4849 case DIMacroFileKind:
4871 bool ShouldCreate =
true) {
4875 LLVM_ABI static DIMacro *getImpl(LLVMContext &Context,
unsigned MIType,
4876 unsigned Line, MDString *
Name,
4878 bool ShouldCreate =
true);
4880 TempDIMacro cloneImpl()
const {
4895 TempDIMacro
clone()
const {
return cloneImpl(); }
4927 bool ShouldCreate =
true) {
4932 LLVM_ABI static DIMacroFile *getImpl(LLVMContext &Context,
unsigned MIType,
4935 bool ShouldCreate =
true);
4937 TempDIMacroFile cloneImpl()
const {
4952 TempDIMacroFile
clone()
const {
return cloneImpl(); }
4958 "Lost a macro node during macro node list replacement");
4996 void dropAllReferences(
bool Untrack);
4999 LLVM_ABI static DIArgList *
get(LLVMContext &Context,
5033 std::optional<FragmentInfo> Fragment;
5038 LLVM_ABI static const FragmentInfo DefaultFragment;
5044 std::optional<FragmentInfo> FragmentInfo,
5046 : Variable(Var), Fragment(FragmentInfo), InlinedAt(InlinedAt) {}
5051 Fragment(DIExpr ? DIExpr->getFragmentInfo() :
std::nullopt),
5052 InlinedAt(InlinedAt) {}
5059 return Fragment.value_or(DefaultFragment);
5063 return F == DefaultFragment;
5067 return std::tie(Variable, Fragment, InlinedAt) ==
5072 return std::tie(Variable, Fragment, InlinedAt) <
5082 const std::optional<FragmentInfo> Fragment =
D.getFragment();
5108 return N->getScope();
5112 return N->getScope();
5118 return N->getVariable()->getScope();
5122 return N->getVariable()->getScope();
5126#undef DEFINE_MDNODE_GET_UNPACK_IMPL
5127#undef DEFINE_MDNODE_GET_UNPACK
5128#undef DEFINE_MDNODE_GET
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 SmallString< 128 > getFilename(const DIScope *SP, vfs::FileSystem &VFS)
Extract a filename for a DIScope.
const AbstractManglingParser< Derived, Alloc >::OperatorInfo AbstractManglingParser< Derived, Alloc >::Ops[]
static constexpr StringLiteral Filename
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)
Func getContext().diagnose(DiagnosticInfoUnsupported(Func
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 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:
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.
ArrayRef< ValueAsMetadata * > getArgs() const
LLVM_ABI void handleChangedOperand(void *Ref, Metadata *New)
static bool classof(const Metadata *MD)
static LLVM_ABI DIArgList * get(LLVMContext &Context, ArrayRef< ValueAsMetadata * > Args)
friend class ReplaceableMetadataImpl
friend class LLVMContextImpl
SmallVector< DbgVariableRecord * > getAllDbgVariableRecordUsers()
static bool classof(const Metadata *MD)
SmallVector< DbgVariableRecord * > getAllDbgVariableRecordUsers()
static TempDIAssignID getTemporary(LLVMContext &Context)
static DIAssignID * getDistinct(LLVMContext &Context)
friend class LLVMContextImpl
void replaceOperandWith(unsigned I, Metadata *New)=delete
Basic type, like 'int' or 'float'.
DIBasicType(LLVMContext &C, StorageType Storage, unsigned Tag, unsigned LineNo, uint32_t AlignInBits, unsigned Encoding, uint32_t NumExtraInhabitants, uint32_t DataSizeInBits, DIFlags Flags, ArrayRef< Metadata * > Ops)
unsigned StringRef uint64_t FlagZero unsigned StringRef uint64_t uint32_t unsigned Encoding
unsigned StringRef uint64_t FlagZero unsigned StringRef uint64_t uint32_t unsigned DIFlags Flags
TempDIBasicType cloneImpl() const
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 StringRef DIFile unsigned DIScope uint64_t uint32_t unsigned uint32_t uint32_t DataSizeInBits
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 StringRef DIFile * File
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 StringRef DIFile unsigned DIScope * Scope
static bool classof(const Metadata *MD)
static DIBasicType * getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, DIFile *File, unsigned LineNo, DIScope *Scope, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, uint32_t NumExtraInhabitants, uint32_t DataSizeInBits, DIFlags Flags, StorageType Storage, bool ShouldCreate=true)
uint32_t getDataSizeInBits() const
unsigned StringRef uint64_t SizeInBits
friend class LLVMContextImpl
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
DEFINE_MDNODE_GET(DIBasicType,(unsigned Tag, StringRef Name),(Tag, Name, nullptr, 0, nullptr, 0, 0, 0, 0, 0, FlagZero)) DEFINE_MDNODE_GET(DIBasicType
unsigned StringRef uint64_t FlagZero unsigned StringRef uint64_t uint32_t unsigned DIFlags Flags unsigned StringRef uint64_t uint32_t unsigned uint32_t NumExtraInhabitants
DIBasicType(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, unsigned LineNo, uint32_t AlignInBits, unsigned Encoding, uint32_t NumExtraInhabitants, uint32_t DataSizeInBits, DIFlags Flags, ArrayRef< Metadata * > Ops)
static DIBasicType * getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, DIFile *File, unsigned LineNo, DIScope *Scope, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, uint32_t NumExtraInhabitants, uint32_t DataSizeInBits, DIFlags Flags, StorageType Storage, bool ShouldCreate=true)
unsigned StringRef uint64_t FlagZero unsigned StringRef uint64_t uint32_t AlignInBits
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 StringRef DIFile unsigned LineNo
Metadata * getRawScope() const
Metadata Metadata MDString Metadata unsigned LineNo TempDICommonBlock clone() const
Metadata * getRawDecl() const
Metadata * getRawFile() const
Metadata Metadata MDString Metadata unsigned LineNo
Metadata Metadata MDString * Name
MDString * getRawName() const
static bool classof(const Metadata *MD)
unsigned getLineNo() const
friend class LLVMContextImpl
Metadata Metadata MDString Metadata * File
StringRef getName() const
DIScope * getScope() const
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
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool unsigned NameTableKind
MDString * getRawSplitDebugFilename() const
bool getDebugInfoForProfiling() const
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool DebugInfoForProfiling
Metadata * getRawRetainedTypes() const
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
DISourceLanguageName Metadata MDString bool MDString * Flags
void setSplitDebugInlining(bool SplitDebugInlining)
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool unsigned bool MDString MDString * SDK
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata * GlobalVariables
DICompositeTypeArray getEnumTypes() const
DebugEmissionKind getEmissionKind() const
bool isDebugDirectivesOnly() const
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t DWOId
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata * EnumTypes
StringRef getFlags() const
MDString * getRawProducer() const
DISourceLanguageName Metadata MDString * Producer
void replaceEnumTypes(DICompositeTypeArray N)
Replace arrays.
MDString * getRawSysRoot() const
DISourceLanguageName Metadata MDString bool MDString unsigned RuntimeVersion
static void getIfExists()=delete
bool getRangesBaseAddress() const
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata * RetainedTypes
DIMacroNodeArray getMacros() const
unsigned getRuntimeVersion() const
Metadata * getRawMacros() const
void replaceRetainedTypes(DITypeArray N)
static bool classof(const Metadata *MD)
DISourceLanguageName Metadata MDString bool MDString unsigned MDString * SplitDebugFilename
void replaceGlobalVariables(DIGlobalVariableExpressionArray N)
void replaceMacros(DIMacroNodeArray N)
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
bool getSplitDebugInlining() const
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata * ImportedEntities
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata * Macros
StringRef getSysRoot() const
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
MDString * getRawSDK() const
DISourceLanguageName Metadata MDString bool IsOptimized
DISourceLanguageName Metadata * File
MDString * getRawFlags() const
DIImportedEntityArray getImportedEntities() const
bool isDebugInfoForProfiling() const
Metadata * getRawEnumTypes() const
StringRef getProducer() const
void setDWOId(uint64_t DwoId)
friend class LLVMContextImpl
uint16_t getDialect() const
Target-specific language dialect for DWARF.
DIScopeArray getRetainedTypes() const
void replaceImportedEntities(DIImportedEntityArray N)
Metadata * getRawGlobalVariables() const
DIGlobalVariableExpressionArray getGlobalVariables() const
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool SplitDebugInlining
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned EmissionKind
DISourceLanguageName getSourceLanguage() const
Metadata * getRawImportedEntities() const
DISourceLanguageName Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t bool bool unsigned bool RangesBaseAddress
uint64_t getDWOId() const
StringRef getSplitDebugFilename() const
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t AlignInBits
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > EnumKind
Metadata * getRawVTableHolder() const
DIExpression * getRankExp() const
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
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
Metadata * getRawRank() const
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata * Elements
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned RuntimeLang
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
Metadata * getRawSpecification() const
DIExpression * getAssociatedExp() const
DIVariable * getAllocated() const
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString * Identifier
DIExpression * getDataLocationExp() const
Metadata * getRawDiscriminator() const
static LLVM_ABI DICompositeType * getODRTypeIfExists(LLVMContext &Context, MDString &Identifier)
DIVariable * getAssociated() const
DIDerivedType * getDiscriminator() const
DIVariable * getDataLocation() const
unsigned getRuntimeLang() const
DIType * getSpecification() const
Metadata * getRawElements() const
void replaceVTableHolder(DIType *VTableHolder)
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata MDString Metadata * Discriminator
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata Metadata * TemplateParams
StringRef getIdentifier() const
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t OffsetInBits
unsigned MDString Metadata unsigned Metadata * Scope
unsigned MDString Metadata * File
Metadata * getRawDataLocation() const
Metadata * getRawTemplateParams() const
unsigned MDString Metadata unsigned Metadata Metadata * BaseType
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Flags
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
DINodeArray getElements() const
DITemplateParameterArray getTemplateParams() const
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
Metadata * getRawAnnotations() const
Metadata * getRawAllocated() const
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint32_t uint64_t DIFlags Metadata unsigned std::optional< uint32_t > Metadata * VTableHolder
bool isNameSimplified() const
DIExpression * getAllocatedExp() const
friend class LLVMContextImpl
void replaceElements(DINodeArray Elements)
Replace operands.
ConstantInt * getBitStrideConst() const
std::optional< uint32_t > getEnumKind() const
unsigned MDString Metadata unsigned Metadata Metadata uint64_t SizeInBits
DIType * getVTableHolder() const
DINodeArray getAnnotations() const
Metadata * getRawAssociated() const
ConstantInt * getRankConst() const
void replaceTemplateParams(DITemplateParameterArray TemplateParams)
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
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
Metadata * getRawBitStride() const
Metadata * getRawBaseType() const
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
static bool classof(const Metadata *MD)
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
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
DIType * getBaseType() const
Metadata * getRawExtraData() const
unsigned StringRef DIFile unsigned DIScope DIType * BaseType
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata * OffsetInBits
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > std::optional< PtrAuthData > DIFlags Flags
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t AlignInBits
DINodeArray getAnnotations() const
Get annotations associated with this derived type.
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > std::optional< PtrAuthData > PtrAuthData
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.
DITemplateParameterArray getTemplateParams() const
Get the template parameters from a template alias.
unsigned StringRef DIFile * File
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > std::optional< PtrAuthData > DIFlags Metadata DINodeArray Annotations
DIObjCProperty * getObjCProperty() const
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > DWARFAddressSpace
unsigned StringRef DIFile unsigned DIScope * Scope
Metadata * getRawAnnotations() const
LLVM_ABI DIType * getClassType() const
Get casted version of extra data.
static bool classof(const Metadata *MD)
LLVM_ABI Constant * getConstant() const
friend class LLVMContextImpl
unsigned StringRef DIFile unsigned DIScope DIType Metadata * SizeInBits
LLVM_ABI Constant * getStorageOffsetInBits() const
LLVM_ABI Constant * getDiscriminantValue() const
LLVM_ABI uint32_t getVBPtrOffset() const
unsigned StringRef DIFile unsigned DIScope DIType Metadata uint32_t Metadata std::optional< unsigned > std::optional< PtrAuthData > DIFlags Metadata * ExtraData
unsigned StringRef DIFile unsigned Line
int64_t bool MDString APInt(64, Value, !IsUnsigned)
const APInt & getValue() const
int64_t bool MDString Name APInt bool MDString Name TempDIEnumerator clone() const
MDString * getRawName() const
StringRef getName() const
friend class LLVMContextImpl
DEFINE_MDNODE_GET(DIEnumerator,(int64_t Value, bool IsUnsigned, StringRef Name),(APInt(64, Value, !IsUnsigned), IsUnsigned, Name)) DEFINE_MDNODE_GET(DIEnumerator
static bool classof(const Metadata *MD)
int64_t bool MDString * Name
std::optional< DIExpression::ExprOperand > peekNext() const
Return the next operation.
std::optional< DIExpression::FragmentInfo > getFragmentInfo() const
Retrieve the fragment information, if any.
DIExpressionCursor(const DIExpressionCursor &)=default
DIExpressionCursor(const DIExpression *Expr)
DIExpression::expr_op_iterator end() const
std::optional< DIExpression::ExprOperand > peekNextN(unsigned N) const
std::optional< DIExpression::ExprOperand > peek() const
Return the current operation.
void consume(unsigned N)
Consume N operations.
std::optional< DIExpression::ExprOperand > take()
Consume one operation.
DIExpressionCursor(ArrayRef< uint64_t > Expr)
DIExpression::expr_op_iterator begin() const
void assignNewExpr(ArrayRef< uint64_t > Expr)
uint64_t getIndex() const
Return the location operand index.
static LLVM_ABI bool classof(const ExprOperand *Op)
uint64_t getValue() const
Return the unsigned constant value.
static LLVM_ABI bool classof(const ExprOperand *Op)
uint64_t getBitSize() const
Return the destination size in bits.
uint64_t getEncoding() const
Return the raw destination type encoding.
static LLVM_ABI bool classof(const ExprOperand *Op)
static LLVM_ABI bool classof(const ExprOperand *Op)
uint64_t getNumOperations() const
Return the number of operations the entry value covers.
A lightweight wrapper around an expression operand.
LLVM_ABI bool isNonEmitting() const
Return true if CodeGen handles this operand without adding bytes to the DWARF expression.
LLVM_ABI unsigned getSize() const
Return the size of the operand.
ExprOperand(const uint64_t *Op)
uint64_t getArg(unsigned I) const
Get an argument to the operand.
unsigned getNumArgs() const
bool is(uint64_t Opcode) const
Return true if this is Opcode.
uint64_t getOp() const
Get the operand code.
const uint64_t * get() const
void appendToVector(SmallVectorImpl< uint64_t > &V) const
Append the elements of this operand to V.
uint64_t getSizeInBits() const
Return the fragment size in bits.
static LLVM_ABI bool classof(const ExprOperand *Op)
uint64_t getOffsetInBits() const
Return the fragment offset in bits.
static LLVM_ABI bool classof(const ExprOperand *Op)
uint64_t getOffset() const
Return the unsigned offset.
static LLVM_ABI bool classof(const ExprOperand *Op)
uint64_t getTagOffset() const
Return the offset a memory tag is derived from.
An iterator for expression operands.
bool operator==(const expr_op_iterator &X) const
std::input_iterator_tag iterator_category
expr_op_iterator & operator++()
const ExprOperand * operator->() const
bool operator!=(const expr_op_iterator &X) const
expr_op_iterator(element_iterator I)
std::ptrdiff_t difference_type
element_iterator getBase() const
const ExprOperand & operator*() const
expr_op_iterator getNext() const
Get the next iterator.
expr_op_iterator operator++(int)
expr_op_iterator()=default
element_iterator elements_end() const
LLVM_ABI bool isEntryValue() const
Check if the expression consists of exactly one entry value operand.
iterator_range< expr_op_iterator > expr_ops() const
bool isFragment() const
Return whether this is a piece of an aggregate variable.
static LLVM_ABI DIExpression * append(const DIExpression *Expr, ArrayRef< uint64_t > Ops)
Append the opcodes Ops to DIExpr.
std::array< uint64_t, 6 > ExtOps
unsigned getNumElements() const
ArrayRef< uint64_t >::iterator element_iterator
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.
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
int fragmentCmp(const DIExpression *Other) const
Determine the relative position of the fragments described by this DIExpression and Other.
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
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
static bool fragmentsOverlap(const FragmentInfo &A, const FragmentInfo &B)
Check if fragments overlap between a pair of FragmentInfos.
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...
element_iterator elements_begin() const
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.
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.
static int fragmentCmp(const FragmentInfo &A, const FragmentInfo &B)
Determine the relative position of the fragments passed in.
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.
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
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)
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
uint64_t getElement(unsigned I) const
static LLVM_ABI bool extractLeadingOffset(ArrayRef< uint64_t > Ops, int64_t &OffsetInBytes, SmallVectorImpl< uint64_t > &RemainingOps)
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 std::optional< SignedOrUnsignedConstant > isConstant() const
Determine whether this represents a constant value, if so.
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 <DWARFAddress Space> 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.
static bool classof(const Metadata *MD)
MDString MDString * Directory
MDString MDString std::optional< ChecksumInfo< MDString * > > MDString * Source
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
static LLVM_ABI std::optional< ChecksumKind > getChecksumKind(StringRef CSKindStr)
ChecksumKind
Which algorithm (e.g.
friend class LLVMContextImpl
MDString MDString std::optional< ChecksumInfo< MDString * > > CS
static LLVM_ABI std::optional< FixedPointKind > getFixedPointKind(StringRef Str)
static LLVM_ABI const char * fixedPointKindString(FixedPointKind)
unsigned StringRef DIFile unsigned DIScope uint64_t uint32_t unsigned DIFlags unsigned int APInt Numerator
const APInt & getNumeratorRaw() const
static bool classof(const Metadata *MD)
unsigned StringRef DIFile unsigned LineNo
const APInt & getDenominator() const
unsigned StringRef DIFile unsigned DIScope uint64_t uint32_t unsigned Encoding
unsigned StringRef DIFile unsigned DIScope uint64_t uint32_t unsigned DIFlags unsigned int APInt APInt Denominator
unsigned StringRef DIFile unsigned DIScope uint64_t SizeInBits
unsigned StringRef DIFile unsigned DIScope uint64_t uint32_t AlignInBits
LLVM_ABI bool isSigned() const
unsigned StringRef DIFile unsigned DIScope uint64_t uint32_t unsigned DIFlags unsigned int Factor
@ FixedPointBinary
Scale factor 2^Factor.
@ FixedPointDecimal
Scale factor 10^Factor.
@ FixedPointRational
Arbitrary rational scale factor.
DEFINE_MDNODE_GET(DIFixedPointType,(unsigned Tag, MDString *Name, DIFile *File, unsigned LineNo, DIScope *Scope, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, DIFlags Flags, unsigned Kind, int Factor, APInt Numerator, APInt Denominator),(Tag, Name, File, LineNo, Scope, SizeInBits, AlignInBits, Encoding, Flags, Kind, Factor, Numerator, Denominator)) DEFINE_MDNODE_GET(DIFixedPointType
friend class LLVMContextImpl
FixedPointKind getKind() const
unsigned StringRef DIFile unsigned DIScope * Scope
unsigned StringRef DIFile unsigned DIScope uint64_t uint32_t unsigned DIFlags Flags
const APInt & getNumerator() const
unsigned StringRef DIFile * File
const APInt & getDenominatorRaw() const
Metadata * getRawLowerBound() const
Metadata * getRawCountNode() const
Metadata * getRawStride() const
LLVM_ABI BoundType getLowerBound() const
DEFINE_MDNODE_GET(DIGenericSubrange,(Metadata *CountNode, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride),(CountNode, LowerBound, UpperBound, Stride)) TempDIGenericSubrange clone() const
friend class LLVMContextImpl
Metadata * getRawUpperBound() const
static bool classof(const Metadata *MD)
LLVM_ABI BoundType getCount() const
LLVM_ABI BoundType getUpperBound() const
PointerUnion< DIVariable *, DIExpression * > BoundType
LLVM_ABI BoundType getStride() const
A pair of DIGlobalVariable and DIExpression.
DEFINE_MDNODE_GET(DIGlobalVariableExpression,(Metadata *Variable, Metadata *Expression),(Variable, Expression)) TempDIGlobalVariableExpression clone() const
Metadata * getRawExpression() const
DIGlobalVariable * getVariable() const
static bool classof(const Metadata *MD)
friend class LLVMContextImpl
Metadata * getRawVariable() const
DIExpression * getExpression() const
Metadata * getRawAnnotations() const
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata Metadata * TemplateParams
Metadata MDString MDString Metadata unsigned Metadata bool bool IsDefinition
Metadata MDString MDString Metadata unsigned Line
Metadata MDString MDString Metadata unsigned Metadata * Type
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata Metadata uint32_t Metadata * Annotations
DIDerivedType * getStaticDataMemberDeclaration() const
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
MDTuple * getTemplateParams() const
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata * StaticDataMemberDeclaration
bool isLocalToUnit() const
Metadata * getRawStaticDataMemberDeclaration() const
Metadata MDString MDString * LinkageName
friend class LLVMContextImpl
MDString * getRawLinkageName() const
StringRef getLinkageName() const
static bool classof(const Metadata *MD)
StringRef getDisplayName() const
bool isDefinition() const
Metadata MDString MDString Metadata * File
DINodeArray getAnnotations() const
Metadata MDString MDString Metadata unsigned Metadata bool IsLocalToUnit
Metadata * getRawTemplateParams() const
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata Metadata uint32_t AlignInBits
An imported module (C++ using directive or similar).
unsigned Metadata Metadata * Entity
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
unsigned Metadata Metadata Metadata unsigned MDString * Name
friend class LLVMContextImpl
unsigned Metadata Metadata Metadata * File
unsigned Metadata * Scope
Metadata MDString Metadata unsigned unsigned bool std::optional< unsigned > CoroSuspendIdx
Metadata MDString Metadata unsigned unsigned bool std::optional< unsigned > CoroSuspendIdx TempDILabel clone() const
StringRef getName() const
static bool classof(const Metadata *MD)
Metadata MDString Metadata unsigned unsigned Column
bool isArtificial() const
Metadata MDString Metadata unsigned unsigned bool IsArtificial
Metadata * getRawFile() const
unsigned getColumn() const
DILocalScope * getScope() const
Get the local scope for this label.
MDString * getRawName() const
std::optional< unsigned > getCoroSuspendIdx() const
Metadata MDString Metadata unsigned Line
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
bool isValidLocationForIntrinsic(const DILocation *DL) const
Check that a location is valid for this label.
Metadata * getRawScope() const
Metadata MDString Metadata * File
static bool classof(const Metadata *MD)
void replaceScope(DIScope *Scope)
~DILexicalBlockBase()=default
Metadata * getRawScope() const
LLVM_ABI DILexicalBlockBase(LLVMContext &C, unsigned ID, StorageType Storage, ArrayRef< Metadata * > Ops)
DILocalScope * getScope() const
Metadata Metadata unsigned Discriminator
static bool classof(const Metadata *MD)
unsigned getDiscriminator() const
friend class LLVMContextImpl
Metadata Metadata unsigned Discriminator TempDILexicalBlockFile clone() const
DEFINE_MDNODE_GET(DILexicalBlockFile,(DILocalScope *Scope, DIFile *File, unsigned Discriminator),(Scope, File, Discriminator)) DEFINE_MDNODE_GET(DILexicalBlockFile
Metadata Metadata unsigned unsigned Column
Metadata Metadata unsigned Line
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)
friend class LLVMContextImpl
unsigned getColumn() const
Metadata Metadata unsigned unsigned Column TempDILexicalBlock clone() const
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)
static bool classof(const Metadata *MD)
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 "...
Metadata MDString Metadata unsigned Metadata * Type
Metadata MDString Metadata * File
static bool classof(const Metadata *MD)
Metadata MDString Metadata unsigned Metadata unsigned DIFlags uint32_t Metadata Annotations TempDILocalVariable clone() const
DILocalScope * getScope() const
Get the local scope for this variable.
bool isObjectPointer() const
Metadata MDString Metadata unsigned Metadata unsigned Arg
DINodeArray getAnnotations() const
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
Metadata MDString Metadata unsigned Metadata unsigned DIFlags uint32_t Metadata * Annotations
Metadata MDString Metadata unsigned Metadata unsigned DIFlags uint32_t AlignInBits
friend class LLVMContextImpl
bool isValidLocationForIntrinsic(const DILocation *DL) const
Check that a location is valid for this variable.
Metadata * getRawAnnotations() const
bool isArtificial() const
unsigned unsigned DILocalScope * Scope
const DILocation * getWithoutAtom() const
static unsigned getDuplicationFactorFromDiscriminator(unsigned D)
Returns the duplication factor for a given encoded discriminator D, or 1 if no value or 0 is encoded.
static bool isPseudoProbeDiscriminator(unsigned Discriminator)
unsigned unsigned DILocalScope DILocation bool uint64_t AtomGroup
unsigned getDuplicationFactor() const
Returns the duplication factor stored in the discriminator, or 1 if no duplication factor (or 0) is e...
uint64_t getAtomGroup() const
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.
static LLVM_ABI std::optional< unsigned > encodeDiscriminator(unsigned BD, unsigned DF, unsigned CI)
Raw encoding of the discriminator.
unsigned unsigned DILocalScope DILocation bool ImplicitCode
Metadata * getRawScope() const
static LLVM_ABI void decodeDiscriminator(unsigned D, unsigned &BD, unsigned &DF, unsigned &CI)
Raw decoder for values in an encoded discriminator D.
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.
unsigned getBaseDiscriminator() const
Returns the base discriminator stored in the discriminator.
static unsigned getBaseDiscriminatorFromDiscriminator(unsigned D, bool IsFSDiscriminator=false)
Returns the base discriminator for a given encoded discriminator D.
Metadata * getRawInlinedAt() const
unsigned unsigned DILocalScope DILocation * InlinedAt
friend class LLVMContextImpl
static unsigned getMaskedDiscriminator(unsigned D, unsigned B)
Return the masked discriminator value for an input discrimnator value D (i.e.
const DILocation * cloneWithDiscriminator(unsigned Discriminator) const
Returns a new DILocation with updated Discriminator.
static unsigned getCopyIdentifierFromDiscriminator(unsigned D)
Returns the copy identifier for a given encoded discriminator D.
uint8_t getAtomRank() const
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...
static bool classof(const Metadata *MD)
unsigned getCopyIdentifier() const
Returns the copy identifier stored in the discriminator.
unsigned unsigned DILocalScope DILocation bool uint64_t uint8_t AtomRank
unsigned unsigned Metadata * File
Metadata * getRawElements() const
DEFINE_MDNODE_GET(DIMacroFile,(unsigned MIType, unsigned Line, DIFile *File, DIMacroNodeArray Elements),(MIType, Line, File, Elements)) DEFINE_MDNODE_GET(DIMacroFile
unsigned unsigned Metadata Metadata * Elements
Metadata * getRawFile() const
static bool classof(const Metadata *MD)
friend class LLVMContextImpl
void replaceElements(DIMacroNodeArray Elements)
unsigned unsigned Metadata Metadata Elements TempDIMacroFile clone() const
DIMacroNodeArray getElements() const
DIMacroNode(LLVMContext &C, unsigned ID, StorageType Storage, unsigned MIType, ArrayRef< Metadata * > Ops1, ArrayRef< Metadata * > Ops2={})
unsigned getMacinfoType() const
StringRef getStringOperand(unsigned I) const
static bool classof(const Metadata *MD)
static MDString * getCanonicalMDString(LLVMContext &Context, StringRef S)
friend class LLVMContextImpl
Ty * getOperandAs(unsigned I) const
MDString * getRawName() const
unsigned unsigned MDString MDString Value TempDIMacro clone() const
unsigned unsigned MDString MDString * Value
unsigned unsigned MDString * Name
StringRef getName() const
MDString * getRawValue() const
friend class LLVMContextImpl
DEFINE_MDNODE_GET(DIMacro,(unsigned MIType, unsigned Line, StringRef Name, StringRef Value=""),(MIType, Line, Name, Value)) DEFINE_MDNODE_GET(DIMacro
StringRef getValue() const
static bool classof(const Metadata *MD)
Represents a module in the programming language, for example, a Clang module, or a Fortran module.
Metadata Metadata * Scope
Metadata Metadata MDString * Name
Metadata Metadata MDString MDString MDString MDString * APINotesFile
Metadata Metadata MDString MDString MDString * IncludePath
Metadata Metadata MDString MDString * ConfigurationMacros
friend class LLVMContextImpl
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
Metadata MDString bool ExportSymbols TempDINamespace clone() const
static bool classof(const Metadata *MD)
DEFINE_MDNODE_GET(DINamespace,(DIScope *Scope, StringRef Name, bool ExportSymbols),(Scope, Name, ExportSymbols)) DEFINE_MDNODE_GET(DINamespace
DIScope * getScope() const
Metadata MDString bool ExportSymbols
StringRef getName() const
MDString * getRawName() const
friend class LLVMContextImpl
bool getExportSymbols() const
Metadata * getRawScope() const
Tagged DWARF-like metadata node.
LLVM_ABI dwarf::Tag getTag() const
static MDString * getCanonicalMDString(LLVMContext &Context, StringRef S)
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.
DINode(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef< Metadata * > Ops1, ArrayRef< Metadata * > Ops2={})
StringRef getStringOperand(unsigned I) const
Ty * getOperandAs(unsigned I) const
friend class LLVMContextImpl
static bool classof(const Metadata *MD)
static LLVM_ABI StringRef getFlagString(DIFlags Flag)
MDString Metadata unsigned MDString MDString unsigned Metadata Type TempDIObjCProperty clone() const
unsigned getAttributes() const
StringRef getFilename() const
MDString * getRawName() const
StringRef getDirectory() const
MDString * getRawSetterName() const
Metadata * getRawType() const
StringRef getGetterName() const
MDString Metadata unsigned MDString MDString unsigned Metadata * Type
static bool classof(const Metadata *MD)
MDString * getRawGetterName() const
Metadata * getRawFile() const
friend class LLVMContextImpl
MDString Metadata unsigned MDString * GetterName
MDString Metadata unsigned MDString MDString * SetterName
StringRef getName() const
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
A property of a class or structure.
MDString Metadata unsigned Metadata * Type
MDString Metadata unsigned Metadata Metadata BackingStorage TempDIProperty clone() const
static bool classof(const Metadata *MD)
Metadata * getRawFile() const
StringRef getFilename() const
DINode * getBackingStorage() const
The data member holding the property's backing storage, i.e.
Metadata * getRawType() const
MDString Metadata unsigned Metadata Metadata * BackingStorage
friend class LLVMContextImpl
StringRef getDirectory() const
MDString * getRawName() const
StringRef getName() const
DEFINE_MDNODE_GET(DIProperty,(StringRef Name, DIFile *File, unsigned Line, DIType *Type, DINode *BackingStorage),(Name, File, Line, Type, BackingStorage)) DEFINE_MDNODE_GET(DIProperty
Metadata * getRawBackingStorage() const
Base class for scope-like contexts.
StringRef getFilename() const
LLVM_ABI StringRef getName() const
static bool classof(const Metadata *MD)
StringRef getDirectory() const
std::optional< StringRef > getSource() const
LLVM_ABI DIScope * getScope() const
Metadata * getRawFile() const
Return the raw underlying file.
DIScope(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef< Metadata * > Ops)
Wrapper structure that holds source language identity metadata that includes language name,...
uint16_t getUnversionedName() const
Transitional API for cases where we do not yet support versioned source language names.
uint32_t getVersion() const
Returns language version. Only valid for versioned language names.
uint16_t getDialect() const
bool hasVersionedName() const
DISourceLanguageName(uint16_t Lang, uint16_t Dialect=0)
DISourceLanguageName(uint16_t Lang, uint32_t Version, uint16_t Dialect=0)
uint16_t getName() const
Returns a versioned or unversioned language name.
String type, Fortran CHARACTER(n)
unsigned MDString Metadata Metadata Metadata uint64_t SizeInBits
unsigned getEncoding() const
unsigned MDString Metadata Metadata Metadata uint64_t uint32_t AlignInBits
static bool classof(const Metadata *MD)
unsigned MDString Metadata Metadata Metadata * StringLocationExp
unsigned MDString Metadata Metadata Metadata uint64_t uint32_t unsigned Encoding unsigned MDString Metadata Metadata Metadata Metadata uint32_t unsigned Encoding TempDIStringType clone() const
DIExpression * getStringLengthExp() const
unsigned MDString Metadata Metadata * StringLengthExp
Metadata * getRawStringLengthExp() const
unsigned MDString Metadata Metadata Metadata uint64_t uint32_t unsigned Encoding
friend class LLVMContextImpl
Metadata * getRawStringLength() const
DIVariable * getStringLength() const
DIExpression * getStringLocationExp() const
unsigned MDString Metadata * StringLength
Metadata * getRawStringLocationExp() const
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.
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata * Unit
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata Metadata Metadata MDString bool UsesKeyInstructions
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata Metadata Metadata * Annotations
void forEachRetainedNode(FuncLVT &&FuncLV, FuncLabelT &&FuncLabel, FuncImportedEntityT &&FuncIE, FuncTypeT &&FuncType, FuncGVET &&FuncGVE)
For each retained node, applies one of the given functions depending on the type of a node.
LLVM_ABI void cleanupRetainedNodes()
When IR modules are merged, typically during LTO, the merged module may contain several types having ...
Metadata MDString MDString Metadata unsigned Metadata unsigned ScopeLine
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags SPFlags
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata * ContainingType
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata * TemplateParams
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata * Declaration
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, MDNodeArray 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 DILocalScope * getRetainedNodeScope(MDNode *N)
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata Metadata Metadata MDString * TargetFuncName
static LLVM_ABI DISPFlags toSPFlags(bool IsLocalToUnit, bool IsDefinition, bool IsOptimized, unsigned Virtuality=SPFlagNonvirtual, bool IsMainSubprogram=false)
static void cleanupRetainedNodes(const RangeT &NewDistinctSPs)
Calls SP->cleanupRetainedNodes() for a range of DISubprograms.
static LLVM_ABI const DIScope * getRawRetainedNodeScope(const MDNode *N)
void cleanupRetainedNodesIf(T &&Pred)
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata Metadata * ThrownTypes
friend class LLVMContextImpl
static LLVM_ABI DISPFlags getFlag(StringRef Flag)
Metadata MDString MDString Metadata * File
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned VirtualIndex
static LLVM_ABI DISPFlags splitFlags(DISPFlags Flags, SmallVectorImpl< DISPFlags > &SplitFlags)
Split up a flags bitfield for easier printing.
static bool classof(const Metadata *MD)
Metadata MDString MDString * LinkageName
static LLVM_ABI StringRef getFlagString(DISPFlags Flag)
Metadata MDString MDString Metadata unsigned Metadata * Type
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int DIFlags DISPFlags Metadata Metadata Metadata Metadata * RetainedNodes
DISPFlags
Debug info subprogram flags.
Metadata MDString MDString Metadata unsigned Metadata unsigned Metadata unsigned int ThisAdjustment
LLVM_ABI bool describes(const Function *F) const
Check if this subprogram describes the given function.
StringRef DIFile unsigned Line
Metadata * getRawUpperBound() const
BoundType getLowerBound() const
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata Metadata * UpperBound
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType * BaseType
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata Metadata Metadata Metadata * Bias
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata Metadata Metadata * Stride
StringRef DIFile unsigned DIScope uint64_t SizeInBits
static bool classof(const Metadata *MD)
BoundType getBias() const
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
Metadata * getRawBaseType() const
PointerUnion< ConstantInt *, DIVariable *, DIExpression *, DIDerivedType * > BoundType
StringRef DIFile unsigned DIScope * Scope
BoundType getUpperBound() const
DIType * getBaseType() const
Get the base type this is derived from.
friend class LLVMContextImpl
BoundType getStride() const
Metadata * getRawLowerBound() const
StringRef DIFile unsigned DIScope uint64_t uint32_t AlignInBits
Metadata * getRawStride() const
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata * LowerBound
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags Flags
StringRef DIFile unsigned DIScope uint64_t uint32_t DIFlags DIType Metadata Metadata Metadata Metadata Bias TempDISubrangeType clone() const
static bool classof(const Metadata *MD)
LLVM_ABI BoundType getUpperBound() const
LLVM_ABI BoundType getStride() const
LLVM_ABI BoundType getLowerBound() const
DEFINE_MDNODE_GET(DISubrange,(int64_t Count, int64_t LowerBound=0),(Count, LowerBound)) DEFINE_MDNODE_GET(DISubrange
friend class LLVMContextImpl
LLVM_ABI BoundType getCount() const
Metadata int64_t LowerBound
Type array for a subprogram.
DITypeArray getTypeArray() const
TempDISubroutineType cloneWithCC(uint8_t CC) const
DEFINE_MDNODE_GET(DISubroutineType,(DIFlags Flags, uint8_t CC, DITypeArray TypeArray),(Flags, CC, TypeArray)) DEFINE_MDNODE_GET(DISubroutineType
DIFlags uint8_t Metadata * TypeArray
static bool classof(const Metadata *MD)
friend class LLVMContextImpl
Metadata * getRawTypeArray() const
DIFlags uint8_t Metadata TypeArray TempDISubroutineType clone() const
Metadata * getRawType() const
static bool classof(const Metadata *MD)
DITemplateParameter(LLVMContext &Context, unsigned ID, StorageType Storage, unsigned Tag, bool IsDefault, ArrayRef< Metadata * > Ops)
StringRef getName() const
MDString * getRawName() const
~DITemplateParameter()=default
MDString Metadata bool IsDefault
DEFINE_MDNODE_GET(DITemplateTypeParameter,(StringRef Name, DIType *Type, bool IsDefault),(Name, Type, IsDefault)) DEFINE_MDNODE_GET(DITemplateTypeParameter
MDString Metadata bool IsDefault TempDITemplateTypeParameter clone() const
static bool classof(const Metadata *MD)
friend class LLVMContextImpl
unsigned MDString Metadata bool Metadata Value TempDITemplateValueParameter clone() const
unsigned MDString Metadata * Type
static bool classof(const Metadata *MD)
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
unsigned MDString Metadata bool IsDefault
friend class LLVMContextImpl
unsigned MDString Metadata bool Metadata * Value
bool isLittleEndian() const
static constexpr unsigned N_OPERANDS
uint32_t getNumExtraInhabitants() const
bool isLValueReference() const
bool isStaticMember() const
TempDIType cloneWithFlags(DIFlags NewFlags) const
Returns a new temporary DIType with updated Flags.
bool isObjcClassComplete() const
MDString * getRawName() const
bool isAppleBlockExtension() const
uint64_t getOffsetInBits() const
bool isObjectPointer() const
Metadata * getRawScope() const
StringRef getName() const
bool isForwardDecl() const
bool isTypePassByValue() const
uint64_t getSizeInBits() const
static bool classof(const Metadata *MD)
DIType(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, unsigned Line, uint32_t AlignInBits, uint32_t NumExtraInhabitants, DIFlags Flags, ArrayRef< Metadata * > Ops)
uint32_t getAlignInBytes() const
void mutate(unsigned Tag, unsigned Line, uint32_t AlignInBits, uint32_t NumExtraInhabitants, DIFlags Flags)
Change fields in place.
void init(unsigned Line, uint32_t AlignInBits, uint32_t NumExtraInhabitants, DIFlags Flags)
LLVM_ABI uint32_t getAlignInBits() const
Metadata * getRawSizeInBits() const
bool isRValueReference() const
bool isArtificial() const
bool getExportSymbols() const
DIScope * getScope() const
bool isTypePassByReference() const
Metadata * getRawOffsetInBits() const
Base class for variables.
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...
uint32_t getAlignInBits() const
MDString * getRawName() const
uint32_t getAlignInBytes() const
DIScope * getScope() const
StringRef getDirectory() const
LLVM_ABI std::optional< uint64_t > getSizeInBits() const
Determines the size of the variable's type.
Metadata * getRawFile() const
std::optional< StringRef > getSource() const
StringRef getFilename() const
Metadata * getRawType() const
static bool classof(const Metadata *MD)
LLVM_ABI DIVariable(LLVMContext &C, unsigned ID, StorageType Storage, signed Line, ArrayRef< Metadata * > Ops, uint32_t AlignInBits=0)
StringRef getName() const
Metadata * getRawScope() const
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).
LLVM_ABI DebugVariableAggregate(const DbgVariableRecord *DVR)
DebugVariableAggregate(const DebugVariable &V)
Identifies a unique instance of a variable.
static bool isDefaultFragment(const FragmentInfo F)
DebugVariable(const DILocalVariable *Var, const DIExpression *DIExpr, const DILocation *InlinedAt)
const DILocation * getInlinedAt() const
bool operator<(const DebugVariable &Other) const
DebugVariable(const DILocalVariable *Var, std::optional< FragmentInfo > FragmentInfo, const DILocation *InlinedAt)
bool operator==(const DebugVariable &Other) const
FragmentInfo getFragmentOrDefault() const
std::optional< FragmentInfo > getFragment() const
const DILocalVariable * getVariable() const
LLVM_ABI DebugVariable(const DbgVariableRecord *DVR)
Class representing an expression and its matching format.
Generic tagged DWARF-like metadata node.
static bool classof(const Metadata *MD)
unsigned MDString ArrayRef< Metadata * > DwarfOps TempGenericDINode clone() const
Return a (temporary) clone of this.
LLVM_ABI dwarf::Tag getTag() const
StringRef getHeader() const
MDString * getRawHeader() const
const MDOperand & getDwarfOperand(unsigned I) const
unsigned getNumDwarfOperands() const
op_iterator dwarf_op_end() const
op_iterator dwarf_op_begin() const
friend class LLVMContextImpl
unsigned MDString * Header
op_range dwarf_operands() const
DEFINE_MDNODE_GET(GenericDINode,(unsigned Tag, StringRef Header, ArrayRef< Metadata * > DwarfOps),(Tag, Header, DwarfOps)) DEFINE_MDNODE_GET(GenericDINode
void replaceDwarfOperandWith(unsigned I, Metadata *New)
unsigned MDString ArrayRef< Metadata * > DwarfOps
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 bits of the poi...
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.
Represent a constant reference to a string, i.e.
constexpr bool empty() const
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.
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)
@ LLVM_MARK_AS_BITMASK_ENUM
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - 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)
static const DIScope * getScope(const NodeT *N)
auto dyn_cast_or_null(const Y &Val)
static unsigned getBaseFSBitEnd()
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
bool isa(const From &Val)
isa<X> - 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.
static unsigned getN1Bits(int N)
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Count
DWARFExpression::Operation Op
ArrayRef(const T &OneElt) -> ArrayRef< T >
decltype(auto) cast(const From &Val)
cast<X> - 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.
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Next
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.
static To doCast(const From &Op)
This struct provides a method for customizing the way a cast is performed.
This struct provides a way to check if a given cast is possible.
Pointer authentication (__ptrauth) metadata.
bool authenticatesNullValues()
PtrAuthData(unsigned FromRawData)
bool isAddressDiscriminated()
PtrAuthData(unsigned Key, bool IsDiscr, unsigned Discriminator, bool IsaPointer, bool AuthenticatesNullValues)
unsigned extraDiscriminator()
A single checksum, represented by a Kind and a Value (a string).
bool operator==(const ChecksumInfo< T > &X) const
T Value
The string value of the checksum.
ChecksumKind Kind
The kind of checksum which Value encodes.
ChecksumInfo(ChecksumKind Kind, T Value)
bool operator!=(const ChecksumInfo< T > &X) const
StringRef getKindAsString() const
This cast trait just provides the default implementation of doCastIfPossible to make CastInfo special...
DIExpression::FragmentInfo FragInfo
static bool isEqual(const FragInfo &A, const FragInfo &B)
static const uint64_t MaxVal
static unsigned getHashValue(const FragInfo &Frag)
static unsigned getHashValue(const DebugVariable &D)
DIExpression::FragmentInfo FragmentInfo
static bool isEqual(const DebugVariable &A, const DebugVariable &B)
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)
static bool isPresent(const DIExpression::ExprOperand &Op)
static DIExpression::ExprOperand & unwrapValue(DIExpression::ExprOperand &Op)
DIExpression::ExprOperand UnwrappedType
ValueIsPresent provides a way to check if a value is, well, present.