LLVM: llvm::DistinctMDOperandPlaceholder Class Reference (original) (raw)

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

#include "[llvm/IR/Metadata.h](Metadata%5F8h%5Fsource.html)"

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.
Public Member Functions inherited from llvm::Metadata
unsigned getMetadataID () const
LLVM_ABI void dump () const
User-friendly dump.
LLVM_ABI void dump (const Module *M) const
LLVM_ABI void print (raw_ostream &OS, const Module *M=nullptr, bool IsForDebug=false) const
Print.
LLVM_ABI void print (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr, bool IsForDebug=false) const
LLVM_ABI void printAsOperand (raw_ostream &OS, const Module *M=nullptr) const
Print as operand.
LLVM_ABI void printAsOperand (raw_ostream &OS, ModuleSlotTracker &MST, const Module *M=nullptr) const
Friends
class MetadataTracking
Additional Inherited Members
Public Types inherited from llvm::Metadata
enum MetadataKind
Static Public Attributes inherited from llvm::Metadata
static constexpr const unsigned PoisonGeneratingIDs []
Metadata IDs that may generate poison.
Protected Types inherited from llvm::Metadata
enum StorageType { Uniqued, Distinct, Temporary }
Active type of storage. More...
Protected Member Functions inherited from llvm::Metadata
Metadata (unsigned ID, StorageType Storage)
~Metadata ()=default
void handleChangedOperand (void *, Metadata *)
Default handling of a changed operand, which asserts.
Protected Attributes inherited from llvm::Metadata
unsigned char Storage: 7
Storage flag for non-uniqued, otherwise unowned, metadata.
unsigned char SubclassData1: 1
unsigned short SubclassData16 = 0
unsigned SubclassData32 = 0

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 1712 of file Metadata.h.

llvm::DistinctMDOperandPlaceholder::DistinctMDOperandPlaceholder ( unsigned ID) inlineexplicit

DistinctMDOperandPlaceholder() [2/4]

llvm::DistinctMDOperandPlaceholder::DistinctMDOperandPlaceholder ( ) delete

DistinctMDOperandPlaceholder() [3/4]

DistinctMDOperandPlaceholder() [4/4]

~DistinctMDOperandPlaceholder()

llvm::DistinctMDOperandPlaceholder::~DistinctMDOperandPlaceholder ( ) inline

getID()

unsigned llvm::DistinctMDOperandPlaceholder::getID ( ) const inline

replaceUseWith()

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

MetadataTracking


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