LLVM API Documentation
#include <Metadata.h>
Classes | |
class | op_iterator_impl |
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 () |
void | dropAllReferences () |
dropAllReferences - Remove all uses and clear node vector. | |
~NamedMDNode () | |
~NamedMDNode - Destroy NamedMDNode. | |
Module * | getParent () |
getParent - Get the module that holds this named metadata collection. | |
const Module * | getParent () const |
MDNode * | getOperand (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) const |
print - Implement operator<< on NamedMDNode. | |
void | dump () const |
dump() - Allow printing of NamedMDNodes from the debugger. | |
op_iterator | op_begin () |
op_iterator | op_end () |
const_op_iterator | op_begin () const |
const_op_iterator | op_end () const |
iterator_range< op_iterator > | operands () |
iterator_range< const_op_iterator > | operands () const |
Friends | |
class | SymbolTableListTraits< NamedMDNode, Module > |
struct | ilist_traits< NamedMDNode > |
class | LLVMContextImpl |
class | Module |
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 251 of file Metadata.h.
typedef op_iterator_impl<const MDNode*, MDNode> llvm::NamedMDNode::const_op_iterator |
Definition at line 342 of file Metadata.h.
typedef op_iterator_impl<MDNode*, MDNode> llvm::NamedMDNode::op_iterator |
Definition at line 338 of file Metadata.h.
~NamedMDNode - Destroy NamedMDNode.
Definition at line 570 of file Metadata.cpp.
References dropAllReferences(), and getNMDOps().
void NamedMDNode::addOperand | ( | MDNode * | M | ) |
addOperand - Add metadata operand.
addOperand - Add metadata Operand.
Definition at line 587 of file Metadata.cpp.
References getNMDOps(), llvm::MDNode::isFunctionLocal(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
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 600 of file Metadata.cpp.
References llvm::SmallVectorImpl< T >::clear(), and getNMDOps().
Referenced by ~NamedMDNode().
void NamedMDNode::dump | ( | ) | const |
dump() - Allow printing of NamedMDNodes from the debugger.
Definition at line 2568 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 595 of file Metadata.cpp.
References llvm::Module::eraseNamedMetadata(), and getParent().
Referenced by llvm::StripDebugInfo().
StringRef NamedMDNode::getName | ( | ) | const |
getName - Return a constant reference to this named metadata's name.
Definition at line 605 of file Metadata.cpp.
Referenced by llvm::CloneModule(), llvm::Module::eraseNamedMetadata(), llvm::AssemblyWriter::printNamedMDNode(), llvm::StripDebugInfo(), and WriteModuleMetadata().
unsigned NamedMDNode::getNumOperands | ( | ) | const |
getNumOperands - Return the number of NamedMDNode operands.
getNumOperands - Return number of NamedMDNode operands.
Definition at line 576 of file Metadata.cpp.
References getNMDOps(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::DwarfDebug::beginModule(), cacheAnnotationFromMD(), llvm::CloneModule(), llvm::generateDITypeIdentifierMap(), getOperand(), LLVMGetNamedMetadataOperands(), op_end(), llvm::AssemblyWriter::printNamedMDNode(), llvm::TypeFinder::run(), and WriteModuleMetadata().
MDNode * NamedMDNode::getOperand | ( | unsigned | i | ) | const |
getOperand - Return specified operand.
Definition at line 581 of file Metadata.cpp.
References llvm::dyn_cast(), getNMDOps(), and getNumOperands().
Referenced by cacheAnnotationFromMD(), llvm::CloneModule(), llvm::generateDITypeIdentifierMap(), LLVMGetNamedMetadataOperands(), llvm::AssemblyWriter::printNamedMDNode(), llvm::TypeFinder::run(), and WriteModuleMetadata().
Module* llvm::NamedMDNode::getParent | ( | ) | [inline] |
getParent - Get the module that holds this named metadata collection.
Definition at line 314 of file Metadata.h.
Referenced by eraseFromParent(), and print().
const Module* llvm::NamedMDNode::getParent | ( | ) | const [inline] |
Definition at line 315 of file Metadata.h.
op_iterator llvm::NamedMDNode::op_begin | ( | ) | [inline] |
Definition at line 339 of file Metadata.h.
Referenced by operands().
const_op_iterator llvm::NamedMDNode::op_begin | ( | ) | const [inline] |
Definition at line 343 of file Metadata.h.
op_iterator llvm::NamedMDNode::op_end | ( | ) | [inline] |
const_op_iterator llvm::NamedMDNode::op_end | ( | ) | const [inline] |
Definition at line 344 of file Metadata.h.
References getNumOperands().
iterator_range<op_iterator> llvm::NamedMDNode::operands | ( | ) | [inline] |
Definition at line 346 of file Metadata.h.
References op_begin(), and op_end().
Referenced by llvm::DwarfDebug::beginModule(), llvm::Module::getModuleFlagsMetadata(), and llvm::makeSubprogramMap().
iterator_range<const_op_iterator> llvm::NamedMDNode::operands | ( | ) | const [inline] |
Definition at line 349 of file Metadata.h.
References op_begin(), and op_end().
void NamedMDNode::print | ( | raw_ostream & | ROS | ) | const |
print - Implement operator<< on NamedMDNode.
Definition at line 2449 of file AsmWriter.cpp.
References getParent(), and llvm::AssemblyWriter::printNamedMDNode().
Referenced by dump().
friend struct ilist_traits< NamedMDNode > [friend] |
Definition at line 253 of file Metadata.h.
friend class LLVMContextImpl [friend] |
Definition at line 254 of file Metadata.h.
friend class Module [friend] |
Definition at line 255 of file Metadata.h.
friend class SymbolTableListTraits< NamedMDNode, Module > [friend] |
Definition at line 252 of file Metadata.h.