MDNode

public struct MDNode : IRMetadata

MDNode objects represent generic nodes in a metadata graph.

A metadata node is a tuple of references to other metadata. In general, metadata graphs are acyclic and terminate in metadata nodes without operands.

  • Declaration

    Swift

    public init(llvm: LLVMMetadataRef)
  • Create a metadata node in the given context with the given operands.

    Declaration

    Swift

    public init(in context: Context = .global, operands: [IRMetadata])

    Parameters

    context

    The context to allocate the node in.

    operands

    The operands to attach to the metadata node.

  • Create a metadata node with the value of a given constant.

    Declaration

    Swift

    public init(constant: IRConstant)

    Parameters

    constant

    The constant value to attach to the node.

  • Declaration

    Swift

    public func asMetadata() -> LLVMMetadataRef