LLVM API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
llvm::MDNode Class Reference

Tuple of metadata. More...

#include <Metadata.h>

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

List of all members.

Public Types

typedef const MDOperandop_iterator
typedef iterator_range
< op_iterator
op_range

Public Member Functions

LLVMContextgetContext () const
void replaceOperandWith (unsigned I, Metadata *New)
 Replace a specific operand.
bool isResolved () const
 Check if node is fully resolved.
op_iterator op_begin () const
op_iterator op_end () const
op_range operands () const
const MDOperandgetOperand (unsigned I) const
unsigned getNumOperands () const
 Return number of MDNode operands.
bool isTBAAVtableAccess () const
 Check whether MDNode is a vtable access.

Static Public Member Functions

static MDNodeget (LLVMContext &Context, ArrayRef< Metadata * > MDs)
static MDNodegetWhenValsUnresolved (LLVMContext &Context, ArrayRef< Metadata * > MDs)
static MDNodegetIfExists (LLVMContext &Context, ArrayRef< Metadata * > MDs)
static MDNodeFwdDeclgetTemporary (LLVMContext &Context, ArrayRef< Metadata * > MDs)
 Return a temporary MDNode.
static void deleteTemporary (MDNode *N)
 Deallocate a node created by getTemporary.
static bool classof (const Metadata *MD)
 Methods for support type inquiry through isa, cast, and dyn_cast:
static MDNodeconcatenate (MDNode *A, MDNode *B)
 Methods for metadata merging.
static MDNodeintersect (MDNode *A, MDNode *B)
static MDNodegetMostGenericTBAA (MDNode *A, MDNode *B)
static AAMDNodes getMostGenericAA (const AAMDNodes &A, const AAMDNodes &B)
static MDNodegetMostGenericFPMath (MDNode *A, MDNode *B)
static MDNodegetMostGenericRange (MDNode *A, MDNode *B)

Protected Member Functions

void * operator new (size_t Size, unsigned NumOps)
void operator delete (void *Mem)
 Required by std, but never called.
void operator delete (void *, unsigned)
 Required by std, but never called.
void operator delete (void *, unsigned, bool)
 Required by std, but never called.
 MDNode (LLVMContext &Context, unsigned ID, ArrayRef< Metadata * > MDs)
 ~MDNode ()
void dropAllReferences ()
void storeDistinctInContext ()
MDOperandmutable_begin ()
MDOperandmutable_end ()
void setOperand (unsigned I, Metadata *New)
 Set an operand.

Static Protected Member Functions

static MDNodegetMDNode (LLVMContext &C, ArrayRef< Metadata * > MDs, bool Insert=true)

Protected Attributes

unsigned MDNodeSubclassData

Detailed Description

Tuple of metadata.

Definition at line 577 of file Metadata.h.


Member Typedef Documentation

Definition at line 657 of file Metadata.h.

Definition at line 658 of file Metadata.h.


Constructor & Destructor Documentation

MDNode::MDNode ( LLVMContext Context,
unsigned  ID,
ArrayRef< Metadata * >  MDs 
) [protected]

Definition at line 396 of file Metadata.cpp.

References I, setOperand(), and llvm::ArrayRef< T >::size().

llvm::MDNode::~MDNode ( ) [inline, protected]

Definition at line 604 of file Metadata.h.


Member Function Documentation

static bool llvm::MDNode::classof ( const Metadata MD) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented in llvm::MDNodeFwdDecl, and llvm::GenericMDNode.

Definition at line 677 of file Metadata.h.

References llvm::Metadata::GenericMDNodeKind, llvm::Metadata::getMetadataID(), and llvm::Metadata::MDNodeFwdDeclKind.

MDNode * MDNode::concatenate ( MDNode A,
MDNode B 
) [static]

Methods for metadata merging.

Definition at line 660 of file Metadata.cpp.

References llvm::ARM_PROC::A, getContext(), getNumOperands(), getOperand(), and getOrSelfReference().

Referenced by AddAliasScopeMetadata(), and CloneAliasScopeMetadata().

void MDNode::deleteTemporary ( MDNode N) [static]

Deallocate a node created by getTemporary.

The node must not have any users.

Definition at line 603 of file Metadata.cpp.

References llvm::LeakDetector::removeGarbageObject().

Referenced by llvm::BitcodeReaderMDValueList::AssignValue(), CloneAliasScopeMetadata(), llvm::MDBuilder::createAnonymousAARoot(), MapMetadataImpl(), and llvm::DIDescriptor::replaceAllUsesWith().

void MDNode::dropAllReferences ( ) [protected]

Definition at line 466 of file Metadata.cpp.

References G, I, and setOperand().

static MDNode* llvm::MDNode::get ( LLVMContext Context,
ArrayRef< Metadata * >  MDs 
) [inline, static]

Definition at line 616 of file Metadata.h.

References getMDNode().

Referenced by AddAliasScopeMetadata(), llvm::Module::addModuleFlag(), AddOperand(), canonicalizeMetadataForValue(), llvm::cleanseInlinedVariable(), CloneAliasScopeMetadata(), CloneLoopBlocks(), llvm::DILocation::copyWithNewScope(), llvm::MDBuilder::createAliasScope(), llvm::MDBuilder::createAliasScopeDomain(), llvm::MDBuilder::createAnonymousAARoot(), llvm::DIBuilder::createArrayType(), llvm::DIBuilder::createBasicType(), llvm::MDBuilder::createBranchWeights(), llvm::DIBuilder::createClassType(), llvm::DIBuilder::createCompileUnit(), llvm::DIBuilder::createEnumerationType(), llvm::DIBuilder::createEnumerator(), llvm::DIBuilder::createExpression(), llvm::DIBuilder::createFile(), createFilePathPair(), llvm::DIBuilder::createForwardDecl(), llvm::MDBuilder::createFPMath(), llvm::DIBuilder::createFriend(), llvm::DIBuilder::createFunction(), llvm::DIBuilder::createGlobalVariable(), createImportedModule(), llvm::DIBuilder::createInheritance(), llvm::createInlinedVariable(), llvm::DIBuilder::createLexicalBlock(), llvm::DIBuilder::createLexicalBlockFile(), llvm::DIBuilder::createLocalVariable(), llvm::DIBuilder::createMemberPointerType(), llvm::DIBuilder::createMemberType(), llvm::DIBuilder::createMethod(), llvm::DIBuilder::createNameSpace(), llvm::DIBuilder::createObjCIVar(), llvm::DIBuilder::createObjCProperty(), llvm::DIBuilder::createPointerType(), llvm::DIBuilder::createQualifiedType(), llvm::MDBuilder::createRange(), llvm::DIBuilder::createReferenceType(), llvm::DIBuilder::createStaticMemberType(), llvm::DIBuilder::createStructType(), llvm::DIBuilder::createSubroutineType(), llvm::MDBuilder::createTBAANode(), llvm::MDBuilder::createTBAARoot(), llvm::MDBuilder::createTBAAScalarTypeNode(), llvm::MDBuilder::createTBAAStructNode(), llvm::MDBuilder::createTBAAStructTagNode(), llvm::MDBuilder::createTBAAStructTypeNode(), llvm::DIBuilder::createTemplateTypeParameter(), createTemplateValueParameterHelper(), llvm::DIBuilder::createTypedef(), createTypeWithFlags(), llvm::DIBuilder::createUnionType(), llvm::DIBuilder::createUnspecifiedType(), llvm::DIBuilder::createVectorType(), llvm::DebugLoc::get(), getMostGenericRange(), getMostGenericTBAA(), llvm::DIBuilder::getOrCreateArray(), llvm::DIBuilder::getOrCreateSubrange(), llvm::DIBuilder::getOrCreateTypeArray(), getOrSelfReference(), LLVMMDNodeInContext(), MapMetadataImpl(), llvm::DIDescriptor::replaceAllUsesWith(), SetLoopAlreadyUnrolled(), llvm::BranchInst::swapSuccessors(), llvm::UpgradeInstWithTBAATag(), llvm::UpgradeIntrinsicCall(), and llvm::InstCombiner::visitCallInst().

static MDNode* llvm::MDNode::getIfExists ( LLVMContext Context,
ArrayRef< Metadata * >  MDs 
) [inline, static]

Definition at line 625 of file Metadata.h.

References getMDNode().

MDNode * MDNode::getMDNode ( LLVMContext C,
ArrayRef< Metadata * >  MDs,
bool  Insert = true 
) [static, protected]
MDNode * MDNode::getMostGenericFPMath ( MDNode A,
MDNode B 
) [static]

Definition at line 698 of file Metadata.cpp.

References llvm::APFloat::cmpLessThan, llvm::APFloat::compare(), and getOperand().

Referenced by llvm::combineMetadata().

MDNode * MDNode::getMostGenericRange ( MDNode A,
MDNode B 
) [static]
MDNode * MDNode::getMostGenericTBAA ( MDNode A,
MDNode B 
) [static]
MDNodeFwdDecl * MDNode::getTemporary ( LLVMContext Context,
ArrayRef< Metadata * >  MDs 
) [static]
static MDNode* llvm::MDNode::getWhenValsUnresolved ( LLVMContext Context,
ArrayRef< Metadata * >  MDs 
) [inline, static]

Definition at line 619 of file Metadata.h.

MDNode * MDNode::intersect ( MDNode A,
MDNode B 
) [static]

Check if node is fully resolved.

Reimplemented in llvm::GenericMDNode.

Definition at line 403 of file Metadata.cpp.

Referenced by llvm::LexicalScope::LexicalScope(), and MapMetadataImpl().

Check whether MDNode is a vtable access.

Definition at line 543 of file TypeBasedAliasAnalysis.cpp.

References getNumOperands(), getOperand(), and isStructPathTBAA().

MDOperand* llvm::MDNode::mutable_begin ( ) [inline, protected]

Definition at line 612 of file Metadata.h.

References mutable_end().

Referenced by op_begin(), replaceOperandWith(), and setOperand().

MDOperand* llvm::MDNode::mutable_end ( ) [inline, protected]

Definition at line 613 of file Metadata.h.

Referenced by mutable_begin(), and op_end().

op_iterator llvm::MDNode::op_begin ( ) const [inline]

Definition at line 660 of file Metadata.h.

References mutable_begin().

Referenced by llvm::GenericMDNodeInfo::KeyTy::compareOps(), getOperand(), and operands().

op_iterator llvm::MDNode::op_end ( ) const [inline]

Definition at line 663 of file Metadata.h.

References mutable_end().

Referenced by operands().

op_range llvm::MDNode::operands ( ) const [inline]

Definition at line 666 of file Metadata.h.

References op_begin(), and op_end().

Referenced by llvm::GenericMDNode::resolveCycles().

void MDNode::operator delete ( void *  Mem) [protected]

Required by std, but never called.

Definition at line 388 of file Metadata.cpp.

References N.

void llvm::MDNode::operator delete ( void *  ,
unsigned   
) [inline, protected]

Required by std, but never called.

Definition at line 594 of file Metadata.h.

References llvm_unreachable.

void llvm::MDNode::operator delete ( void *  ,
unsigned  ,
bool   
) [inline, protected]

Required by std, but never called.

Definition at line 599 of file Metadata.h.

References llvm_unreachable.

void * MDNode::operator new ( size_t  Size,
unsigned  NumOps 
) [protected]

Definition at line 380 of file Metadata.cpp.

void MDNode::replaceOperandWith ( unsigned  I,
Metadata New 
)
void MDNode::setOperand ( unsigned  I,
Metadata New 
) [protected]

Set an operand.

Sets the operand directly, without worrying about uniquing.

Definition at line 631 of file Metadata.cpp.

References I, llvm::Metadata::isStoredDistinctInContext(), mutable_begin(), and llvm::MDOperand::reset().

Referenced by dropAllReferences(), fixupLineNumbers(), MDNode(), and replaceOperandWith().

void MDNode::storeDistinctInContext ( ) [protected]

Member Data Documentation

Definition at line 586 of file Metadata.h.

Referenced by llvm::GenericMDNode::getHash().


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