LLVM API Documentation

Public Member Functions | Friends
llvm::NamedMDNode Class Reference

#include <Metadata.h>

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

List of all members.

Public Member Functions

void eraseFromParent ()
void dropAllReferences ()
 dropAllReferences - Remove all uses and clear node vector.
 ~NamedMDNode ()
 ~NamedMDNode - Destroy NamedMDNode.
ModulegetParent ()
 getParent - Get the module that holds this named metadata collection.
const ModulegetParent () const
MDNodegetOperand (unsigned i) const
 getOperand - Return specified operand.
unsigned getNumOperands () const
 getNumOperands - Return the number of NamedMDNode operands.
void addOperand (MDNode *M)
 addOperand - Add metadata operand.
StringRef getName () const
 getName - Return a constant reference to this named metadata's name.
void print (raw_ostream &ROS, AssemblyAnnotationWriter *AAW=0) const
 print - Implement operator<< on NamedMDNode.
void dump () const
 dump() - Allow printing of NamedMDNodes from the debugger.

Friends

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

Detailed Description

NamedMDNode - 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.

Definition at line 191 of file Metadata.h.


Constructor & Destructor Documentation

NamedMDNode::~NamedMDNode ( )

~NamedMDNode - Destroy NamedMDNode.

Definition at line 532 of file Metadata.cpp.

References dropAllReferences(), and getNMDOps().


Member Function Documentation

void NamedMDNode::addOperand ( MDNode M)

addOperand - Add metadata operand.

addOperand - Add metadata Operand.

Definition at line 549 of file Metadata.cpp.

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

Referenced by llvm::Module::addModuleFlag(), llvm::CloneModule(), llvm::DIBuilder::createCompileUnit(), llvm::DIBuilder::createLocalVariable(), and LLVMAddNamedMetadataOperand().

void NamedMDNode::dropAllReferences ( )

dropAllReferences - Remove all uses and clear node vector.

Definition at line 562 of file Metadata.cpp.

References getNMDOps().

Referenced by ~NamedMDNode().

void NamedMDNode::dump ( ) const

dump() - Allow printing of NamedMDNodes from the debugger.

Definition at line 2214 of file AsmWriter.cpp.

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

void NamedMDNode::eraseFromParent ( )

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

Definition at line 557 of file Metadata.cpp.

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

Referenced by StripDebugInfo().

StringRef NamedMDNode::getName ( ) const

getName - Return a constant reference to this named metadata's name.

Definition at line 567 of file Metadata.cpp.

Referenced by llvm::CloneModule(), llvm::Module::eraseNamedMetadata(), llvm::AssemblyWriter::printNamedMDNode(), StripDebugInfo(), and WriteModuleMetadata().

unsigned NamedMDNode::getNumOperands ( ) const
MDNode * NamedMDNode::getOperand ( unsigned  i) const
Module* llvm::NamedMDNode::getParent ( ) [inline]

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

Definition at line 218 of file Metadata.h.

Referenced by eraseFromParent(), and print().

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

Definition at line 219 of file Metadata.h.

void NamedMDNode::print ( raw_ostream ROS,
AssemblyAnnotationWriter AAW = 0 
) const

print - Implement operator<< on NamedMDNode.

Definition at line 2132 of file AsmWriter.cpp.

References getParent(), and llvm::AssemblyWriter::printNamedMDNode().

Referenced by dump().


Friends And Related Function Documentation

friend struct ilist_traits< NamedMDNode > [friend]

Definition at line 193 of file Metadata.h.

friend class LLVMContextImpl [friend]

Definition at line 194 of file Metadata.h.

friend class Module [friend]

Definition at line 195 of file Metadata.h.

friend class SymbolTableListTraits< NamedMDNode, Module > [friend]

Definition at line 192 of file Metadata.h.


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