class MDGlobalAttachmentMap

Declaration

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

Description

Multimap-like storage for metadata attachments for globals. This differs from MDAttachmentMap in that it allows multiple attachments per metadata kind.

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

Method Overview

  • public bool empty() const
  • public bool erase(unsigned int ID)
  • public void get(unsigned int ID, SmallVectorImpl<llvm::MDNode *> & Result) const
  • public void getAll(SmallVectorImpl<std::pair<unsigned int, MDNode *>> & Result) const
  • public void insert(unsigned int ID, llvm::MDNode & MD)
  • public llvm::MDNode * lookup(unsigned int ID) const

Methods

bool empty() const

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

bool erase(unsigned int ID)

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

Parameters

unsigned int ID

void get(
    unsigned int ID,
    SmallVectorImpl<llvm::MDNode*>& Result) const

Description

Appends all attachments with the given ID to \c Result in insertion order. If the global has no attachments with the given ID, or if ID is invalid, leaves Result unchanged.

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

Parameters

unsigned int ID
SmallVectorImpl<llvm::MDNode*>& Result

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

Description

Appends all attachments for the global to \c Result, sorting by attachment ID. Attachments with the same ID appear in insertion order. This function does \em not clear \c Result.

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

Parameters

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

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

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

Parameters

unsigned int ID
llvm::MDNode& MD

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

Description

Returns the first attachment with the given ID or nullptr if no such attachment exists.

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

Parameters

unsigned int ID