class MDAttachmentMap

Declaration

class MDAttachmentMap { /* full declaration omitted */ };

Description

Map-like storage for metadata attachments.

Declared at: llvm/lib/IR/LLVMContextImpl.h:1175

Method Overview

  • public bool empty() const
  • public bool erase(unsigned int ID)
  • public void getAll(SmallVectorImpl<std::pair<unsigned int, MDNode *>> & Result) const
  • public llvm::MDNode * lookup(unsigned int ID) const
  • public template <class PredTy>void remove_if(PredTy shouldRemove)
  • public void set(unsigned int ID, llvm::MDNode & MD)
  • public size_t size() const

Methods

bool empty() const

Declared at: llvm/lib/IR/LLVMContextImpl.h:1179

bool erase(unsigned int ID)

Description

Remove an attachment. Remove the attachment at \c ID, if any.

Declared at: llvm/lib/IR/LLVMContextImpl.h:1194

Parameters

unsigned int ID

void getAll(SmallVectorImpl<
            std::pair<unsigned int, MDNode*>>&
                Result) const

Description

Copy out all the attachments. Copies all the current attachments into \c Result, sorting by attachment ID. This function does \em not clear \c Result.

Declared at: llvm/lib/IR/LLVMContextImpl.h:1200

Parameters

SmallVectorImpl<std::pair<unsigned int, MDNode*>>& Result

llvm::MDNode* lookup(unsigned int ID) const

Description

Get a particular attachment (if any).

Declared at: llvm/lib/IR/LLVMContextImpl.h:1183

Parameters

unsigned int ID

template <class PredTy>
void remove_if(PredTy shouldRemove)

Description

Erase matching attachments. Erases all attachments matching the \c shouldRemove predicate.

Declared at: llvm/lib/IR/LLVMContextImpl.h:1205

Templates

PredTy

Parameters

PredTy shouldRemove

void set(unsigned int ID, llvm::MDNode& MD)

Description

Set an attachment to a particular node. Set the \c ID attachment to \c MD, replacing the current attachment at \c ID (if anyway).

Declared at: llvm/lib/IR/LLVMContextImpl.h:1189

Parameters

unsigned int ID
llvm::MDNode& MD

size_t size() const

Declared at: llvm/lib/IR/LLVMContextImpl.h:1180