|
LLVM
10.0.0
|
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 1214 of file LLVMContextImpl.h.
|
inline |
Definition at line 1222 of file LLVMContextImpl.h.
References llvm::SmallVectorBase::empty(), and lookup().
Definition at line 1169 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 1162 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 1177 of file Metadata.cpp.
References llvm::stable_sort().
Definition at line 1151 of file Metadata.cpp.
Returns the first attachment with the given ID or nullptr if no such attachment exists.
Definition at line 1155 of file Metadata.cpp.
1.8.13