Documentation
¶
Overview ¶
Package metadata provides access to LLVM IR metadata.
Index ¶
- Variables
- type Attachment
- type DIBasicType
- type DICompileUnit
- type DICompositeType
- type DIDerivedType
- type DIEnumerator
- type DIExpression
- type DIExpressionField
- type DIFile
- type DIGlobalVariable
- type DIGlobalVariableExpression
- type DIImportedEntity
- type DILabel
- type DILexicalBlock
- type DILexicalBlockFile
- type DILocalVariable
- type DILocation
- type DIMacro
- type DIMacroFile
- type DIModule
- type DINamespace
- type DIObjCProperty
- type DISubprogram
- type DISubrange
- type DISubroutineType
- type DITemplateTypeParameter
- type DITemplateValueParameter
- type Def
- type Field
- type FieldOrInt
- type GenericDINode
- type IntLit
- type MDNode
- type Metadata
- type NamedDef
- type Node
- type NullLit
- type SpecializedNode
- type String
- type Tuple
- type UintLit
- type Value
Constants ¶
This section is empty.
Variables ¶
var ( // Null metadata literal. Null = &NullLit{} )
Convenience literals.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
// Metadata attachment name (without '!' prefix); e.g. !dbg.
Name string
// Metadata attachment node.
Node MDNode
}
Attachment is a metadata attachment.
func (*Attachment) String ¶
func (m *Attachment) String() string
String returns the string representation of the metadata attachment.
type DIBasicType ¶
type DIBasicType struct {
Tag enum.DwarfTag // optional; zero value if not present.
Name string // optional; empty if not present.
Size uint64 // optional; zero value if not present.
Align uint64 // optional; zero value if not present.
Encoding enum.DwarfAttEncoding // optional; zero value if not present.
Flags enum.DIFlag // optional.
}
DIBasicType is a specialized metadata node.
func (*DIBasicType) String ¶
func (md *DIBasicType) String() string
String returns a string representation of the specialized metadata node.
type DICompileUnit ¶
type DICompileUnit struct {
Language enum.DwarfLang // required.
File Field // required.
Producer string // optional; empty if not present.
IsOptimized bool // optional; zero value if not present.
Flags string // optional; empty if not present.
RuntimeVersion uint64 // optional; zero value if not present.
SplitDebugFilename string // optional; empty if not present.
EmissionKind enum.EmissionKind // optional; zero value if not present.
Enums Field // optional; nil if not present.
RetainedTypes Field // optional; nil if not present.
Globals Field // optional; nil if not present.
Imports Field // optional; nil if not present.
Macros Field // optional; nil if not present.
DwoID uint64 // optional; zero value if not present.
SplitDebugInlining bool // optional; zero value if not present.
DebugInfoForProfiling bool // optional; zero value if not present.
NameTableKind enum.NameTableKind // optional; zero value if not present.
}
DICompileUnit is a specialized metadata node.
func (*DICompileUnit) String ¶
func (md *DICompileUnit) String() string
String returns a string representation of the specialized metadata node.
type DICompositeType ¶
type DICompositeType struct {
Tag enum.DwarfTag // required.
Name string // optional; empty if not present.
Scope Field // optional; nil if not present.
File Field // optional; nil if not present.
Line int64 // optional; zero value if not present.
BaseType Field // optional; nil if not present.
Size uint64 // optional; zero value if not present.
Align uint64 // optional; zero value if not present.
Offset uint64 // optional; zero value if not present.
Flags enum.DIFlag // optional.
Elements Field // optional; nil if not present.
RuntimeLang enum.DwarfLang // optional; zero value if not present.
VtableHolder Field // optional; nil if not present.
TemplateParams Field // optional; nil if not present.
Identifier string // optional; empty if not present.
Discriminator Field // optional; nil if not present.
}
DICompositeType is a specialized metadata node.
func (*DICompositeType) String ¶
func (md *DICompositeType) String() string
String returns a string representation of the specialized metadata node.
type DIDerivedType ¶
type DIDerivedType struct {
Tag enum.DwarfTag // required.
Name string // optional; empty if not present.
Scope Field // optional; nil if not present.
File Field // optional; nil if not present.
Line int64 // optional; zero value if not present.
BaseType Field // required.
Size uint64 // optional; zero value if not present.
Align uint64 // optional; zero value if not present.
Offset uint64 // optional; zero value if not present.
Flags enum.DIFlag // optional.
ExtraData Field // optional; nil if not present.
DwarfAddressSpace uint64 // optional; zero value if not present.
}
DIDerivedType is a specialized metadata node.
func (*DIDerivedType) String ¶
func (md *DIDerivedType) String() string
String returns a string representation of the specialized metadata node.
type DIEnumerator ¶
type DIEnumerator struct {
Name string // required.
Value int64 // required.
IsUnsigned bool // optional; zero value if not present.
}
DIEnumerator is a specialized metadata node.
func (*DIEnumerator) String ¶
func (md *DIEnumerator) String() string
String returns a string representation of the specialized metadata node.
type DIExpression ¶
type DIExpression struct {
Fields []DIExpressionField
}
DIExpression is a specialized metadata node.
func (*DIExpression) String ¶
func (md *DIExpression) String() string
String returns a string representation of the specialized metadata node.
type DIExpressionField ¶
type DIFile ¶
type DIFile struct {
Filename string // required.
Directory string // required.
Checksumkind enum.ChecksumKind // optional; zero value if not present.
Checksum string // optional; empty if not present.
Source string // optional; empty if not present.
}
DIFile is a specialized metadata node.
type DIGlobalVariable ¶
type DIGlobalVariable struct {
Name string // required.
Scope Field // optional; nil if not present.
LinkageName string // optional; empty if not present.
File Field // optional; nil if not present.
Line int64 // optional; zero value if not present.
Type Field // optional; nil if not present.
IsLocal bool // optional; zero value if not present.
IsDefinition bool // optional; zero value if not present.
TemplateParams Field // optional; nil if not present.
Declaration Field // optional; nil if not present.
Align uint64 // optional; zero value if not present.
}
DIGlobalVariable is a specialized metadata node.
func (*DIGlobalVariable) String ¶
func (md *DIGlobalVariable) String() string
String returns a string representation of the specialized metadata node.
type DIGlobalVariableExpression ¶
DIGlobalVariableExpression is a specialized metadata node.
func (*DIGlobalVariableExpression) String ¶
func (md *DIGlobalVariableExpression) String() string
String returns a string representation of the specialized metadata node.
type DIImportedEntity ¶
type DIImportedEntity struct {
Tag enum.DwarfTag // required.
Scope Field // required.
Entity Field // optional; nil if not present.
File Field // optional; nil if not present.
Line int64 // optional; zero value if not present.
Name string // optional; empty if not present.
}
DIImportedEntity is a specialized metadata node.
func (*DIImportedEntity) String ¶
func (md *DIImportedEntity) String() string
String returns a string representation of the specialized metadata node.
type DILabel ¶
type DILabel struct {
Scope Field // required.
Name string // required.
File Field // required.
Line int64 // required.
}
DILabel is a specialized metadata node.
type DILexicalBlock ¶
type DILexicalBlock struct {
Scope Field // required.
File Field // optional; nil if not present.
Line int64 // optional; zero value if not present.
Column int64 // optional; zero value if not present.
}
DILexicalBlock is a specialized metadata node.
func (*DILexicalBlock) String ¶
func (md *DILexicalBlock) String() string
String returns a string representation of the specialized metadata node.
type DILexicalBlockFile ¶
type DILexicalBlockFile struct {
Scope Field // required.
File Field // optional; nil if not present.
Discriminator uint64 // required.
}
DILexicalBlockFile is a specialized metadata node.
func (*DILexicalBlockFile) String ¶
func (md *DILexicalBlockFile) String() string
String returns a string representation of the specialized metadata node.
type DILocalVariable ¶
type DILocalVariable struct {
Name string // optional; empty if not present.
Arg uint64 // optional; zero value if not present.
Scope Field // required.
File Field // optional; nil if not present.
Line int64 // optional; zero value if not present.
Type Field // optional; nil if not present.
Flags enum.DIFlag // optional.
Align uint64 // optional; zero value if not present.
}
DILocalVariable is a specialized metadata node.
func (*DILocalVariable) String ¶
func (md *DILocalVariable) String() string
String returns a string representation of the specialized metadata node.
type DILocation ¶
type DILocation struct {
Line int64 // optional; zero value if not present.
Column int64 // optional; zero value if not present.
Scope Field // required.
InlinedAt Field // optional; nil if not present.
IsImplicitCode bool // optional; zero value if not present.
}
DILocation is a specialized metadata node.
func (*DILocation) String ¶
func (md *DILocation) String() string
String returns a string representation of the specialized metadata node.
type DIMacro ¶
type DIMacro struct {
Type enum.DwarfMacinfo // required.
Line int64 // optional; zero value if not present.
Name string // required.
Value string // optional; empty if not present.
}
DIMacro is a specialized metadata node.
type DIMacroFile ¶
type DIMacroFile struct {
Type enum.DwarfMacinfo // optional; zero value if not present.
Line int64 // optional; zero value if not present.
File Field // required.
Nodes Field // optional; nil if not present.
}
DIMacroFile is a specialized metadata node.
func (*DIMacroFile) String ¶
func (md *DIMacroFile) String() string
String returns a string representation of the specialized metadata node.
type DIModule ¶
type DIModule struct {
Scope Field // required.
Name string // required.
ConfigMacros string // optional; empty if not present.
IncludePath string // optional; empty if not present.
Isysroot string // optional; empty if not present.
}
DIModule is a specialized metadata node.
type DINamespace ¶
type DINamespace struct {
Scope Field // required.
Name string // optional; empty if not present.
ExportSymbols bool // optional; zero value if not present.
}
DINamespace is a specialized metadata node.
func (*DINamespace) String ¶
func (md *DINamespace) String() string
String returns a string representation of the specialized metadata node.
type DIObjCProperty ¶
type DIObjCProperty struct {
Name string // optional; empty if not present.
File Field // optional; nil if not present.
Line int64 // optional; zero value if not present.
Setter string // optional; empty if not present.
Getter string // optional; empty if not present.
Attributes uint64 // optional; zero value if not present.
Type Field // optional; nil if not present.
}
DIObjCProperty is a specialized metadata node.
func (*DIObjCProperty) String ¶
func (md *DIObjCProperty) String() string
String returns a string representation of the specialized metadata node.
type DISubprogram ¶
type DISubprogram struct {
Scope Field // optional; nil if not present.
Name string // optional; empty if not present.
LinkageName string // optional; empty if not present.
File Field // optional; nil if not present.
Line int64 // optional; zero value if not present.
Type Field // optional; nil if not present.
IsLocal bool // optional; zero value if not present.
IsDefinition bool // optional; zero value if not present.
ScopeLine int64 // optional; zero value if not present.
ContainingType Field // optional; nil if not present.
Virtuality enum.DwarfVirtuality // optional; zero value if not present.
VirtualIndex uint64 // optional; zero value if not present.
ThisAdjustment int64 // optional; zero value if not present.
Flags enum.DIFlag // optional.
IsOptimized bool // optional; zero value if not present.
Unit Field // optional; nil if not present.
TemplateParams Field // optional; nil if not present.
Declaration Field // optional; nil if not present.
RetainedNodes Field // optional; nil if not present.
ThrownTypes Field // optional; nil if not present.
}
DISubprogram is a specialized metadata node.
func (*DISubprogram) String ¶
func (md *DISubprogram) String() string
String returns a string representation of the specialized metadata node.
type DISubrange ¶
type DISubrange struct {
Count FieldOrInt // required.
LowerBound int64 // optional; zero value if not present.
}
DISubrange is a specialized metadata node.
func (*DISubrange) String ¶
func (md *DISubrange) String() string
String returns a string representation of the specialized metadata node.
type DISubroutineType ¶
type DISubroutineType struct {
Flags enum.DIFlag // optional.
CC enum.DwarfCC // optional; zero value if not present.
Types Field // required.
}
DISubroutineType is a specialized metadata node.
func (*DISubroutineType) String ¶
func (md *DISubroutineType) String() string
String returns a string representation of the specialized metadata node.
type DITemplateTypeParameter ¶
type DITemplateTypeParameter struct {
Name string // optional; empty if not present.
Type Field // required.
}
DITemplateTypeParameter is a specialized metadata node.
func (*DITemplateTypeParameter) String ¶
func (md *DITemplateTypeParameter) String() string
String returns a string representation of the specialized metadata node.
type DITemplateValueParameter ¶
type DITemplateValueParameter struct {
Tag enum.DwarfTag // optional; zero value if not present.
Name string // optional; empty if not present.
Type Field // optional; nil if not present.
Value Field // required.
}
DITemplateValueParameter is a specialized metadata node.
func (*DITemplateValueParameter) String ¶
func (md *DITemplateValueParameter) String() string
String returns a string representation of the specialized metadata node.
type Def ¶
type Def struct {
// Metadata definition ID (without '!' prefix).
ID int64
// Metadata definition node.
Node MDNode // Tuple or SpecializedNode
// (optional) Distinct.
Distinct bool
}
Def is a metadata definition.
type FieldOrInt ¶
type GenericDINode ¶
type GenericDINode struct {
Tag enum.DwarfTag // required
Header string // optional; empty if not present
Operands []Field // optional
}
GenericDINode is a specialized GenericDINode metadata node.
func (*GenericDINode) String ¶
func (md *GenericDINode) String() string
String returns a string representation of the specialized metadata node.
type NamedDef ¶
type NamedDef struct {
// Metadata definition name (without '!' prefix).
Name string
// Metadata definition nodes.
Nodes []Node
}
NamedDef is a named metadata definition.
type SpecializedNode ¶
type String ¶
type String struct {
// Metadata string value.
Value string
}
String is a metadata string.
type Tuple ¶
type Tuple struct {
// Metadata tuple fields.
Fields []Field
}
Tuple is a metadata node tuple.
type UintLit ¶
type UintLit uint64
UintLit is an unsigned integer literal.
func (UintLit) IsDIExpressionField ¶
func (UintLit) IsDIExpressionField()
IsDIExpressionField ensures that only DIExpression fields can be assigned to the metadata.DIExpressionField interface.