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

A tuple of MDNodes. More...

#include "llvm/IR/Metadata.h"

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

Public Types

using op_iterator = op_iterator_impl< MDNode *, MDNode >
 
using const_op_iterator = op_iterator_impl< const MDNode *, MDNode >
 

Public Member Functions

 NamedMDNode (const NamedMDNode &)=delete
 
 ~NamedMDNode ()
 
void eraseFromParent ()
 Drop all references and remove the node from parent module. More...
 
void dropAllReferences ()
 Remove all uses and clear node vector. More...
 
void clearOperands ()
 Drop all references to this node's operands. More...
 
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, bool IsForDebug=false) const
 
void print (raw_ostream &ROS, ModuleSlotTracker &MST, bool IsForDebug=false) 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_impl< ilist_detail::compute_node_options< NamedMDNode, Options... >::type >
self_iterator getIterator ()
 
const_self_iterator getIterator () const
 
reverse_self_iterator getReverseIterator ()
 
const_reverse_self_iterator getReverseIterator () const
 
bool isSentinel () const
 Check whether this is the sentinel node. More...
 

Friends

class LLVMContextImpl
 
class Module
 

Additional Inherited Members

- Protected Types inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< NamedMDNode, Options... >::type >
using self_iterator = ilist_iterator< ilist_detail::compute_node_options< NamedMDNode, Options... >::type, false, false >
 
using const_self_iterator = ilist_iterator< ilist_detail::compute_node_options< NamedMDNode, Options... >::type, false, true >
 
using reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< NamedMDNode, Options... >::type, true, false >
 
using const_reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< NamedMDNode, Options... >::type, true, true >
 
- Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< NamedMDNode, Options... >::type >
 ilist_node_impl ()=default
 

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 1323 of file Metadata.h.

Member Typedef Documentation

◆ const_op_iterator

Definition at line 1410 of file Metadata.h.

◆ op_iterator

using llvm::NamedMDNode::op_iterator = op_iterator_impl<MDNode *, MDNode>

Definition at line 1405 of file Metadata.h.

Constructor & Destructor Documentation

◆ NamedMDNode()

llvm::NamedMDNode::NamedMDNode ( const NamedMDNode )
delete

◆ ~NamedMDNode()

NamedMDNode::~NamedMDNode ( )

Definition at line 1064 of file Metadata.cpp.

References llvm::MDNode::dropAllReferences(), and getNMDOps().

Member Function Documentation

◆ addOperand()

void NamedMDNode::addOperand ( MDNode M)

◆ clearOperands()

void NamedMDNode::clearOperands ( )

Drop all references to this node's operands.

Definition at line 1088 of file Metadata.cpp.

References getNMDOps().

Referenced by StripSymbolNames().

◆ dropAllReferences()

void llvm::NamedMDNode::dropAllReferences ( )
inline

Remove all uses and clear node vector.

Definition at line 1384 of file Metadata.h.

◆ dump()

LLVM_DUMP_METHOD void NamedMDNode::dump ( ) const

Definition at line 3660 of file AsmWriter.cpp.

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

◆ eraseFromParent()

void NamedMDNode::eraseFromParent ( )

Drop all references and remove the node from parent module.

Definition at line 1086 of file Metadata.cpp.

References getParent().

Referenced by llvm::StripDebugInfo().

◆ getName()

StringRef NamedMDNode::getName ( ) const

◆ getNumOperands()

unsigned NamedMDNode::getNumOperands ( ) const

◆ getOperand()

MDNode * NamedMDNode::getOperand ( unsigned  i) const

◆ getParent() [1/2]

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

Get the module that holds this named metadata collection.

Definition at line 1389 of file Metadata.h.

◆ getParent() [2/2]

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

Definition at line 1390 of file Metadata.h.

References addOperand(), llvm::Metadata::dump(), getName(), I, and llvm::Metadata::print().

◆ op_begin() [1/2]

op_iterator llvm::NamedMDNode::op_begin ( )
inline

Definition at line 1407 of file Metadata.h.

◆ op_begin() [2/2]

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

Definition at line 1412 of file Metadata.h.

◆ op_end() [1/2]

op_iterator llvm::NamedMDNode::op_end ( )
inline

Definition at line 1408 of file Metadata.h.

◆ op_end() [2/2]

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

Definition at line 1413 of file Metadata.h.

◆ operands() [1/2]

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

◆ operands() [2/2]

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

Definition at line 1418 of file Metadata.h.

References llvm::make_range().

◆ print() [1/2]

void NamedMDNode::print ( raw_ostream ROS,
bool  IsForDebug = false 
) const

Definition at line 3420 of file AsmWriter.cpp.

References getParent(), and llvm::RISCVFenceField::W.

Referenced by llvm::VerifierSupport::VerifierSupport().

◆ print() [2/2]

void NamedMDNode::print ( raw_ostream ROS,
ModuleSlotTracker MST,
bool  IsForDebug = false 
) const

◆ setOperand()

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

Friends And Related Function Documentation

◆ LLVMContextImpl

friend class LLVMContextImpl
friend

Definition at line 1324 of file Metadata.h.

◆ Module

friend class Module
friend

Definition at line 1325 of file Metadata.h.


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