LLVM API Documentation

llvm::NamedMDNode Class Reference

#include <Metadata.h>

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

List of all members.

Public Types

typedef SmallVectorImpl
< WeakMetadataVH >
::const_iterator 
const_elem_iterator

Public Member Functions

void * operator new (size_t s)
void eraseFromParent ()
void dropAllReferences ()
 dropAllReferences - Remove all uses and clear node vector.
 ~NamedMDNode ()
 ~NamedMDNode - Destroy NamedMDNode.
Module * getParent ()
 getParent - Get the module that holds this named metadata collection.
const Module * getParent () const
void setParent (Module *M)
MetadataBase * getElement (unsigned i) const
 getElement - Return specified element.
unsigned getNumElements () const
 getNumElements - Return number of NamedMDNode elements.
void addElement (MetadataBase *M)
 addElement - Add metadata element.
bool elem_empty () const
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 NamedMDNode * Create (LLVMContext &C, const Twine &N, MetadataBase *const *MDs, unsigned NumMDs, Module *M=0)
static NamedMDNode * Create (const NamedMDNode *NMD, Module *M=0)
static bool classof (const NamedMDNode *)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Value *V)

Protected Member Functions

 NamedMDNode (LLVMContext &C, const Twine &N, MetadataBase *const *Vals, unsigned NumVals, Module *M=0)

Friends

class SymbolTableListTraits< NamedMDNode, Module >
class LLVMContextImpl


Detailed Description

Definition at line 194 of file Metadata.h.


Member Typedef Documentation

Definition at line 256 of file Metadata.h.


Constructor & Destructor Documentation

NamedMDNode::NamedMDNode ( LLVMContext &  C,
const Twine &  N,
MetadataBase *const *  Vals,
unsigned  NumVals,
Module *  M = 0 
) [explicit, protected]

NamedMDNode::~NamedMDNode (  ) 

~NamedMDNode - Destroy NamedMDNode.

Definition at line 149 of file Metadata.cpp.

References dropAllReferences().


Member Function Documentation

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

Reimplemented from llvm::User.

Definition at line 212 of file Metadata.h.

References operator new().

static NamedMDNode* llvm::NamedMDNode::Create ( LLVMContext &  C,
const Twine &  N,
MetadataBase *const *  MDs,
unsigned  NumMDs,
Module *  M = 0 
) [inline, static]

Definition at line 215 of file Metadata.h.

References M.

Referenced by llvm::Module::getOrInsertNamedMetadata().

NamedMDNode * NamedMDNode::Create ( const NamedMDNode *  NMD,
Module *  M = 0 
) [static]

void NamedMDNode::eraseFromParent (  ) 

eraseFromParent - Drop all references and remove the node from parent module.

eraseFromParent - Drop all references and remove the node from parent module.

Definition at line 139 of file Metadata.cpp.

References llvm::Module::getNamedMDList(), and getParent().

void NamedMDNode::dropAllReferences (  ) 

dropAllReferences - Remove all uses and clear node vector.

Reimplemented from llvm::User.

Definition at line 144 of file Metadata.cpp.

References llvm::User::dropAllReferences().

Referenced by ~NamedMDNode().

Module* llvm::NamedMDNode::getParent (  )  [inline]

getParent - Get the module that holds this named metadata collection.

Definition at line 234 of file Metadata.h.

Referenced by eraseFromParent().

const Module* llvm::NamedMDNode::getParent (  )  const [inline]

Definition at line 235 of file Metadata.h.

void llvm::NamedMDNode::setParent ( Module *  M  )  [inline]

Definition at line 236 of file Metadata.h.

MetadataBase* llvm::NamedMDNode::getElement ( unsigned  i  )  const [inline]

getElement - Return specified element.

Definition at line 239 of file Metadata.h.

References getNumElements(), and Node.

Referenced by Create(), and LinkNamedMDNodes().

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

getNumElements - Return number of NamedMDNode elements.

Definition at line 245 of file Metadata.h.

References Node.

Referenced by Create(), getElement(), and LinkNamedMDNodes().

void llvm::NamedMDNode::addElement ( MetadataBase *  M  )  [inline]

addElement - Add metadata element.

Definition at line 250 of file Metadata.h.

References Node, llvm::User::NumOperands, llvm::User::OperandList, and llvm::MetadataBase::resizeOperands().

Referenced by LinkNamedMDNodes().

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

Definition at line 257 of file Metadata.h.

References Node.

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

Definition at line 258 of file Metadata.h.

References llvm::DomTreeNodeBase< NodeT >::begin(), and Node.

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

Definition at line 259 of file Metadata.h.

References llvm::DomTreeNodeBase< NodeT >::end(), and Node.

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

Definition at line 260 of file Metadata.h.

References llvm::DomTreeNodeBase< NodeT >::begin(), and Node.

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

Definition at line 261 of file Metadata.h.

References llvm::DomTreeNodeBase< NodeT >::end(), and Node.

virtual bool llvm::NamedMDNode::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 266 of file Metadata.h.

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

Definition at line 270 of file Metadata.h.

References llvm_unreachable.

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

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

Definition at line 276 of file Metadata.h.

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

Reimplemented from llvm::MetadataBase.

Definition at line 277 of file Metadata.h.

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


Friends And Related Function Documentation

friend class SymbolTableListTraits< NamedMDNode, Module > [friend]

Definition at line 195 of file Metadata.h.

friend class LLVMContextImpl [friend]

Definition at line 196 of file Metadata.h.


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