LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
llvm::NamedMDNode Class Reference

#include <Metadata.h>

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

Public Member Functions

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

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 534 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 551 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 564 of file Metadata.cpp.

References getNMDOps().

Referenced by ~NamedMDNode().

void NamedMDNode::dump ( ) const

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

Definition at line 2221 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 559 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 569 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 2139 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: