LLVM
8.0.1
|
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) const |
Appends all attachments with the given ID to Result in insertion order. More... | |
MDNode * | lookup (unsigned ID) const |
Returns the first attachment with the given ID or nullptr if no such attachment exists. More... | |
void | insert (unsigned ID, MDNode &MD) |
bool | 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... | |
Multimap-like storage for metadata attachments for globals.
This differs from MDAttachmentMap in that it allows multiple attachments per metadata kind.
Definition at line 1189 of file LLVMContextImpl.h.
|
inline |
Definition at line 1197 of file LLVMContextImpl.h.
References llvm::SmallVectorBase::empty(), and lookup().
Definition at line 1168 of file Metadata.cpp.
References I, and llvm::remove_if().
void MDGlobalAttachmentMap::get | ( | unsigned | ID, |
SmallVectorImpl< MDNode *> & | Result | ||
) | const |
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 1161 of file Metadata.cpp.
References llvm::SmallVectorTemplateBase< T >::push_back().
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 1176 of file Metadata.cpp.
References B.
Definition at line 1150 of file Metadata.cpp.
Returns the first attachment with the given ID or nullptr if no such attachment exists.
Definition at line 1154 of file Metadata.cpp.