class Metadata

Declaration

class Metadata { /* full declaration omitted */ };

Description

Root of the metadata hierarchy. This is a root class for typeless data in the IR.

Declared at: llvm/include/llvm/IR/Metadata.h:58

Member Variables

protected unsigned char Storage
Storage flag for non-uniqued, otherwise unowned, metadata.
protected unsigned char ImplicitCode
protected unsigned short SubclassData16 = 0
protected unsigned int SubclassData32 = 0

Method Overview

  • protected Metadata(unsigned int ID, llvm::Metadata::StorageType Storage)
  • public void dump() const
  • public void dump(const llvm::Module * M) const
  • public unsigned int getMetadataID() const
  • protected void handleChangedOperand(void *, llvm::Metadata *)
  • public void print(llvm::raw_ostream & OS, const llvm::Module * M = nullptr, bool IsForDebug = false) const
  • public void print(llvm::raw_ostream & OS, llvm::ModuleSlotTracker & MST, const llvm::Module * M = nullptr, bool IsForDebug = false) const
  • public void printAsOperand(llvm::raw_ostream & OS, const llvm::Module * M = nullptr) const
  • public void printAsOperand(llvm::raw_ostream & OS, llvm::ModuleSlotTracker & MST, const llvm::Module * M = nullptr) const
  • protected ~Metadata()

Methods

Metadata(unsigned int ID,
         llvm::Metadata::StorageType Storage)

Declared at: llvm/include/llvm/IR/Metadata.h:84

Parameters

unsigned int ID
llvm::Metadata::StorageType Storage

void dump() const

Description

User-friendly dump. If \c M is provided, metadata nodes will be numbered canonically; otherwise, pointer addresses are substituted. Note: this uses an explicit overload instead of default arguments so that the nullptr version is easy to call from a debugger. @ {

Declared at: llvm/include/llvm/IR/Metadata.h:111

void dump(const llvm::Module* M) const

Declared at: llvm/include/llvm/IR/Metadata.h:112

Parameters

const llvm::Module* M

unsigned int getMetadataID() const

Declared at: llvm/include/llvm/IR/Metadata.h:100

void handleChangedOperand(void*, llvm::Metadata*)

Description

Default handling of a changed operand, which asserts. If subclasses pass themselves in as owners to a tracking node reference, they must provide an implementation of this method.

Declared at: llvm/include/llvm/IR/Metadata.h:95

Parameters

void*
llvm::Metadata*

void print(llvm::raw_ostream& OS,
           const llvm::Module* M = nullptr,
           bool IsForDebug = false) const

Description

Print. Prints definition of \c this. If \c M is provided, metadata nodes will be numbered canonically; otherwise, pointer addresses are substituted. @ {

Declared at: llvm/include/llvm/IR/Metadata.h:122

Parameters

llvm::raw_ostream& OS
const llvm::Module* M = nullptr
bool IsForDebug = false

void print(llvm::raw_ostream& OS,
           llvm::ModuleSlotTracker& MST,
           const llvm::Module* M = nullptr,
           bool IsForDebug = false) const

Declared at: llvm/include/llvm/IR/Metadata.h:124

Parameters

llvm::raw_ostream& OS
llvm::ModuleSlotTracker& MST
const llvm::Module* M = nullptr
bool IsForDebug = false

void printAsOperand(
    llvm::raw_ostream& OS,
    const llvm::Module* M = nullptr) const

Description

Print as operand. Prints reference of \c this. If \c M is provided, metadata nodes will be numbered canonically; otherwise, pointer addresses are substituted. @ {

Declared at: llvm/include/llvm/IR/Metadata.h:135

Parameters

llvm::raw_ostream& OS
const llvm::Module* M = nullptr

void printAsOperand(
    llvm::raw_ostream& OS,
    llvm::ModuleSlotTracker& MST,
    const llvm::Module* M = nullptr) const

Declared at: llvm/include/llvm/IR/Metadata.h:136

Parameters

llvm::raw_ostream& OS
llvm::ModuleSlotTracker& MST
const llvm::Module* M = nullptr

~Metadata()

Declared at: llvm/include/llvm/IR/Metadata.h:89