Metadata
LLVM.Metadata — Type
MetadataAbstract supertype for all metadata types.
LLVM.MDString — Type
MDStringA string metadata node.
LLVM.MDString — Method
MDString(val::String)Create a new string metadata node from the given Julia string.
Base.convert — Method
convert(String, md::MDString)Get the string value of the given string metadata node.
LLVM.MDNode — Type
MDNodeAbstract supertype for metadata nodes that can have operands.
See also: MDTuple for a concrete subtype.
LLVM.operands — Method
operands(md::MDNode)Get the operands of the given metadata node.
LLVM.MDTuple — Type
MDTupleA tuple metadata node.
LLVM.MDNode — Method
MDNode(vals::Vector) -> MDTupleCreate a new tuple metadata node from the given operands.
Passing nothing as a value will result in a null operand.
Metadata <-> Value
LLVM.ValueAsMetadata — Type
LLVM.ValueAsMetadataAbstract type for values wrapped as metadata, for use in APIs that expect a LLVM.Metadata.
See also: Metadata(::Value) to convert back to a metadata.
LLVM.Metadata — Method
Metadata(val::Value)Wrap the given value as metadata, for use in APIs that expect a LLVM.Metadata.
When the value is already metadata wrapped as a value, this will simply return the original metadata.
LLVM.MetadataAsValue — Type
LLVM.MetadataAsValueMetadata wrapped as a regular value, for use in APIs that expect a LLVM.Value.
See also: Value(::Metadata) to convert back to a value.
LLVM.Value — Method
Value(md::Metadata)Wrap the given metadata as a value, for use in APIs that expect a LLVM.Value.
When the metadata is already a value wrapped as metadata, this will simply return the original value.
Inspecting and attaching
LLVM.metadata — Method
metadata(inst::Instruction)
metadata(inst::GlobalObject)Iterate over the metadata of the given instruction or global object.
These iterators are mutable, and implement setindex! and delete! to modify the metadata.
LLVM.NamedMDNode — Type
NamedMDNodeA named metadata node, which is a collection of metadata nodes with a name.
LLVM.metadata — Method
metadata(mod)Fetch the module-level named metadata. This can be inspected using a Dict-like interface. Mutation is different: There is no setindex! method, as named metadata is append-only. Instead, fetch the named metadata node using getindex, and push! to it.
LLVM.operands — Method
operands(node::NamedMDNode)Get the operands of the given named metadata node.
Base.push! — Method
push!(node::NamedMDNode, val::MDNode)Add a metadata node to the given named metadata node.
Debug information
LLVM.DINode — Type
DINodea tagged DWARF-like metadata node.
Location information
LLVM.DILocation — Type
DILocationA location in the source code.
LLVM.column — Function
column(location::DILocation)Get the column number of this debug location.
LLVM.scope — Method
scope(location::DILocation)Get the local scope associated with this debug location.
LLVM.inlined_at — Function
inlined_at(location::DILocation)Get the "inline at" location associated with this debug location.
Variables
LLVM.DIVariable — Type
DIVariableAbstract supertype for all variable-like metadata nodes.
LLVM.DILocalVariable — Type
DILocalVariable <: DIVariableA local variable in the source code.
LLVM.DIGlobalVariable — Type
DIGlobalVariable <: DIVariableA global variable in the source code.
LLVM.scope — Method
name(var::DIVariable)Get the name of the given variable.
Scopes
LLVM.DIScope — Type
DIScopeAbstract supertype for lexical scopes and types (which are also declaration contexts).
File
LLVM.DIFile — Type
DIFileA file in the source code.
LLVM.directory — Function
directory(file::DIFile)Get the directory of a given file.
LLVM.filename — Function
filename(file::DIFile)Get the filename of the given file.
LLVM.source — Function
source(file::DIFile)Get the source of the given file, or nothing if the source is not available.
Type
LLVM.DIType — Type
DITypeAbstract supertype for all type-like metadata nodes.
Base.sizeof — Method
sizeof(typ::DIType)Get the size in bits of the given type.
LLVM.offset — Method
offset(typ::DIType)Get the offset in bits of the given type.
LLVM.flags — Method
flags(typ::DIType)Get the flags of the given type.
Subprogram
LLVM.DISubProgram — Type
DISubProgramA subprogram in the source code.
Compile Unit
LLVM.DICompileUnit — Type
DICompileUnitA compilation unit in the source code.
Other
LLVM.DEBUG_METADATA_VERSION — Function
DEBUG_METADATA_VERSION()The current debug info version number, as supported by LLVM.
LLVM.strip_debuginfo! — Function
strip_debuginfo!(mod::Module)Strip the debug information from the given module.
LLVM.subprogram — Method
subprogram(func::Function) -> DISubProgramGet the subprogram of the given function, or nothing if the function has no subprogram.
LLVM.subprogram! — Function
subprogram!(func::Function, sp::DISubProgram)Set the subprogram of the given function.