LLVM  6.0.0svn
Classes | Public Member Functions | List of all members
llvm::MDGlobalAttachmentMap Class Reference

Multimap-like storage for metadata attachments for globals. More...

#include "IR/LLVMContextImpl.h"

Public Member Functions

bool empty () const
 
void get (unsigned ID, SmallVectorImpl< MDNode *> &Result)
 Appends all attachments with the given ID to Result in insertion order. More...
 
void insert (unsigned ID, MDNode &MD)
 
void erase (unsigned ID)
 
void getAll (SmallVectorImpl< std::pair< unsigned, MDNode *>> &Result) const
 Appends all attachments for the global to Result, sorting by attachment ID. More...
 

Detailed Description

Multimap-like storage for metadata attachments for globals.

This differs from MDAttachmentMap in that it allows multiple attachments per metadata kind.

Definition at line 1138 of file LLVMContextImpl.h.

Member Function Documentation

◆ empty()

bool llvm::MDGlobalAttachmentMap::empty ( ) const
inline

Definition at line 1146 of file LLVMContextImpl.h.

References llvm::SmallVectorBase::empty().

◆ erase()

void MDGlobalAttachmentMap::erase ( unsigned  ID)

Definition at line 1151 of file Metadata.cpp.

References E.

◆ get()

void MDGlobalAttachmentMap::get ( unsigned  ID,
SmallVectorImpl< MDNode *> &  Result 
)

Appends all attachments with the given ID to Result in insertion order.

If the global has no attachments with the given ID, or if ID is invalid, leaves Result unchanged.

Definition at line 1144 of file Metadata.cpp.

References llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().

◆ getAll()

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

Appends all attachments for the global to Result, sorting by attachment ID.

Attachments with the same ID appear in insertion order. This function does not clear Result.

Definition at line 1164 of file Metadata.cpp.

References B.

◆ insert()

void MDGlobalAttachmentMap::insert ( unsigned  ID,
MDNode MD 
)

Definition at line 1140 of file Metadata.cpp.


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