LLVM  8.0.1
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 are named module-level entities that contain lists of MDNodes.

It is illegal for a NamedMDNode to appear as an operand of an MDNode.

Definition at line 1326 of file Metadata.h.

Member Typedef Documentation

◆ const_op_iterator

Definition at line 1413 of file Metadata.h.

◆ op_iterator

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

Definition at line 1408 of file Metadata.h.

Constructor & Destructor Documentation

◆ NamedMDNode()

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

◆ ~NamedMDNode()

NamedMDNode::~NamedMDNode ( )

Definition at line 1072 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 1096 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 1387 of file Metadata.h.

◆ dump()

LLVM_DUMP_METHOD void NamedMDNode::dump ( ) const

Definition at line 4317 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 1094 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 1392 of file Metadata.h.

Referenced by LLVMGetNextNamedMetadata(), and LLVMGetPreviousNamedMetadata().

◆ getParent() [2/2]

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

Definition at line 1393 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 1410 of file Metadata.h.

◆ op_begin() [2/2]

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

Definition at line 1415 of file Metadata.h.

◆ op_end() [1/2]

op_iterator llvm::NamedMDNode::op_end ( )
inline

Definition at line 1411 of file Metadata.h.

◆ op_end() [2/2]

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

Definition at line 1416 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 1421 of file Metadata.h.

References DEFINE_ISA_CONVERSION_FUNCTIONS, and llvm::make_range().

◆ print() [1/2]

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

Definition at line 4074 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 1327 of file Metadata.h.

◆ Module

friend class Module
friend

Definition at line 1328 of file Metadata.h.


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