LLVM  3.7.0
Classes | Public Types | Public Member Functions | Friends | List of all members
llvm::NamedMDNode Class Reference

A tuple of MDNodes. More...

#include <Metadata.h>

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

Public Types

typedef op_iterator_impl
< MDNode *, MDNode
op_iterator
 
typedef op_iterator_impl
< const MDNode *, MDNode
const_op_iterator
 

Public Member Functions

void eraseFromParent ()
 Drop all references and remove the node from parent module. More...
 
void dropAllReferences ()
 Remove all uses and clear node vector. More...
 
 ~NamedMDNode ()
 
ModulegetParent ()
 Get the module that holds this named metadata collection. More...
 
const ModulegetParent () const
 
MDNodegetOperand (unsigned i) const
 
unsigned getNumOperands () const
 
void addOperand (MDNode *M)
 
void setOperand (unsigned I, MDNode *New)
 
StringRef getName () const
 
void print (raw_ostream &ROS) const
 
void dump () const
 
op_iterator op_begin ()
 
op_iterator op_end ()
 
const_op_iterator op_begin () const
 
const_op_iterator op_end () const
 
iterator_range< op_iteratoroperands ()
 
iterator_range< const_op_iteratoroperands () const
 
- Public Member Functions inherited from llvm::ilist_node< NamedMDNode >
NamedMDNodegetPrevNode ()
 Get the previous node, or 0 for the list head. More...
 
const NamedMDNodegetPrevNode () const
 Get the previous node, or 0 for the list head. More...
 
NamedMDNodegetNextNode ()
 Get the next node, or 0 for the list tail. More...
 
const NamedMDNodegetNextNode () const
 Get the next node, or 0 for the list tail. More...
 

Friends

class SymbolTableListTraits< NamedMDNode, Module >
 
struct ilist_traits< NamedMDNode >
 
class LLVMContextImpl
 
class Module
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::ilist_node< NamedMDNode >
 ilist_node ()
 

Detailed Description

A tuple of MDNodes.

Despite its name, a NamedMDNode isn't itself an MDNode. NamedMDNodes belong to modules, have names, and contain lists of MDNodes.

TODO: Inherit from Metadata.

Definition at line 1127 of file Metadata.h.

Member Typedef Documentation

Definition at line 1206 of file Metadata.h.

typedef op_iterator_impl<MDNode *, MDNode> llvm::NamedMDNode::op_iterator

Definition at line 1202 of file Metadata.h.

Constructor & Destructor Documentation

NamedMDNode::~NamedMDNode ( )

Definition at line 956 of file Metadata.cpp.

References dropAllReferences(), and getNMDOps().

Member Function Documentation

void NamedMDNode::addOperand ( MDNode M)
void NamedMDNode::dropAllReferences ( )

Remove all uses and clear node vector.

Definition at line 982 of file Metadata.cpp.

References getNMDOps().

Referenced by ~NamedMDNode().

LLVM_DUMP_METHOD void NamedMDNode::dump ( ) const

Definition at line 3369 of file AsmWriter.cpp.

References llvm::dbgs(), and print().

void NamedMDNode::eraseFromParent ( )

Drop all references and remove the node from parent module.

Definition at line 978 of file Metadata.cpp.

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

Referenced by llvm::StripDebugInfo().

StringRef NamedMDNode::getName ( ) const
unsigned NamedMDNode::getNumOperands ( ) const
MDNode * NamedMDNode::getOperand ( unsigned  i) const
Module* llvm::NamedMDNode::getParent ( )
inline

Get the module that holds this named metadata collection.

Definition at line 1188 of file Metadata.h.

Referenced by eraseFromParent(), and print().

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

Definition at line 1189 of file Metadata.h.

op_iterator llvm::NamedMDNode::op_begin ( )
inline

Definition at line 1203 of file Metadata.h.

Referenced by operands().

const_op_iterator llvm::NamedMDNode::op_begin ( ) const
inline

Definition at line 1207 of file Metadata.h.

op_iterator llvm::NamedMDNode::op_end ( )
inline

Definition at line 1204 of file Metadata.h.

References getNumOperands().

Referenced by operands().

const_op_iterator llvm::NamedMDNode::op_end ( ) const
inline

Definition at line 1208 of file Metadata.h.

References getNumOperands().

iterator_range<op_iterator> llvm::NamedMDNode::operands ( )
inline
iterator_range<const_op_iterator> llvm::NamedMDNode::operands ( ) const
inline

Definition at line 1213 of file Metadata.h.

References op_begin(), and op_end().

void NamedMDNode::print ( raw_ostream ROS) const

Definition at line 3154 of file AsmWriter.cpp.

References getParent().

Referenced by dump().

void NamedMDNode::setOperand ( unsigned  I,
MDNode New 
)

Definition at line 973 of file Metadata.cpp.

References getNMDOps(), getNumOperands(), and I.

Friends And Related Function Documentation

friend struct ilist_traits< NamedMDNode >
friend

Definition at line 1129 of file Metadata.h.

friend class LLVMContextImpl
friend

Definition at line 1130 of file Metadata.h.

friend class Module
friend

Definition at line 1131 of file Metadata.h.

friend class SymbolTableListTraits< NamedMDNode, Module >
friend

Definition at line 1128 of file Metadata.h.


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