14 #ifndef LLVM_IR_DEBUGINFOMETADATA_H
15 #define LLVM_IR_DEBUGINFOMETADATA_H
21 #define DEFINE_MDNODE_GET_UNPACK_IMPL(...) __VA_ARGS__
22 #define DEFINE_MDNODE_GET_UNPACK(ARGS) DEFINE_MDNODE_GET_UNPACK_IMPL ARGS
23 #define DEFINE_MDNODE_GET(CLASS, FORMAL, ARGS) \
24 static CLASS *get(LLVMContext &Context, DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
25 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued); \
27 static CLASS *getIfExists(LLVMContext &Context, \
28 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
29 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued, \
32 static CLASS *getDistinct(LLVMContext &Context, \
33 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
34 return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Distinct); \
36 static Temp##CLASS getTemporary(LLVMContext &Context, \
37 DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \
39 getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Temporary)); \
58 assert((!MD || isa<MDString>(MD) || isa<T>(MD)) &&
"Expected valid ref");
64 typename std::enable_if<std::is_convertible<U *, T *>::value>::type * =
78 template <
class MapTy>
T *
resolve(
const MapTy &Map)
const {
82 if (
auto *Typed = dyn_cast<T>(MD))
83 return const_cast<T *
>(Typed);
85 auto *S = cast<MDString>(MD);
87 assert(I != Map.end() &&
"Missing identifier in type map");
88 return cast<T>(I->second);
102 explicit operator bool()
const {
return get(); }
103 explicit operator MDTuple *()
const {
return get(); }
113 class iterator : std::iterator<std::input_iterator_tag, DITypeRef,
114 std::ptrdiff_t, void, DITypeRef> {
151 :
MDNode(C, ID, Storage, Ops1, Ops2) {
152 assert(Tag < 1u << 16);
162 if (
auto *S = getOperandAs<MDString>(I))
163 return S->getString();
181 #define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = ID,
182 #include "llvm/IR/DebugInfoFlags.def"
257 void recalculateHash();
259 static GenericDINode *getImpl(LLVMContext &
Context,
unsigned Tag,
263 DwarfOps, Storage, ShouldCreate);
266 static GenericDINode *getImpl(LLVMContext &Context,
unsigned Tag,
267 MDString *Header, ArrayRef<Metadata *> DwarfOps,
270 TempGenericDINode cloneImpl()
const {
281 (Tag, Header, DwarfOps))
284 (Tag, Header, DwarfOps))
287 TempGenericDINode
clone()
const {
return cloneImpl(); }
325 Count(Count), LowerBound(LowerBound) {}
330 bool ShouldCreate =
true);
332 TempDISubrange cloneImpl()
const {
340 TempDISubrange
clone()
const {
return cloneImpl(); }
368 bool ShouldCreate =
true) {
372 static DIEnumerator *getImpl(LLVMContext &Context, int64_t Value,
374 bool ShouldCreate =
true);
376 TempDIEnumerator cloneImpl()
const {
386 TempDIEnumerator
clone()
const {
return cloneImpl(); }
408 :
DINode(C, ID, Storage, Tag, Ops) {}
427 return isa<DIFile>(
this) ? const_cast<DIScope *>(
this)
467 bool ShouldCreate =
true) {
472 static DIFile *getImpl(LLVMContext &Context, MDString *Filename,
474 bool ShouldCreate =
true);
476 TempDIFile cloneImpl()
const {
482 (Filename, Directory))
484 (Filename, Directory))
486 TempDIFile
clone()
const {
return cloneImpl(); }
501 return F->getFilename();
507 return F->getDirectory();
520 uint64_t AlignInBits;
521 uint64_t OffsetInBits;
525 unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits,
527 :
DIScope(C, ID, Storage, Tag, Ops), Line(Line), Flags(Flags),
528 SizeInBits(SizeInBits), AlignInBits(AlignInBits),
529 OffsetInBits(OffsetInBits) {}
551 assert(!
isUniqued() &&
"Cannot set flags on uniqued nodes");
571 return getFlags() & FlagObjcClassComplete;
608 Encoding(Encoding) {}
616 SizeInBits, AlignInBits, Encoding, Storage, ShouldCreate);
618 static DIBasicType *getImpl(LLVMContext &Context,
unsigned Tag,
619 MDString *Name, uint64_t SizeInBits,
620 uint64_t AlignInBits,
unsigned Encoding,
623 TempDIBasicType cloneImpl()
const {
630 (Tag, Name, 0, 0, 0))
633 uint64_t AlignInBits,
unsigned Encoding),
634 (Tag, Name, SizeInBits, AlignInBits, Encoding))
636 (
unsigned Tag,
MDString *Name, uint64_t SizeInBits,
637 uint64_t AlignInBits,
unsigned Encoding),
638 (Tag, Name, SizeInBits, AlignInBits, Encoding))
640 TempDIBasicType
clone()
const {
return cloneImpl(); }
655 unsigned Tag,
unsigned Line, uint64_t SizeInBits,
656 uint64_t AlignInBits, uint64_t OffsetInBits,
unsigned Flags,
658 :
DIType(C, ID, Storage, Tag, Line, SizeInBits, AlignInBits, OffsetInBits,
684 unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits,
687 AlignInBits, OffsetInBits, Flags, Ops) {}
693 uint64_t SizeInBits, uint64_t AlignInBits,
696 bool ShouldCreate =
true) {
698 Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits,
699 Flags, ExtraData, Storage, ShouldCreate);
701 static DIDerivedType *getImpl(LLVMContext &Context,
unsigned Tag,
702 MDString *Name,
Metadata *File,
unsigned Line,
704 uint64_t SizeInBits, uint64_t AlignInBits,
705 uint64_t OffsetInBits,
unsigned Flags,
707 bool ShouldCreate =
true);
709 TempDIDerivedType cloneImpl()
const {
718 (
unsigned Tag, MDString *Name,
Metadata *File,
720 uint64_t SizeInBits, uint64_t AlignInBits,
721 uint64_t OffsetInBits,
unsigned Flags,
723 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
724 AlignInBits, OffsetInBits, Flags, ExtraData))
728 uint64_t AlignInBits, uint64_t OffsetInBits,
729 unsigned Flags,
Metadata *ExtraData =
nullptr),
730 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
731 AlignInBits, OffsetInBits, Flags, ExtraData))
733 TempDIDerivedType
clone()
const {
return cloneImpl(); }
742 Metadata *getExtraData()
const {
return getRawExtraData(); }
748 assert(
getTag() == dwarf::DW_TAG_ptr_to_member_type);
751 DIObjCProperty *getObjCProperty()
const {
752 return dyn_cast_or_null<DIObjCProperty>(getExtraData());
756 if (
auto *
C = cast_or_null<ConstantAsMetadata>(getExtraData()))
757 return C->getValue();
771 unsigned RuntimeLang;
775 unsigned Tag,
unsigned Line,
unsigned RuntimeLang,
776 uint64_t SizeInBits, uint64_t AlignInBits,
777 uint64_t OffsetInBits,
unsigned Flags,
780 OffsetInBits, Flags, Ops),
781 RuntimeLang(RuntimeLang) {}
791 assert(!isa<DISubroutineType>(
this) &&
"no elements for DISubroutineType");
815 assert(std::find(Elements->op_begin(), Elements->op_end(), Op) &&
816 "Lost a member during member list replacement");
843 unsigned Line,
unsigned RuntimeLang, uint64_t SizeInBits,
844 uint64_t AlignInBits, uint64_t OffsetInBits,
unsigned Flags,
847 RuntimeLang, SizeInBits, AlignInBits, OffsetInBits,
854 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
860 BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements.
get(),
864 static DICompositeType *
865 getImpl(LLVMContext &Context,
unsigned Tag, MDString *Name,
Metadata *File,
867 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
868 unsigned Flags,
Metadata *Elements,
unsigned RuntimeLang,
870 MDString *Identifier,
StorageType Storage,
bool ShouldCreate =
true);
872 TempDICompositeType cloneImpl()
const {
882 (
unsigned Tag, StringRef Name, DIFile *File,
unsigned Line,
884 uint64_t AlignInBits, uint64_t OffsetInBits,
885 unsigned Flags, DINodeArray Elements,
unsigned RuntimeLang,
887 DITemplateParameterArray TemplateParams =
nullptr,
888 StringRef Identifier =
""),
889 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
890 AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang,
891 VTableHolder, TemplateParams, Identifier))
895 uint64_t SizeInBits, uint64_t AlignInBits,
896 uint64_t OffsetInBits,
unsigned Flags,
Metadata *Elements,
897 unsigned RuntimeLang,
Metadata *VTableHolder,
900 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
901 AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang,
902 VTableHolder, TemplateParams, Identifier))
904 TempDICompositeType
clone()
const {
return cloneImpl(); }
913 if (
auto *Composite = dyn_cast<DICompositeType>(N))
914 if (
auto *S = Composite->getRawIdentifier())
930 dwarf::DW_TAG_subroutine_type, 0, 0, 0, 0, 0, Flags,
937 bool ShouldCreate =
true) {
938 return getImpl(Context, Flags, TypeArray.
get(),
Storage, ShouldCreate);
940 static DISubroutineType *getImpl(LLVMContext &Context,
unsigned Flags,
942 bool ShouldCreate =
true);
944 TempDISubroutineType cloneImpl()
const {
950 (
unsigned Flags, DITypeRefArray TypeArray),
955 TempDISubroutineType
clone()
const {
return cloneImpl(); }
974 unsigned RuntimeVersion;
975 unsigned EmissionKind;
979 bool IsOptimized,
unsigned RuntimeVersion,
982 SourceLanguage(SourceLanguage), IsOptimized(IsOptimized),
983 RuntimeVersion(RuntimeVersion), EmissionKind(EmissionKind),
991 unsigned EmissionKind, DICompositeTypeArray
EnumTypes,
996 return getImpl(Context, SourceLanguage, File,
1000 EmissionKind, EnumTypes.get(), RetainedTypes.get(),
1001 Subprograms.get(), GlobalVariables.get(),
1002 ImportedEntities.get(), DWOId,
Storage, ShouldCreate);
1004 static DICompileUnit *
1005 getImpl(LLVMContext &Context,
unsigned SourceLanguage,
Metadata *File,
1006 MDString *Producer,
bool IsOptimized, MDString *Flags,
1007 unsigned RuntimeVersion, MDString *SplitDebugFilename,
1011 bool ShouldCreate =
true);
1013 TempDICompileUnit cloneImpl()
const {
1023 (
unsigned SourceLanguage, DIFile *File, StringRef Producer,
1024 bool IsOptimized, StringRef Flags,
unsigned RuntimeVersion,
1025 StringRef SplitDebugFilename,
unsigned EmissionKind,
1026 DICompositeTypeArray EnumTypes, DITypeArray RetainedTypes,
1027 DISubprogramArray Subprograms,
1028 DIGlobalVariableArray GlobalVariables,
1029 DIImportedEntityArray ImportedEntities, uint64_t DWOId),
1030 (SourceLanguage, File, Producer, IsOptimized, Flags,
1031 RuntimeVersion, SplitDebugFilename, EmissionKind,
1032 EnumTypes, RetainedTypes, Subprograms, GlobalVariables,
1033 ImportedEntities, DWOId))
1037 bool IsOptimized,
MDString *Flags,
unsigned RuntimeVersion,
1041 (SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion,
1042 SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, Subprograms,
1043 GlobalVariables, ImportedEntities, DWOId))
1045 TempDICompileUnit
clone()
const {
return cloneImpl(); }
1074 return getOperandAs<MDString>(3);
1119 :
DIScope(C, ID, Storage, Tag, Ops) {}
1150 bool ShouldCreate =
true);
1154 bool ShouldCreate =
true) {
1155 return getImpl(Context, Line, Column, static_cast<Metadata *>(Scope),
1156 static_cast<Metadata *>(InlinedAt), Storage, ShouldCreate);
1159 TempDILocation cloneImpl()
const {
1165 void replaceOperandWith(
unsigned I,
Metadata *New) =
delete;
1169 (
unsigned Line,
unsigned Column,
Metadata *Scope,
1171 (Line, Column, Scope, InlinedAt))
1174 DILocation *InlinedAt =
nullptr),
1175 (Line, Column, Scope, InlinedAt))
1178 TempDILocation
clone()
const {
return cloneImpl(); }
1182 DILocalScope *getScope()
const {
return cast<DILocalScope>(
getRawScope()); }
1183 DILocation *getInlinedAt()
const {
1187 DIFile *getFile()
const {
return getScope()->getFile(); }
1188 StringRef getFilename()
const {
return getScope()->getFilename(); }
1189 StringRef getDirectory()
const {
return getScope()->getDirectory(); }
1195 DILocalScope *getInlinedAtScope()
const {
1196 if (
auto *IA = getInlinedAt())
1197 return IA->getInlinedAtScope();
1214 bool canDiscriminate(
const DILocation &RHS)
const {
1215 return getFilename() != RHS.getFilename() || getLine() != RHS.getLine();
1222 inline unsigned getDiscriminator()
const;
1255 unsigned Virtuality;
1256 unsigned VirtualIndex;
1263 unsigned ScopeLine,
unsigned Virtuality,
unsigned VirtualIndex,
1264 unsigned Flags,
bool IsLocalToUnit,
bool IsDefinition,
1268 Line(Line), ScopeLine(ScopeLine), Virtuality(Virtuality),
1269 VirtualIndex(VirtualIndex), Flags(Flags), IsLocalToUnit(IsLocalToUnit),
1270 IsDefinition(IsDefinition), IsOptimized(IsOptimized) {}
1278 unsigned VirtualIndex,
unsigned Flags,
bool IsOptimized,
1284 IsLocalToUnit, IsDefinition, ScopeLine, ContainingType,
1285 Virtuality, VirtualIndex, Flags, IsOptimized,
1290 static DISubprogram *
1291 getImpl(LLVMContext &Context,
Metadata *Scope, MDString *Name,
1293 bool IsLocalToUnit,
bool IsDefinition,
unsigned ScopeLine,
1294 Metadata *ContainingType,
unsigned Virtuality,
unsigned VirtualIndex,
1295 unsigned Flags,
bool IsOptimized,
Metadata *Function,
1299 TempDISubprogram cloneImpl()
const {
1302 isDefinition(), getScopeLine(), getContainingType(),
1304 isOptimized(), getFunctionConstant(),
1310 (
DIScopeRef Scope, StringRef Name, StringRef LinkageName,
1311 DIFile *File,
unsigned Line, DISubroutineType *Type,
1312 bool IsLocalToUnit,
bool IsDefinition,
unsigned ScopeLine,
1313 DITypeRef ContainingType,
unsigned Virtuality,
1314 unsigned VirtualIndex,
unsigned Flags,
bool IsOptimized,
1316 DITemplateParameterArray TemplateParams =
nullptr,
1317 DISubprogram *Declaration =
nullptr,
1318 DILocalVariableArray Variables =
nullptr),
1319 (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit,
1320 IsDefinition, ScopeLine, ContainingType, Virtuality,
1321 VirtualIndex, Flags, IsOptimized, Function, TemplateParams,
1322 Declaration, Variables))
1326 unsigned Line,
Metadata *Type,
bool IsLocalToUnit,
bool IsDefinition,
1327 unsigned ScopeLine,
Metadata *ContainingType,
unsigned Virtuality,
1328 unsigned VirtualIndex,
unsigned Flags,
bool IsOptimized,
1331 (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition,
1332 ScopeLine, ContainingType, Virtuality, VirtualIndex, Flags, IsOptimized,
1333 Function, TemplateParams, Declaration, Variables))
1335 TempDISubprogram
clone()
const {
return cloneImpl(); }
1338 unsigned getLine()
const {
return Line; }
1340 unsigned getVirtualIndex()
const {
return VirtualIndex; }
1341 unsigned getScopeLine()
const {
return ScopeLine; }
1342 unsigned getFlags()
const {
return Flags; }
1343 bool isLocalToUnit()
const {
return IsLocalToUnit; }
1344 bool isDefinition()
const {
return IsDefinition; }
1345 bool isOptimized()
const {
return IsOptimized; }
1347 unsigned isArtificial()
const {
return getFlags() & FlagArtificial; }
1348 bool isPrivate()
const {
1351 bool isProtected()
const {
1354 bool isPublic()
const {
1357 bool isExplicit()
const {
return getFlags() & FlagExplicit; }
1358 bool isPrototyped()
const {
return getFlags() & FlagPrototyped; }
1364 unsigned isLValueReference()
const {
1365 return getFlags() & FlagLValueReference;
1372 unsigned isRValueReference()
const {
1373 return getFlags() & FlagRValueReference;
1382 MDString *getRawName()
const {
return getOperandAs<MDString>(2); }
1383 MDString *getRawLinkageName()
const {
return getOperandAs<MDString>(4); }
1385 DISubroutineType *
getType()
const {
1386 return cast_or_null<DISubroutineType>(getRawType());
1389 return DITypeRef(getRawContainingType());
1392 Constant *getFunctionConstant()
const {
1393 if (
auto *
C = cast_or_null<ConstantAsMetadata>(getRawFunction()))
1394 return C->getValue();
1397 DITemplateParameterArray getTemplateParams()
const {
1398 return cast_or_null<MDTuple>(getRawTemplateParams());
1401 return cast_or_null<DISubprogram>(getRawDeclaration());
1403 DILocalVariableArray getVariables()
const {
1404 return cast_or_null<MDTuple>(getRawVariables());
1420 Function *getFunction()
const;
1447 :
DILocalScope(C, ID, Storage, dwarf::DW_TAG_lexical_block, Ops) {}
1459 inline unsigned getLine()
const;
1482 DIFile *File,
unsigned Line,
unsigned Column,
1484 bool ShouldCreate =
true) {
1485 return getImpl(Context, static_cast<Metadata *>(Scope),
1486 static_cast<Metadata *>(File), Line, Column, Storage,
1490 static DILexicalBlock *getImpl(LLVMContext &Context,
Metadata *Scope,
1491 Metadata *File,
unsigned Line,
unsigned Column,
1494 TempDILexicalBlock cloneImpl()
const {
1501 unsigned Line,
unsigned Column),
1502 (Scope, File, Line, Column))
1504 unsigned Line,
unsigned Column),
1505 (Scope, File, Line, Column))
1507 TempDILexicalBlock
clone()
const {
return cloneImpl(); }
1518 if (
auto *
N = dyn_cast<DILexicalBlock>(
this))
1519 return N->getLine();
1524 if (
auto *
N = dyn_cast<DILexicalBlock>(
this))
1525 return N->getColumn();
1533 unsigned Discriminator;
1538 Discriminator(Discriminator) {}
1542 DIFile *File,
unsigned Discriminator,
1544 bool ShouldCreate =
true) {
1545 return getImpl(Context, static_cast<Metadata *>(Scope),
1546 static_cast<Metadata *>(File), Discriminator, Storage,
1550 static DILexicalBlockFile *getImpl(LLVMContext &Context,
Metadata *Scope,
1551 Metadata *File,
unsigned Discriminator,
1553 bool ShouldCreate =
true);
1555 TempDILexicalBlockFile cloneImpl()
const {
1562 unsigned Discriminator),
1563 (Scope, File, Discriminator))
1566 (Scope, File, Discriminator))
1568 TempDILexicalBlockFile
clone()
const {
return cloneImpl(); }
1571 unsigned getLine()
const =
delete;
1581 unsigned DILocation::getDiscriminator()
const {
1582 if (
auto *
F = dyn_cast<DILexicalBlockFile>(getScope()))
1583 return F->getDiscriminator();
1604 Line, Storage, ShouldCreate);
1606 static DINamespace *getImpl(LLVMContext &Context,
Metadata *Scope,
1607 Metadata *File, MDString *Name,
unsigned Line,
1610 TempDINamespace cloneImpl()
const {
1618 (Scope, File, Name, Line))
1621 (Scope, File, Name, Line))
1623 TempDINamespace
clone()
const {
return cloneImpl(); }
1647 static DIModule *getImpl(LLVMContext &Context,
DIScope *Scope,
1655 Storage, ShouldCreate);
1657 static DIModule *getImpl(LLVMContext &Context,
Metadata *Scope,
1658 MDString *Name, MDString *ConfigurationMacros,
1659 MDString *IncludePath, MDString *ISysRoot,
1662 TempDIModule cloneImpl()
const {
1670 StringRef ConfigurationMacros, StringRef IncludePath,
1671 StringRef ISysRoot),
1672 (Scope, Name, ConfigurationMacros, IncludePath, ISysRoot))
1676 (Scope, Name, ConfigurationMacros, IncludePath, ISysRoot))
1678 TempDIModule
clone()
const {
return cloneImpl(); }
1702 :
DINode(Context, ID, Storage, Tag, Ops) {}
1725 dwarf::DW_TAG_template_type_parameter, Ops) {}
1730 bool ShouldCreate =
true) {
1734 static DITemplateTypeParameter *getImpl(LLVMContext &Context, MDString *Name,
1736 bool ShouldCreate =
true);
1738 TempDITemplateTypeParameter cloneImpl()
const {
1748 TempDITemplateTypeParameter
clone()
const {
return cloneImpl(); }
1768 bool ShouldCreate =
true) {
1770 Value, Storage, ShouldCreate);
1772 static DITemplateValueParameter *getImpl(LLVMContext &Context,
unsigned Tag,
1775 bool ShouldCreate =
true);
1777 TempDITemplateValueParameter cloneImpl()
const {
1785 (Tag, Name, Type, Value))
1788 (Tag, Name, Type, Value))
1790 TempDITemplateValueParameter
clone()
const {
return cloneImpl(); }
1808 :
DINode(C, ID, Storage, Tag, Ops), Line(Line) {}
1820 return F->getFilename();
1825 return F->getDirectory();
1851 bool IsLocalToUnit,
bool IsDefinition,
1855 IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition) {}
1863 bool ShouldCreate =
true) {
1866 IsLocalToUnit, IsDefinition,
1868 StaticDataMemberDeclaration, Storage, ShouldCreate);
1870 static DIGlobalVariable *
1871 getImpl(LLVMContext &Context,
Metadata *Scope, MDString *Name,
1873 bool IsLocalToUnit,
bool IsDefinition,
Metadata *Variable,
1875 bool ShouldCreate =
true);
1877 TempDIGlobalVariable cloneImpl()
const {
1886 (DIScope * Scope, StringRef Name, StringRef LinkageName,
1887 DIFile *File,
unsigned Line,
DITypeRef Type,
1888 bool IsLocalToUnit,
bool IsDefinition,
Constant *Variable,
1889 DIDerivedType *StaticDataMemberDeclaration),
1890 (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit,
1891 IsDefinition, Variable, StaticDataMemberDeclaration))
1895 bool IsLocalToUnit,
bool IsDefinition,
Metadata *Variable,
1896 Metadata *StaticDataMemberDeclaration),
1897 (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit,
1898 IsDefinition, Variable, StaticDataMemberDeclaration))
1900 TempDIGlobalVariable
clone()
const {
return cloneImpl(); }
1937 unsigned Line,
unsigned Arg,
unsigned Flags,
1945 unsigned Line,
DITypeRef Type,
unsigned Arg,
1947 bool ShouldCreate =
true) {
1949 File, Line, Type, Arg, Flags, Storage, ShouldCreate);
1951 static DILocalVariable *
1952 getImpl(LLVMContext &Context,
unsigned Tag,
Metadata *Scope, MDString *Name,
1954 unsigned Flags,
StorageType Storage,
bool ShouldCreate =
true);
1956 TempDILocalVariable cloneImpl()
const {
1963 (
unsigned Tag, DILocalScope *Scope, StringRef Name,
1964 DIFile *File,
unsigned Line,
DITypeRef Type,
unsigned Arg,
1966 (Tag, Scope, Name, File, Line, Type, Arg, Flags))
1970 unsigned Arg,
unsigned Flags),
1971 (Tag, Scope, Name, File, Line, Type, Arg, Flags))
1973 TempDILocalVariable
clone()
const {
return cloneImpl(); }
2017 std::vector<uint64_t> Elements;
2021 Elements(Elements.
begin(), Elements.
end()) {}
2026 bool ShouldCreate =
true);
2028 TempDIExpression cloneImpl()
const {
2035 TempDIExpression
clone()
const {
return cloneImpl(); }
2041 assert(I < Elements.
size() &&
"Index out of range");
2068 const uint64_t *
get()
const {
return Op; }
2076 uint64_t
getArg(
unsigned I)
const {
return Op[I + 1]; }
2088 :
public std::iterator<std::input_iterator_tag, ExprOperand> {
2154 unsigned Attributes;
2160 Line(Line), Attributes(Attributes) {}
2170 Storage, ShouldCreate);
2172 static DIObjCProperty *getImpl(LLVMContext &Context, MDString *Name,
2174 MDString *GetterName, MDString *SetterName,
2175 unsigned Attributes,
Metadata *Type,
2178 TempDIObjCProperty cloneImpl()
const {
2186 (StringRef Name, DIFile *File,
unsigned Line,
2187 StringRef GetterName, StringRef SetterName,
2189 (Name, File, Line, GetterName, SetterName, Attributes,
2194 unsigned Attributes,
Metadata *Type),
2195 (Name, File, Line, GetterName, SetterName, Attributes,
2198 TempDIObjCProperty
clone()
const {
return cloneImpl(); }
2210 return F->getFilename();
2215 return F->getDirectory();
2246 bool ShouldCreate =
true) {
2247 return getImpl(Context, Tag, Scope, Entity, Line,
2250 static DIImportedEntity *getImpl(LLVMContext &Context,
unsigned Tag,
2252 unsigned Line, MDString *Name,
2254 bool ShouldCreate =
true);
2256 TempDIImportedEntity cloneImpl()
const {
2263 (
unsigned Tag, DIScope *Scope,
DINodeRef Entity,
2264 unsigned Line, StringRef Name =
""),
2265 (Tag, Scope, Entity, Line, Name))
2269 (Tag, Scope, Entity, Line, Name))
2271 TempDIImportedEntity
clone()
const {
return cloneImpl(); }
2289 #undef DEFINE_MDNODE_GET_UNPACK_IMPL
2290 #undef DEFINE_MDNODE_GET_UNPACK
2291 #undef DEFINE_MDNODE_GET
MDString * getRawGetterName() const
Metadata * getRawScope() const
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint64_t uint64_t unsigned Metadata unsigned Metadata * VTableHolder
StringRef getName() const
DISubprogramArray getSubprograms() const
unsigned getNumDwarfOperands() const
static bool classof(const Metadata *MD)
bool describes(const Function *F) const
Check if this subprogram decribes the given function.
Metadata MDString MDString * ConfigurationMacros
const_iterator end(StringRef path)
Get end iterator over path.
Tracking metadata reference owned by Metadata.
MDString * getRawIncludePath() const
ArrayRef< uint64_t >::iterator element_iterator
StringRef getName() const
StringRef getIdentifier() const
DEFINE_MDNODE_GET(DIModule,(DIScope *Scope, StringRef Name, StringRef ConfigurationMacros, StringRef IncludePath, StringRef ISysRoot),(Scope, Name, ConfigurationMacros, IncludePath, ISysRoot)) DEFINE_MDNODE_GET(DIModule
DILocalScope * getScope() const
unsigned StringRef uint64_t uint64_t AlignInBits
unsigned MDString Metadata Metadata Value TempDITemplateValueParameter clone() const
unsigned getColumn() const =delete
bool isArtificial() const
unsigned Metadata Metadata * Entity
StringRef getName() const
DEFINE_MDNODE_GET(DIFile,(StringRef Filename, StringRef Directory),(Filename, Directory)) DEFINE_MDNODE_GET(DIFile
StringRef getDirectory() const
DINode(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef< Metadata * > Ops1, ArrayRef< Metadata * > Ops2=None)
MDString Metadata unsigned MDString MDString unsigned Metadata Type TempDIObjCProperty clone() const
MDString MDString * Directory
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint64_t uint64_t unsigned Metadata * Elements
iterator_range< op_iterator > op_range
unsigned StringRef DIFile unsigned DIScopeRef DITypeRef uint64_t uint64_t uint64_t unsigned Flags
DITypeRef getType() const
Metadata * getRawBaseType() const
StringRef getFlags() const
void replaceOperandWith(unsigned I, Metadata *New)
Replace a specific operand.
static MDString * get(LLVMContext &Context, StringRef Str)
Metadata * getRawSubprograms() const
uint64_t getElement(unsigned I) const
DILocalScope * getScope() const
Get the local scope for this variable.
MDString * getRawName() const
unsigned getNumOperands() const
Return number of MDNode operands.
MDString MDString Directory TempDIFile clone() const
bool isRValueReference() const
uint64_t getAlignInBits() const
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint64_t uint64_t unsigned Metadata unsigned RuntimeLang
Metadata * getRawFile() const
Return the raw underlying file.
TypedDINodeRef(std::nullptr_t)
DEFINE_MDNODE_GET(DITemplateTypeParameter,(StringRef Name, DITypeRef Type),(Name, Type)) DEFINE_MDNODE_GET(DITemplateTypeParameter
static bool classof(const Metadata *MD)
Metadata * getRawType() const
DIScopeRef getRef() const
StringRef getDirectory() const
DITemplateParameter(LLVMContext &Context, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef< Metadata * > Ops)
unsigned getEmissionKind() const
const_iterator begin(StringRef path)
Get begin iterator over path.
~DILexicalBlockBase()=default
op_iterator op_begin() const
void setFlags(unsigned NewFlags)
DILocalScope(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef< Metadata * > Ops)
static bool classof(const Metadata *MD)
StringRef getName() const
Metadata MDString MDString Metadata unsigned Metadata bool bool unsigned Metadata unsigned unsigned unsigned bool Metadata Metadata Metadata Metadata * Variables
static bool classof(const Metadata *MD)
DINodeArray getElements() const
Get the elements of the composite type.
void replaceFunction(Function *F)
Replace the function.
static bool classof(const Metadata *MD)
static bool classof(const Metadata *MD)
DIScope * getScope() const
FunctionType * getType(LLVMContext &Context, ID id, ArrayRef< Type * > Tys=None)
Return the function type for an intrinsic.
void replaceFunction(std::nullptr_t)
unsigned getColumn() const
static bool classof(const Metadata *MD)
static bool classof(const Metadata *MD)
unsigned getVirtuality(StringRef VirtualityString)
Metadata * getRawScope() const
op_iterator op_end() const
DIDerivedTypeBase(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, ArrayRef< Metadata * > Ops)
unsigned getColumn() const
Tagged DWARF-like metadata node.
void replaceRetainedTypes(DITypeArray N)
unsigned Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata uint64_t DWOId TempDICompileUnit clone() const
MDString * getRawName() const
Metadata * getRawType() const
DEFINE_MDNODE_GET(DISubrange,(int64_t Count, int64_t LowerBound=0),(Count, LowerBound)) TempDISubrange clone() const
MDString * getRawName() const
DEFINE_MDNODE_GET(DITemplateValueParameter,(unsigned Tag, StringRef Name, DITypeRef Type, Metadata *Value),(Tag, Name, Type, Value)) DEFINE_MDNODE_GET(DITemplateValueParameter
MDString * getRawDirectory() const
static bool classof(const Metadata *MD)
Metadata MDString MDString Metadata unsigned Metadata bool bool unsigned Metadata unsigned unsigned unsigned bool Metadata Metadata Metadata * Declaration
Base class for DIDerivedType and DICompositeType.
bool isObjectPointer() const
DIScope * getScope() const
StringRef getName() const
DEFINE_MDNODE_GET(DILexicalBlock,(DILocalScope *Scope, DIFile *File, unsigned Line, unsigned Column),(Scope, File, Line, Column)) DEFINE_MDNODE_GET(DILexicalBlock
TypedDINodeRef(const TypedDINodeRef< U > &X, typename std::enable_if< std::is_convertible< U *, T * >::value >::type *=nullptr)
DIVariable(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, unsigned Line, ArrayRef< Metadata * > Ops)
DEFINE_MDNODE_GET(DICompositeType,(unsigned Tag, StringRef Name, DIFile *File, unsigned Line, DIScopeRef Scope, DITypeRef BaseType, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, DINodeArray Elements, unsigned RuntimeLang, DITypeRef VTableHolder, DITemplateParameterArray TemplateParams=nullptr, StringRef Identifier=""),(Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier)) DEFINE_MDNODE_GET(DICompositeType
unsigned Metadata Metadata unsigned MDString Name TempDIImportedEntity clone() const
unsigned StringRef DIFile unsigned Line
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata * Variable
static bool classof(const Metadata *MD)
MDString * getRawName() const
unsigned Metadata MDString * Producer
MDString * getRawConfigurationMacros() const
static bool classof(const Metadata *MD)
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata Metadata StaticDataMemberDeclaration TempDIGlobalVariable clone() const
Metadata * getRawRetainedTypes() const
StringRef getName() const
iterator(MDNode::op_iterator I)
unsigned Metadata MDString bool MDString unsigned MDString * SplitDebugFilename
MDString * getRawFlags() const
bool operator==(const TypedDINodeRef< T > &X) const
DITypeArray getRetainedTypes() const
TypedDINodeRef< DINode > DINodeRef
StringRef getFilename() const
bool isAppleBlockExtension() const
Pointer union between a subclass of DINode and MDString.
~DITemplateParameter()=default
StringRef getName() const
T * resolve(const MapTy &Map) const
DICompositeTypeBase(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, ArrayRef< Metadata * > Ops)
DITypeRefArray getTypeArray() const
Metadata * getRawFile() const
Metadata * getRawStaticDataMemberDeclaration() const
DEFINE_MDNODE_GET(DICompileUnit,(unsigned SourceLanguage, DIFile *File, StringRef Producer, bool IsOptimized, StringRef Flags, unsigned RuntimeVersion, StringRef SplitDebugFilename, unsigned EmissionKind, DICompositeTypeArray EnumTypes, DITypeArray RetainedTypes, DISubprogramArray Subprograms, DIGlobalVariableArray GlobalVariables, DIImportedEntityArray ImportedEntities, uint64_t DWOId),(SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, Subprograms, GlobalVariables, ImportedEntities, DWOId)) DEFINE_MDNODE_GET(DICompileUnit
unsigned StringRef DIFile unsigned DIScopeRef DITypeRef uint64_t uint64_t uint64_t OffsetInBits
unsigned StringRef DIFile unsigned DIScopeRef DITypeRef BaseType
DITemplateParameterArray getTemplateParams() const
unsigned StringRef DIFile * File
unsigned MDString ArrayRef< Metadata * > DwarfOps
expr_op_iterator expr_op_begin() const
Visit the elements via ExprOperand wrappers.
Metadata Metadata MDString unsigned Line TempDINamespace clone() const
DEFINE_MDNODE_GET(DIEnumerator,(int64_t Value, StringRef Name),(Value, Name)) DEFINE_MDNODE_GET(DIEnumerator
DITypeRef operator*() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
DIScopeRef getScope() const
Function * getDeclaration(Module *M, ID id, ArrayRef< Type * > Tys=None)
Create or insert an LLVM Function declaration for an intrinsic, and return it.
Metadata * getRawVTableHolder() const
DITypeRef getVTableHolder() const
StringRef getConfigurationMacros() const
Metadata * getRawEnumTypes() const
MDString * getRawName() const
element_iterator elements_begin() const
static bool classof(const Metadata *MD)
DIScopeRef getScope() const
size_t size() const
size - Get the array size.
StringRef getDirectory() const
void replaceElements(DINodeArray Elements)
Replace operands.
DIScope * getScope() const
unsigned unsigned DILocalScope DILocation * InlinedAt
void replaceGlobalVariables(DIGlobalVariableArray N)
Flag
These should be considered private to the implementation of the MCInstrDesc class.
unsigned MDString Metadata unsigned Metadata Metadata uint64_t uint64_t uint64_t unsigned Metadata unsigned Metadata Metadata * TemplateParams
Metadata * getRawScope() const
op_iterator dwarf_op_end() const
MDString * getRawName() const
unsigned getRuntimeVersion() const
static bool classof(const Metadata *MD)
ExprOperand(const uint64_t *Op)
unsigned Metadata MDString Metadata unsigned Metadata unsigned unsigned Flags TempDILocalVariable clone() const
StringRef getIncludePath() const
Metadata * getRawElements() const
MDString * getRawSplitDebugFilename() const
DITypeRef getType() const
element_iterator elements_end() const
bool operator!=(const TypedDINodeRef< T > &X) const
element_iterator getBase() const
MDString * getRawFilename() const
Metadata * getRawFile() const
unsigned computeNewDiscriminator() const
Compute new discriminator in the given context.
unsigned getNumElements() const
DITypeRef operator[](unsigned I) const
expr_op_iterator(element_iterator I)
unsigned Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata Metadata * ImportedEntities
StringRef getName() const
static bool classof(const Metadata *MD)
Metadata MDString MDString MDString MDString * ISysRoot
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
op_range dwarf_operands() const
static bool classof(const Metadata *MD)
unsigned MDString * Header
void replaceDwarfOperandWith(unsigned I, Metadata *New)
MDString Metadata Type TempDITemplateTypeParameter clone() const
void replaceSubprograms(DISubprogramArray N)
This is an important base class in LLVM.
const ExprOperand & operator*() const
Metadata * getRawType() const
expr_op_iterator & operator++()
expr_op_iterator getNext() const
Get the next iterator.
DEFINE_MDNODE_GET(DIGlobalVariable,(DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DITypeRef Type, bool IsLocalToUnit, bool IsDefinition, Constant *Variable, DIDerivedType *StaticDataMemberDeclaration),(Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, Variable, StaticDataMemberDeclaration)) DEFINE_MDNODE_GET(DIGlobalVariable
bool isLocalToUnit() const
unsigned getSize() const
Return the size of the operand.
Base class for template parameters.
unsigned StringRef DIFile unsigned DIScopeRef Scope
unsigned getSourceLanguage() const
StringRef getFilename() const
A lightweight wrapper around an expression operand.
Metadata * getRawTemplateParams() const
bool operator!=(const iterator &X) const
unsigned Metadata * TypeArray
uint64_t getArg(unsigned I) const
Get an argument to the operand.
StringRef getStringOperand(unsigned I) const
void replaceEnumTypes(DICompositeTypeArray N)
Replace arrays.
DIScope * getScope() const
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
bool operator!=(const expr_op_iterator &X) const
DEFINE_MDNODE_GET(DINamespace,(DIScope *Scope, DIFile *File, StringRef Name, unsigned Line),(Scope, File, Name, Line)) DEFINE_MDNODE_GET(DINamespace
MDString * getRawISysRoot() const
Metadata MDString MDString * LinkageName
Metadata * getValue() const
Base class for variables.
unsigned getDWOId() const
unsigned getEncoding() const
uint64_t getOffsetInBits() const
DITypeRef getBaseType() const
unsigned getAttributes() const
StringRef getGetterName() const
MDString Metadata unsigned MDString * GetterName
static bool classof(const Metadata *MD)
DINodeRef getEntity() const
bool isObjectPointer() const
TempMDNode clone() const
Create a (temporary) clone of this.
bool isLValueReference() const
void replaceFunction(ConstantAsMetadata *MD)
unsigned Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata * RetainedTypes
MDTuple & operator*() const
static bool classof(const Metadata *MD)
static bool classof(const Metadata *MD)
static bool classof(const Metadata *MD)
DITypeRef getType() const
An imported module (C++ using directive or similar).
Base class for scope-like contexts.
Ty * getOperandAs(unsigned I) const
expr_op_iterator operator++(int)
TypedDINodeRef< DIScope > DIScopeRef
StringRef getDisplayName() const
StringRef getDirectory() const
Metadata * getRawScope() const
ArrayRef< uint64_t > getElements() const
unsigned MDString ArrayRef< Metadata * > DwarfOps TempGenericDINode clone() const
Return a (temporary) clone of this.
StringRef getFilename() const
MDTuple * operator->() const
static SimpleType getSimplifiedValue(const TypedDINodeRef< T > &MD)
StringRef getISysRoot() const
static bool classof(const Metadata *MD)
DIImportedEntityArray getImportedEntities() const
Metadata Metadata unsigned unsigned Column TempDILexicalBlock clone() const
const MDOperand & getOperand(unsigned I) const
static MDString * getCanonicalMDString(LLVMContext &Context, StringRef S)
bool operator==(const iterator &X) const
MDString * getRawName() const
static const char * getFlagString(unsigned Flag)
static bool classof(const Metadata *MD)
DILexicalBlockBase(LLVMContext &C, unsigned ID, StorageType Storage, ArrayRef< Metadata * > Ops)
DEFINE_MDNODE_GET(DIObjCProperty,(StringRef Name, DIFile *File, unsigned Line, StringRef GetterName, StringRef SetterName, unsigned Attributes, DITypeRef Type),(Name, File, Line, GetterName, SetterName, Attributes, Type)) DEFINE_MDNODE_GET(DIObjCProperty
unsigned Metadata TypeArray TempDISubroutineType clone() const
Metadata * getRawInlinedAt() const
~DICompositeTypeBase()=default
const uint64_t * get() const
static bool classof(const Metadata *MD)
unsigned getLine() const
Forwarding accessors to LexicalBlock.
MDString * getRawLinkageName() const
void replaceVTableHolder(DITypeRef VTableHolder)
TypedDINodeRef(const Metadata *MD)
Construct from a raw pointer.
const ExprOperand * operator->() const
DEFINE_MDNODE_GET(DILocalVariable,(unsigned Tag, DILocalScope *Scope, StringRef Name, DIFile *File, unsigned Line, DITypeRef Type, unsigned Arg, unsigned Flags),(Tag, Scope, Name, File, Line, Type, Arg, Flags)) DEFINE_MDNODE_GET(DILocalVariable
DEFINE_MDNODE_GET(DIImportedEntity,(unsigned Tag, DIScope *Scope, DINodeRef Entity, unsigned Line, StringRef Name=""),(Tag, Scope, Entity, Line, Name)) DEFINE_MDNODE_GET(DIImportedEntity
Metadata * getRawEntity() const
StringRef getFilename() const
DIType(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, ArrayRef< Metadata * > Ops)
Metadata MDString MDString Metadata unsigned Metadata bool bool unsigned Metadata * ContainingType
bool isBlockByrefStruct() const
A range adaptor for a pair of iterators.
unsigned getDiscriminator() const
unsigned getLine() const =delete
unsigned StringRef uint64_t SizeInBits
A (clang) module that has been imported by the compile unit.
StringRef getHeader() const
bool isForwardDecl() const
bool isStaticMember() const
static TempMDTuple getTemporary(LLVMContext &Context, ArrayRef< Metadata * > MDs)
unsigned Metadata MDString bool MDString unsigned MDString unsigned Metadata * EnumTypes
LLVM_ATTRIBUTE_UNUSED_RESULT std::enable_if< !is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
MDString * getRawIdentifier() const
Generic tagged DWARF-like metadata node.
bool isArtificial() const
Metadata * getRawVariable() const
static TypedDINodeRef get(const T *N)
Create a reference.
static unsigned getFlag(StringRef Flag)
Type array for a subprogram.
Metadata * getRawImportedEntities() const
static bool classof(const Metadata *MD)
Metadata * getRawScope() const
unsigned getRuntimeLang() const
Metadata * getRawScope() const
static unsigned splitFlags(unsigned Flags, SmallVectorImpl< unsigned > &SplitFlags)
Split up a flags bitfield.
static bool classof(const Metadata *MD)
Base class for DICompositeType and DISubroutineType.
DEFINE_MDNODE_GET(DISubprogram,(DIScopeRef Scope, StringRef Name, StringRef LinkageName, DIFile *File, unsigned Line, DISubroutineType *Type, bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, DITypeRef ContainingType, unsigned Virtuality, unsigned VirtualIndex, unsigned Flags, bool IsOptimized, Constant *Function=nullptr, DITemplateParameterArray TemplateParams=nullptr, DISubprogram *Declaration=nullptr, DILocalVariableArray Variables=nullptr),(Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, Virtuality, VirtualIndex, Flags, IsOptimized, Function, TemplateParams, Declaration, Variables)) DEFINE_MDNODE_GET(DISubprogram
Metadata Metadata unsigned Discriminator TempDILexicalBlockFile clone() const
bool operator==(const expr_op_iterator &X) const
MDString Metadata unsigned MDString MDString * SetterName
const MDOperand & getDwarfOperand(unsigned I) const
Metadata MDString MDString MDString * IncludePath
uint64_t getSizeInBits() const
LLVMContext & getContext() const
Metadata MDString MDString MDString MDString ISysRoot TempDIModule clone() const
DITypeRefArray(const MDTuple *N)
StringRef getSetterName() const
bool isBitPiece() const
Return whether this is a piece of an aggregate variable.
DEFINE_MDNODE_GET(DIBasicType,(unsigned Tag, StringRef Name),(Tag, Name, 0, 0, 0)) DEFINE_MDNODE_GET(DIBasicType
bool isObjcClassComplete() const
Metadata * getRawScope() const
DEFINE_MDNODE_GET(DILexicalBlockFile,(DILocalScope *Scope, DIFile *File, unsigned Discriminator),(Scope, File, Discriminator)) DEFINE_MDNODE_GET(DILexicalBlockFile
static bool classof(const Metadata *MD)
int64_t MDString Name TempDIEnumerator clone() const
DIScope(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, ArrayRef< Metadata * > Ops)
unsigned getFlags() const
MDString * getRawName() const
DICompositeTypeArray getEnumTypes() const
StringRef getName() const
LLVM Value Representation.
static bool classof(const Metadata *MD)
DIDerivedType * getStaticDataMemberDeclaration() const
unsigned getNumArgs() const
ContextAndReplaceableUses Context
uint64_t getBitPieceSize() const
Return the size of this piece in bits.
DEFINE_MDNODE_GET(DISubroutineType,(unsigned Flags, DITypeRefArray TypeArray),(Flags, TypeArray)) DEFINE_MDNODE_GET(DISubroutineType
unsigned Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata * Subprograms
bool isDefinition() const
uint64_t getBitPieceOffset() const
Return the offset of this piece in bits.
DEFINE_MDNODE_GET(DIDerivedType,(unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, Metadata *ExtraData=nullptr),(Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, ExtraData)) DEFINE_MDNODE_GET(DIDerivedType
An iterator for expression operands.
Constant * getVariable() const
uint64_t getOp() const
Get the operand code.
std::string Hash(const Unit &U)
void replaceTemplateParams(DITemplateParameterArray TemplateParams)
bool isValidLocationForIntrinsic(const DILocation *DL) const
Check that a location is valid for this variable.
StringRef - Represent a constant reference to a string, i.e.
op_iterator dwarf_op_begin() const
int64_t getLowerBound() const
MDString * getRawSetterName() const
DEFINE_MDNODE_GET(GenericDINode,(unsigned Tag, StringRef Header, ArrayRef< Metadata * > DwarfOps),(Tag, Header, DwarfOps)) DEFINE_MDNODE_GET(GenericDINode
unsigned getFlags() const
DIGlobalVariableArray getGlobalVariables() const
DISubprogram * getSubprogram() const
Get the subprogram for this scope.
TypedDINodeRef< DIType > DITypeRef
expr_op_iterator expr_op_end() const
DEFINE_MDNODE_GET(DILocation,(unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt=nullptr),(Line, Column, Scope, InlinedAt)) DEFINE_MDNODE_GET(DILocation
StringRef getProducer() const
~DIDerivedTypeBase()=default
StringRef getLinkageName() const
static bool classof(const Metadata *MD)
static bool classof(const Metadata *MD)
static bool classof(const Metadata *MD)
MDString * getRawProducer() const
void replaceImportedEntities(DIImportedEntityArray N)
DEFINE_MDNODE_GET(DIExpression,(ArrayRef< uint64_t > Elements),(Elements)) TempDIExpression clone() const
unsigned Metadata MDString bool MDString unsigned MDString unsigned Metadata Metadata Metadata Metadata * GlobalVariables
Metadata MDString MDString Metadata unsigned Metadata bool bool Metadata Metadata * StaticDataMemberDeclaration
bool empty() const
empty - Check if the string is empty.
Metadata * getRawGlobalVariables() const
Basic type, like 'int' or 'float'.
Metadata * getRawTypeArray() const
StringRef getSplitDebugFilename() const