LLVM API Documentation

llvm::MDNode Class Reference

#include <Metadata.h>

Inheritance diagram for llvm::MDNode:
[legend]
Collaboration diagram for llvm::MDNode:
[legend]

List of all members.

Public Types

typedef SmallVectorImpl
< WeakVH >::const_iterator 
const_elem_iterator
typedef SmallVectorImpl
< WeakVH >::iterator 
elem_iterator

Public Member Functions

void * operator new (size_t s)
void dropAllReferences ()
 dropAllReferences - Remove all uses and clear node vector.
 ~MDNode ()
 ~MDNode - Destroy MDNode.
Value * getElement (unsigned i) const
 getElement - Return specified element.
unsigned getNumElements () const
 getNumElements - Return number of MDNode elements.
bool elem_empty () const
 elem_empty - Return true if MDNode is empty.
const_elem_iterator elem_begin () const
const_elem_iterator elem_end () const
elem_iterator elem_begin ()
elem_iterator elem_end ()
virtual bool isNullValue () const
virtual void replaceUsesOfWithOnConstant (Value *From, Value *To, Use *U)

Static Public Member Functions

static MDNode * get (LLVMContext &Context, Value *const *Vals, unsigned NumVals)
static bool classof (const MDNode *)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Value *V)

Protected Member Functions

 MDNode (LLVMContext &C, Value *const *Vals, unsigned NumVals)

Friends

struct ConstantCreator< MDNode, Type, std::vector< Value * > >


Detailed Description

MDNode - a tuple of other values. These contain a list of the values that represent the metadata. MDNode is always unnamed.

Definition at line 106 of file Metadata.h.


Member Typedef Documentation

Definition at line 144 of file Metadata.h.

Definition at line 145 of file Metadata.h.


Constructor & Destructor Documentation

MDNode::MDNode ( LLVMContext &  C,
Value *const *  Vals,
unsigned  NumVals 
) [explicit, protected]

MDNode::~MDNode (  ) 


Member Function Documentation

void* llvm::MDNode::operator new ( size_t  s  )  [inline]

Reimplemented from llvm::User.

Definition at line 119 of file Metadata.h.

References operator new().

MDNode * MDNode::get ( LLVMContext &  Context,
Value *const *  Vals,
unsigned  NumVals 
) [static]

void MDNode::dropAllReferences (  ) 

dropAllReferences - Remove all uses and clear node vector.

Reimplemented from llvm::User.

Definition at line 90 of file Metadata.cpp.

References llvm::User::dropAllReferences().

Referenced by ~MDNode().

Value* llvm::MDNode::getElement ( unsigned  i  )  const [inline]

getElement - Return specified element.

Definition at line 133 of file Metadata.h.

References getNumElements().

Referenced by getValType(), llvm::Value::print(), and WriteMDNode().

unsigned llvm::MDNode::getNumElements (  )  const [inline]

getNumElements - Return number of MDNode elements.

Definition at line 139 of file Metadata.h.

Referenced by getElement(), getValType(), llvm::Value::print(), and WriteMDNode().

bool llvm::MDNode::elem_empty (  )  const [inline]

elem_empty - Return true if MDNode is empty.

Definition at line 147 of file Metadata.h.

const_elem_iterator llvm::MDNode::elem_begin (  )  const [inline]

Definition at line 148 of file Metadata.h.

Referenced by WriteMDNodes().

const_elem_iterator llvm::MDNode::elem_end (  )  const [inline]

Definition at line 149 of file Metadata.h.

Referenced by WriteMDNodes().

elem_iterator llvm::MDNode::elem_begin (  )  [inline]

Definition at line 150 of file Metadata.h.

elem_iterator llvm::MDNode::elem_end (  )  [inline]

Definition at line 151 of file Metadata.h.

virtual bool llvm::MDNode::isNullValue (  )  const [inline, virtual]

isNullValue - Return true if this is the value that would be returned by getNullValue. This always returns false because getNullValue will never produce metadata.

Reimplemented from llvm::MetadataBase.

Definition at line 156 of file Metadata.h.

virtual void llvm::MDNode::replaceUsesOfWithOnConstant ( Value *  From,
Value *  To,
Use *  U 
) [inline, virtual]

Definition at line 160 of file Metadata.h.

References llvm_unreachable.

static bool llvm::MDNode::classof ( const MDNode *   )  [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:.

Definition at line 165 of file Metadata.h.

static bool llvm::MDNode::classof ( const Value *  V  )  [inline, static]

Reimplemented from llvm::MetadataBase.

Definition at line 166 of file Metadata.h.

References llvm::Value::getValueID(), and llvm::Value::MDNodeVal.


Friends And Related Function Documentation

friend struct ConstantCreator< MDNode, Type, std::vector< Value * > > [friend]

Definition at line 114 of file Metadata.h.


The documentation for this class was generated from the following files: