LLVM 19.0.0git
Public Member Functions | List of all members
llvm::ContextAndReplaceableUses Class Reference

Pointer to the context, with optional RAUW support. More...

#include "llvm/IR/Metadata.h"

Public Member Functions

 ContextAndReplaceableUses (LLVMContext &Context)
 ContextAndReplaceableUses (std::unique_ptr< ReplaceableMetadataImpl > ReplaceableUses)
 ContextAndReplaceableUses ()=delete
 ContextAndReplaceableUses (ContextAndReplaceableUses &&)=delete
 ContextAndReplaceableUses (const ContextAndReplaceableUses &)=delete
ContextAndReplaceableUsesoperator= (ContextAndReplaceableUses &&)=delete
ContextAndReplaceableUsesoperator= (const ContextAndReplaceableUses &)=delete
 ~ContextAndReplaceableUses ()
 operator LLVMContext & ()
bool hasReplaceableUses () const
 Whether this contains RAUW support.
LLVMContextgetContext () const
ReplaceableMetadataImplgetReplaceableUses () const
ReplaceableMetadataImplgetOrCreateReplaceableUses ()
 Ensure that this has RAUW support, and then return it.
void makeReplaceable (std::unique_ptr< ReplaceableMetadataImpl > ReplaceableUses)
 Assign RAUW support to this.
std::unique_ptr< ReplaceableMetadataImpltakeReplaceableUses ()
 Drop RAUW support.

Detailed Description

Pointer to the context, with optional RAUW support.

Either a raw (non-null) pointer to the LLVMContext, or an owned pointer to ReplaceableMetadataImpl (which has a reference to LLVMContext).

Definition at line 966 of file Metadata.h.

Constructor & Destructor Documentation

◆ ContextAndReplaceableUses() [1/5]

llvm::ContextAndReplaceableUses::ContextAndReplaceableUses ( LLVMContext Context)

Definition at line 970 of file Metadata.h.

References Context, and Ptr.

◆ ContextAndReplaceableUses() [2/5]

llvm::ContextAndReplaceableUses::ContextAndReplaceableUses ( std::unique_ptr< ReplaceableMetadataImpl ReplaceableUses)

Definition at line 971 of file Metadata.h.

References assert(), getReplaceableUses(), and Ptr.

◆ ContextAndReplaceableUses() [3/5]

llvm::ContextAndReplaceableUses::ContextAndReplaceableUses ( )

◆ ContextAndReplaceableUses() [4/5]

llvm::ContextAndReplaceableUses::ContextAndReplaceableUses ( ContextAndReplaceableUses &&  )

◆ ContextAndReplaceableUses() [5/5]

llvm::ContextAndReplaceableUses::ContextAndReplaceableUses ( const ContextAndReplaceableUses )

◆ ~ContextAndReplaceableUses()

llvm::ContextAndReplaceableUses::~ContextAndReplaceableUses ( )

Definition at line 982 of file Metadata.h.

References getReplaceableUses().

Member Function Documentation

◆ getContext()

LLVMContext & llvm::ContextAndReplaceableUses::getContext ( ) const

◆ getOrCreateReplaceableUses()

ReplaceableMetadataImpl * llvm::ContextAndReplaceableUses::getOrCreateReplaceableUses ( )

Ensure that this has RAUW support, and then return it.

Definition at line 1004 of file Metadata.h.

References getContext(), getReplaceableUses(), hasReplaceableUses(), and makeReplaceable().

◆ getReplaceableUses()

ReplaceableMetadataImpl * llvm::ContextAndReplaceableUses::getReplaceableUses ( ) const

◆ hasReplaceableUses()

bool llvm::ContextAndReplaceableUses::hasReplaceableUses ( ) const

Whether this contains RAUW support.

Definition at line 987 of file Metadata.h.

References Ptr.

Referenced by getContext(), getOrCreateReplaceableUses(), getReplaceableUses(), and takeReplaceableUses().

◆ makeReplaceable()

void llvm::ContextAndReplaceableUses::makeReplaceable ( std::unique_ptr< ReplaceableMetadataImpl ReplaceableUses)

Assign RAUW support to this.

Make this replaceable, taking ownership of ReplaceableUses (which must not be null).

Definition at line 1015 of file Metadata.h.

References assert(), getContext(), getReplaceableUses(), and Ptr.

Referenced by getOrCreateReplaceableUses().

◆ operator LLVMContext &()

llvm::ContextAndReplaceableUses::operator LLVMContext & ( )

Definition at line 984 of file Metadata.h.

References getContext().

◆ operator=() [1/2]

ContextAndReplaceableUses & llvm::ContextAndReplaceableUses::operator= ( const ContextAndReplaceableUses )

◆ operator=() [2/2]

ContextAndReplaceableUses & llvm::ContextAndReplaceableUses::operator= ( ContextAndReplaceableUses &&  )

◆ takeReplaceableUses()

std::unique_ptr< ReplaceableMetadataImpl > llvm::ContextAndReplaceableUses::takeReplaceableUses ( )

Drop RAUW support.

Cede ownership of RAUW support, returning it.

Definition at line 1026 of file Metadata.h.

References assert(), getReplaceableUses(), hasReplaceableUses(), and Ptr.

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