LLVM 20.0.0git
|
Enables easy lookup of blocks by addresses. More...
#include "llvm/ExecutionEngine/JITLink/JITLink.h"
Public Types | |
using | AddrToBlockMap = std::map< orc::ExecutorAddr, Block * > |
using | const_iterator = AddrToBlockMap::const_iterator |
Public Member Functions | |
BlockAddressMap ()=default | |
template<typename PredFn = decltype(includeAllBlocks)> | |
Error | addBlock (Block &B, PredFn Pred=includeAllBlocks) |
Add a block to the map. | |
void | addBlockWithoutChecking (Block &B) |
Add a block to the map without checking for overlap with existing blocks. | |
template<typename BlockPtrRange , typename PredFn = decltype(includeAllBlocks)> | |
Error | addBlocks (BlockPtrRange &&Blocks, PredFn Pred=includeAllBlocks) |
Add a range of blocks to the map. | |
template<typename BlockPtrRange > | |
void | addBlocksWithoutChecking (BlockPtrRange &&Blocks) |
Add a range of blocks to the map without checking for overlap with existing blocks. | |
const_iterator | begin () const |
Iterates over (Address, Block*) pairs in ascending order of address. | |
const_iterator | end () const |
Block * | getBlockAt (orc::ExecutorAddr Addr) const |
Returns the block starting at the given address, or nullptr if no such block exists. | |
Block * | getBlockCovering (orc::ExecutorAddr Addr) const |
Returns the block covering the given address, or nullptr if no such block exists. | |
Static Public Member Functions | |
static bool | includeAllBlocks (const Block &B) |
A block predicate that always adds all blocks. | |
static bool | includeNonNull (const Block &B) |
A block predicate that always includes blocks with non-null addresses. | |
using llvm::jitlink::BlockAddressMap::AddrToBlockMap = std::map<orc::ExecutorAddr, Block *> |
using llvm::jitlink::BlockAddressMap::const_iterator = AddrToBlockMap::const_iterator |
|
default |
|
inline |
Add a block to the map.
Returns an error if the block overlaps with any existing block.
Definition at line 1675 of file JITLink.h.
References B, I, and llvm::Error::success().
Referenced by addBlocks().
|
inline |
Add a range of blocks to the map.
Returns an error if any block in the range overlaps with any other block in the range, or with any existing block in the map.
Definition at line 1710 of file JITLink.h.
References addBlock(), B, Blocks, and llvm::Error::success().
|
inline |
Add a range of blocks to the map without checking for overlap with existing blocks.
The client is responsible for ensuring that the block added does not overlap with any existing block.
Definition at line 1721 of file JITLink.h.
References addBlockWithoutChecking(), B, and Blocks.
|
inline |
Add a block to the map without checking for overlap with existing blocks.
The client is responsible for ensuring that the block added does not overlap with any existing block.
Definition at line 1703 of file JITLink.h.
References B.
Referenced by addBlocksWithoutChecking().
|
inline |
|
inline |
|
inline |
|
inline |
A block predicate that always includes blocks with non-null addresses.
Definition at line 1668 of file JITLink.h.
References B.
Referenced by llvm::jitlink::EHFrameEdgeFixer::operator()().