LLVM: llvm::MDAttachments Class Reference (original) (raw)
Multimap-like storage for metadata attachments. More...
#include "[IR/LLVMContextImpl.h](LLVMContextImpl%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| bool | empty () const |
| size_t | size () const |
| MDNode * | lookup (unsigned ID) const |
| Returns the first attachment with the given ID or nullptr if no such attachment exists. | |
| void | get (unsigned ID, SmallVectorImpl< MDNode * > &Result) const |
| Appends all attachments with the given ID to Result in insertion order. | |
| void | getAll (SmallVectorImpl< std::pair< unsigned, MDNode * > > &Result) const |
| Appends all attachments for the global to Result, sorting by attachment ID. | |
| void | set (unsigned ID, MDNode *MD) |
| Set an attachment to a particular node. | |
| void | insert (unsigned ID, MDNode &MD) |
| Adds an attachment to a particular node. | |
| bool | erase (unsigned ID) |
| Remove attachments with the given ID. | |
| template | |
| void | remove_if (PredTy shouldRemove) |
| Erase matching attachments. |
Multimap-like storage for metadata attachments.
Definition at line 1570 of file LLVMContextImpl.h.
◆ empty()
| bool llvm::MDAttachments::empty ( ) const | inline |
|---|
◆ erase()
◆ get()
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 1523 of file Metadata.cpp.
References A().
◆ getAll()
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 1529 of file Metadata.cpp.
References A(), and llvm::stable_sort().
◆ insert()
Adds an attachment to a particular node.
Definition at line 1546 of file Metadata.cpp.
Referenced by set().
◆ lookup()
◆ remove_if()
template
| void llvm::MDAttachments::remove_if ( PredTy shouldRemove) | inline |
|---|
◆ set()
Set an attachment to a particular node.
Set the [ID](namespacellvm%5F1%5F1CallingConv.html#abdf8cf606905c10634e831390981b0ed "LLVM IR allows to use arbitrary numbers as calling convention identifiers.") attachment to MD, replacing the current attachments at [ID](namespacellvm%5F1%5F1CallingConv.html#abdf8cf606905c10634e831390981b0ed "LLVM IR allows to use arbitrary numbers as calling convention identifiers.") (if anyway).
Definition at line 1540 of file Metadata.cpp.
References erase(), and insert().
◆ size()
| size_t llvm::MDAttachments::size ( ) const | inline |
|---|
The documentation for this class was generated from the following files:
- lib/IR/LLVMContextImpl.h
- lib/IR/Metadata.cpp