LLVM  6.0.0svn
Public Member Functions | Friends | List of all members
llvm::DistinctMDOperandPlaceholder Class Reference

Placeholder metadata for operands of distinct MDNodes. More...

#include "llvm/IR/Metadata.h"

Inheritance diagram for llvm::DistinctMDOperandPlaceholder:
Inheritance graph
Collaboration diagram for llvm::DistinctMDOperandPlaceholder:
Collaboration graph

Public Member Functions

 DistinctMDOperandPlaceholder (unsigned ID)
 DistinctMDOperandPlaceholder ()=delete
 DistinctMDOperandPlaceholder (DistinctMDOperandPlaceholder &&)=delete
 DistinctMDOperandPlaceholder (const DistinctMDOperandPlaceholder &)=delete
 ~DistinctMDOperandPlaceholder ()
unsigned getID () const
void replaceUseWith (Metadata *MD)
 Replace the use of this with MD. More...


class MetadataTracking

Additional Inherited Members

 Active type of storage. More...

Detailed Description

Placeholder metadata for operands of distinct MDNodes.

This is a lightweight placeholder for an operand of a distinct node. It's purpose is to help track forward references when creating a distinct node. This allows distinct nodes involved in a cycle to be constructed before their operands without requiring a heavyweight temporary node with full-blown RAUW support.

Each placeholder supports only a single MDNode user. Clients should pass an ID, retrieved via getID(), to indicate the "real" operand that this should be replaced with.

While it would be possible to implement move operators, they would be fairly expensive. Leave them unimplemented to discourage their use (clients can use std::deque, std::list, BumpPtrAllocator, etc.).

Definition at line 1279 of file Metadata.h.

Constructor & Destructor Documentation

◆ DistinctMDOperandPlaceholder() [1/4]

llvm::DistinctMDOperandPlaceholder::DistinctMDOperandPlaceholder ( unsigned  ID)

Definition at line 1285 of file Metadata.h.

References llvm::Metadata::SubclassData32.

◆ DistinctMDOperandPlaceholder() [2/4]

llvm::DistinctMDOperandPlaceholder::DistinctMDOperandPlaceholder ( )

◆ DistinctMDOperandPlaceholder() [3/4]

llvm::DistinctMDOperandPlaceholder::DistinctMDOperandPlaceholder ( DistinctMDOperandPlaceholder &&  )

◆ DistinctMDOperandPlaceholder() [4/4]

llvm::DistinctMDOperandPlaceholder::DistinctMDOperandPlaceholder ( const DistinctMDOperandPlaceholder )

◆ ~DistinctMDOperandPlaceholder()

llvm::DistinctMDOperandPlaceholder::~DistinctMDOperandPlaceholder ( )

Definition at line 1294 of file Metadata.h.

Member Function Documentation

◆ getID()

unsigned llvm::DistinctMDOperandPlaceholder::getID ( ) const

Definition at line 1299 of file Metadata.h.

References llvm::Metadata::SubclassData32.

◆ replaceUseWith()

void llvm::DistinctMDOperandPlaceholder::replaceUseWith ( Metadata MD)

Replace the use of this with MD.

Definition at line 1302 of file Metadata.h.

References assert(), llvm::MetadataTracking::track(), and llvm::MetadataTracking::untrack().

Friends And Related Function Documentation

◆ MetadataTracking

friend class MetadataTracking

Definition at line 1280 of file Metadata.h.

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